I want to generate a lead sheet in which
- chord names are shown at the top
- below that is an empty staff
- if I repeat a chord, e.g. with \repeat percent 2 { f1:7 }, then above the staff I'll see F7 following by a percent over the following bar.
- Each staff line contains exactly 4 bars
- First line is not indented
Below is my current attempt. My questions are
- Is there a way to avoid needing to put the repeating 12 bars of silent rests in the melody - clearly it's not a good way to do it
- Can this be done more concisely?
\version "2.18.2"
chordmusic = \relative {
\chordmode {
\repeat percent 4 { f1:7 } \break
\repeat percent 2 { bes1:7} \repeat percent 2 { f1:7} \break
\repeat percent 2 { c1:7} \repeat percent 2 { f1:7}
}
}
melody = { \repeat unfold 12 {s1} }
%melody = {}
\score {
<<
\new ChordNames { \chordmusic }
\new Staff { \melody }
>>
\layout {
indent = #0
\context {
\ChordNames
\consists "Percent_repeat_engraver"
\override PercentRepeat.extra-offset = #'(0 . 1)
}
}
}