Something that I always have trouble with (I'm only an occasional Lilypond user) is writing parts that switch from one staff to two and back, and getting that so it's correct. If there's a relevant section of the manual I have a hard time finding it, and I often find problems when adapting previous times I've dealt with this.
I've pasted some example code after my signature I'm having trouble with. Can anyone help me solve these problems:
- The way I'm introducing a second staff, I need to use "\with { \omit TimeSignature}" or it will display the time signature on one of the staffs when it splits. However, there's a time signature change when switching back to a single staff, and this prevents it from showing the time signature for that staff when it switches back.
- As can be seen, neither "\with { \once \omit ...}" instead nor "\undo \omit TimeSignature" before the end helps. Even if I remove the "\with", while it places the time signature it does not show the staff lines under it.
- There's also an empty space to the right of the final bar line before it splits. I honestly have no clue why this is here. If I leave out the "\with" then it writes the time signature into it -- for some reason I don't understand -- but not properly set for it to just be invisible here.
More generally, this is an area where I feel I never know what I'm doing and just throw stuff at the compiler until it works well enough, and then I give up. Is there some fundamental knowledge that I seem to be missing here? Something I've not been able to find in the manual?
(Also, LilyBin doesn't seem to be a thing any more. Is there any replacement? I'm not turning something up.)
Thanks,
Evan
\version "2.20.0"
\language "english"
global = {
\key d \major
\time 4/4
\tempo 4=100
}
measures = \relative c' {
\repeat unfold 5
\repeat unfold 6 c4
}
cello = \relative c' {
\global
c4 c c c |
\time 3/2
\measures
\break
<<
{
\measures
\break
\measures
\break
}
\new Staff
\with { \once \omit TimeSignature }
{
\clef bass
\key d \major
\measures
\break
\measures
\undo \omit TimeSignature
\break
}
>>
\break
\time 2/2
c4 c c c
}
\score {
\new GrandStaff
\new Staff \with {
instrumentName = "Cello"
midiInstrument = "cello"
} { \clef bass \cello }
\layout { }
\midi { }
}