bug-lilypond
[Top][All Lists]
Advanced

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

ly:music-deep-copy and \relative


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

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. – Modify ly:music-deep-copy to output both copies in the same octave. This would be most intuitive for what I think, since one would expect copies to be identical. – Provide an optional (?) second argument to ly:music-deep-copy to choose between the two behaviours: abs-copy to use \relative only for determining the start of the first copy and start the second copy from the same absolute pitch; rel-copy to apply \relative also on the first note of the second copy (as in current behaviour). – Use two dedicated functions for these two ways of handling it. What would they be named? I’d suggest ly:music-deep-copy-relative (current behaviour) and ly:music-deep-copy (new behaviour).

The third option would be easiest in terms of backward compatibility, the fourth is actually a variant of the second, with an additional possibility for convert-ly updating.

Yours, Simon



reply via email to

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