bug-lilypond
[Top][All Lists]
Advanced

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

Re: ly:music-deep-copy and \relative


From: Simon Albrecht
Subject: Re: ly:music-deep-copy and \relative
Date: Sat, 25 Apr 2015 17:12:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Am 25.04.2015 um 13:17 schrieb David Kastrup:
Simon Albrecht <address@hidden> writes:

Hello,

as Harm has pointed out, the following example gives unexpected
(i.e. different) output:

\version "2.19"
repeat-note =
#(define-music-function (parser location music)(ly:music?)
   (make-sequential-music (list music (ly:music-deep-copy music))))

\absolute { c'1 \repeat-note c'' }
\relative c' { c \repeat-note c'1 }

There are several possible ways of handling this:
– Document it as a feature of ly:music-deep-copy in its search
string. Users would have to circumvent it then.
Huh?  What makes you think this a "feature" of ly:music-deep-copy ?

\absolute { c'1 { c'' c'' } }
\relative c' { c { c'1 c'1 } }

does exactly the same.
Now I see: I mistook ly:music-deep-copy to copy the music resulting from the input, but it copies the input (before any music functions such as \relative be applied). Is that correct? In other words: my intuition served me badly here, where I didn’t really know what the code was doing. I wrongly expected this \repeat-note function to do the same as \repeat unfold 2 {}.

Sorry for the noise,
Simon



reply via email to

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