bell notificationshomepageloginNewPostedit profiledmBox

Hoots : Lines too long in piece with two sections for different instruments 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 - freshhoot.com

10% popularity   0 Reactions

Lines too long in piece with two sections for different instruments
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.


Load Full (1)

Login to follow hoots

1 Comments

Sorted by latest first Latest Oldest Best

10% popularity   0 Reactions

Remember that full-measure rests in LilyPond are input with a capital R. Thus every instance where you have r2. (or r2.*8, etc.), you should instead have R2. (or R2.*8, etc.).

Making this change in all voices corrects the problem. In the example you gave, it's present in the final lines of both the treble and bass and it's present in two lines each for the soprano and alto.

I'll also take this moment to mention the unfold command in LilyPond. Perhaps you're already aware of this and just didn't include it in your MWE, but instead of writing out c8 e g c g e 18 times, we can instead input repeat unfold 18 { c8 e g c g e } which will do all of that work for us. And if we need to make edits, it's also much easier to just change the 18 instead of having to add/delete lines as necessary.


Back to top Use Dark theme