How can I force LilyPond to repeat a chord symbol (relates to alternate endings)?
In chordmode, LilyPond chooses not to display chord symbols when they are the same as the preceding symbol, which is usually the right behavior. However, this behavior gets weird in the context of alternate endings of repeats. Here's a simple example:
score {
<<
new ChordNames {
set chordChanges = ##t
chordmode { repeat volta 2 {g1} alternative { {c} {c4 g c c} } } }
new Voice = "one" { relative c'' { repeat volta 2 { g4 f e d }
alternative { {c r r r} {c g c r} } } }
>>
}
Output (LilyBin: www.lilybin.com/77tv75/1):
LilyPond omits the C chord that should be at the beginning of the 2nd ending, because it's the same chord as in the (visually) preceding measure, which is the 1st ending. However, it should be shown, since from the reader's point of view it's not the same as the (musically) preceding measure (measure 1). Is there a way to override this behavior?
3 Comments
Sorted by latest first Latest Oldest Best
Use once set chordChanges = ##f at the location where you want to force the chord symbol.
score {
<<
new ChordNames {
set chordChanges = ##t
chordmode {
repeat volta 2 {g1}
alternative { {c} {once set chordChanges = ##f c4 g c c} }
}
}
new Voice = "one" {
relative c'' {
repeat volta 2 { g4 f e d }
alternative { {c r r r} {c g c r} }
}
}
>>
}
Apply the patch in code.google.com/p/lilypond/issues/detail?id=3835 or wait for it to appear in upstream.
By the way, if issues such as these do not get reported to the actual project mailing and bug lists, it is shere luck whether they get picked up and fixed at some point of time or not.
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.