Alex Loomis <thebluemusic...@gmail.com> writes:

> Could someone explain why this doesn't work?
>
> \version "2.16.2"
>
> octava =
>
> #(define-music-function
>
> (parser location music-input)
>
> (ly:music?)
>
> #{
>
> \partcombine #music-input \transpose c c' #music-input
>
> #})
>
> \octava { c' d' e' }

Most operations (like transposing) in LilyPond are changing the original
data, so you need a copy when using music more than once.  #xxx is pure
Scheme and does not copy an expression, $xxx does.

You can also use #(ly:music-deep-copy music-input) here.

-- 
David Kastrup

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to