lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Doubling at the octave


From: David Kastrup
Subject: Re: Doubling at the octave
Date: Sun, 15 Dec 2013 07:51:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Alex Loomis <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]