|
From: | James Worlton |
Subject: | Re: Scheme function question |
Date: | Thu, 21 Nov 2013 10:13:10 -0600 |
> \version "2.17.95"Ok, this one is a puzzler. Its solution is that you wrote #note twice
>
> doubleStem =
> #(define-music-function
> (parser location note)
> (ly:music?)
> #{
> << { \voiceOne #note } \new Voice { \voiceTwo #note } >> \oneVoice
> #})
>
> melody = \relative c' {
> c4 d e f
> \doubleStem g a b c
> }
>
> \score {
> \new Staff \melody
> }
in the same music without making a copy. Either call music-clone on one
of the occurences of #note, or write $note (which does a copy anyway).
If you don't do that, \relative will work _twice_ on the identical note
while working through the music, shifting it up to g' first, and then
seeing g', and consequently shifting it to g'' (taking the first
occurence along).
[Prev in Thread] | Current Thread | [Next in Thread] |