16

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: http://www.lilybin.com/77tv75/1):

Lilypond Output

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?

16

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} } 
       }
     }
 >>
}
2

Apply the patch in http://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.

1

Remove \set chordChanges = ##t

  • Works if noting all chords is acceptable. – Dave Jun 11 '13 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.