Phil Holmes <m...@philholmes.net> writes: > Can anyone explain why the f in the attached code is 2 octaves above where > I would expect them? > > testy = #(define-music-function (note) > (ly:music?) > #{ > \tag #'a { #note } > \tag #'b { #note } > #}) > > \score { > \keepWithTag #'a { > \new Staff > { > \new Voice { \relative c'' { c d e \testy f } } > } > } > }
Because you let it be shifted two times before selecting your tag? Your music does not contain two _copies_ of note, but rather contains note _itself_ two times. So \relative is applied to the same music two times in succession. Use #(music-clone note) or #(ly:music-deep-copy note) or $note for your two uses, and the note will get placed in two separate _copies_ of the original rather than using the note object itself in two places. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel