[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generating simple leadsheet with chords and empty staff
From: |
Torsten Hämmerle |
Subject: |
Re: generating simple leadsheet with chords and empty staff |
Date: |
Mon, 2 Mar 2020 03:41:05 -0700 (MST) |
Rob Torop wrote
> - 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?
Hi Rob,
First of all, there's no need for
\repeat unfold 12 { s1 }
It's much simpler to write s1*12
Apart from that, and I suppose that's what you wanted, you can get by just
having to declare \chordmusic and use this definition both in ChordNames and
in Staff:
\chordmode cannot only be used for printing ChordNames, because "inside",
it's ordinary music, that also can be put into an ordinary Staff.
*And here's the trick*: If you use NullVoice, \chordmusic is just used for
rhythmic alignment and will not print any music.
%%%%%%%%%%%%%%
\version "2.18.2"
chordmusic = \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}
}
\score {
<<
\new ChordNames { \chordmusic }
\new Staff \new NullVoice { \chordmusic }
>>
\layout {
indent = #0
\context {
\ChordNames
\consists "Percent_repeat_engraver"
\override PercentRepeat.extra-offset = #'(0 . 1)
}
}
}
%%%%%%%%%%%%%%
HTH,
Torsten
PS: \relative around \chordmode does not make much sense here
--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html