I'm trying to use Lilypond 2.18.2 to engrave a piece with two staff groups: a verse for piano (18 bars), and a chorus for choir (8 bars). I'm trying to follow the Lilypond example "Solo Verse and Two-Part Refrain", which takes advantage of \RemoveEmptyStaves
. However, Lilypond doesn't seem to be inserting any line breaks within the verse, so the music runs off the edge of the page.
I have tried to reduce the following example as much as possible, but it needs to have a lot of notes to reproduce the problem, so it is still a bit long. Sorry about that.
#(set-default-paper-size "letter")
\version "2.18.2"
\language "english"
global = {
\key c \major
\time 6/8
}
verseTreble = \relative c' {
\global
\clef treble
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
r2.*8
}
verseBass = \relative c {
\global
\clef bass
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
c8 e g c g e |
r2.*8
}
chorusSoprano = \relative c' {
\global
\clef treble
\autoBeamOff
r2.*18 |
g2. |
r2.*6 |
g2. |
}
chorusAlto = \relative c' {
\global
\clef treble
\autoBeamOff
r2.*18 |
g2. |
r2.*6 |
g2. |
}
\score {
<<
\new PianoStaff <<
\new Staff = "upper" { \verseTreble }
\new Staff = "lower" { \verseBass }
>>
\new ChoirStaff <<
\new Staff <<
\new Voice = "s" {
\chorusSoprano
}
>>
\new Staff <<
\new Voice = "a" {
\chorusAlto
}
>>
>>
>>
\layout {
% ragged-right = ##t
\context {
\Staff
\RemoveEmptyStaves
\override VerticalAxisGroup.remove-first = ##t
}
}
}
Here is the output, converted to PNG. Note that the last 8 measures of the piano verse are off the page. No warnings are issued when compiling.