bug-lilypond
[Top][All Lists]
Advanced

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

Re: Issue 1110 in lilypond: Wrong octave of repetition chord with \relat


From: lilypond
Subject: Re: Issue 1110 in lilypond: Wrong octave of repetition chord with \relative and #{ #} syntax
Date: Sat, 15 Oct 2011 20:12:25 +0000


Comment #8 on issue 1110 by address@hidden: Wrong octave of repetition chord with \relative and #{ #} syntax
http://code.google.com/p/lilypond/issues/detail?id=1110

This is not a problem of #{ ... #}. It is actually a problem of $music. You'll get the same result if you say
zap = { <c e g>4 ~ q }
\relative c' \zap

The reason is that when music passes through a MUSIC_IDENTIFIER (and $ works by creating such an identifier), Lilypond does a deep copy of the structure.

The repeated chord relative callback in lily/music-sequence.cc, however, works by looking up the pitch of the 'original-chord that it already assumes to be relativated. Unfortunately, after a deep copy, the 'original-chord is no longer the same as the original chord, since the deep copying made _separate_ copies of the original chord, and the original-chord field of the RepeatedChord.

As a consequence, after copying the original-chord field does not point to a relativated chord, but to a copy that has been made _before_ relativizing and that is no longer associated with the relativized chord.




reply via email to

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