Here is a short snippet of Lilypond that I think expresses the intent of what I want to do.
verseNotes = \relative c' {
d^\markup { \verseText } d d d16 d d8 a r4 |
cis8 cis cis cis16 cis cis8 a r4 |
}
verseSection = \relative c' {
\repeat volta 2 {
\verseNotes
}
gis,1 |
gis4. b8~b2 |
\repeat volta 3 {
verseText = "Verse (repeat 2x)"
\verseNotes
}
}
\relative c' {
verseText = "Verse"
\verseSection
}
It, of course, errors out.
I think the cause is something like verseNotes
being bound at the time it is parsed, and \verseText
having no value at the time. I would like to re-use the verseNotes variable, but with different values of verseText.
I’m thinking I want the “dynamic” equivalent of a function of some sort, to which I pass a text param. I see various sections in the Lilypond documentation expressing stuff in Scheme, but this is likely last thing I want to be doing while entering music.