Suppose I have one melody line that is repeated (e.g., singing multiple verses), but the chords should be different the second and third times through. I want these to be defined in their own variables in LilyPond:
melody = \relative c' { ... }
chords_a = \chordmode { ... }
chords_b = \chordmode { ... }
chords_c = \chordmode { ... }
Now, with multiple ChordNames
contexts, that can use a lot of vertical space:
\score { <<
\new ChordNames \chords_a
\new ChordNames \chords_b
\new ChordNames \chords_c
\new Staff \melody
>> }
What I'm looking to do instead is something like this:
I am able to do this part of the way:
\score { <<
\new ChordNames \chords_a
\new ChordNames \with {
\override ChordName.font-size
\override ChordName.X-offset
\override ChordName.Y-offset
} \chords_b
\new ChordNames ...
>> }
(Modifying the VerticalAxisGroup
, instead, might be the key here.)
I was able to achieve it more fully, however, by using a Lyrics
context instead of ChordNames
and manually entering the chord properties as markup (code simplified here):
chord_kludge_a = \lyricmode {
\markup {
C
\column {
B♭
D
}
}1
}
chord_kludge_b = ...
chord_kludge_c = ...
chord_kludge_collection = {
\chord_kludge_a
\chord_kludge_b
\chord_kludge_c
}
\score { <<
\new Lyrics \chord_kludge_collection
\new Staff \melody
>> }
But in doing so, it (1) is manually laborious, and (2) lacks the flexibility of regular ChordName
functions, like transpositions and alternative chords (e.g., redefining all augmented chords to read aug rather than +).
Is there any possible way to keep all the chords in their own variables, yet display them in a single context, where one is normal-sized on the left, and two more are smaller and stacked, one on top of the other, on the right? I believe the closest way to do it is by modifying the VerticalAxisGroup
, but my knowledge of its properties and keys is limited mostly to guessing and trial-and-error. (Moreover, if Scheme is involved, my knowledge of it, too, is even more scant.)