I found a solution: create a null voice and add the lyrics to that instead.
Here’s the updated version of the code in my original message, with problem
solved.
\version "2.20.0"
\language "english"
#(set-default-paper-size "a4")
#(set-global-staff-size 16.2)
global = \transpose c c {
\key bf \major
\time 3/4
\skip 1*3/4*13
\bar "|."
}
Soprano = \relative c''
{
g4 g4 g8 g8 |
g8 g8 g2 \breathe |
<<
{
\voiceTwo
bf4. bf8 bf4 |
bf4. bf8 bf4 |
bf2
}
\new Voice = SopranoTwo
{
\voiceOne
d4. d8 d4 |
d4. d8 d4 |
d2
}
>>
\oneVoice
r4 |
r4
<<
{
\voiceTwo
bf4 bf4 |
bf2.~ |
bf2
}
\new Voice = SopranoFour
{
\voiceOne
r2
r8 d8 d4 d4 |
d8 d4.
}
>>
\oneVoice
r4 |
R1*3/4 |
R1*3/4 |
r8
<<
\new Voice = SopranoOne
{
\voiceOne
g8 g4 g4 |
g2
}
\new Voice = SopranoTwo
{
\voiceTwo
d8 d4 d4 |
d2
}
\oneVoice
>>
r4 |
g,2. |
}
SopranoAligner = \relative c''
{
g4 g4 g8 g8 |
g8 g8 g2 \breathe |
d'4. d8 d4 |
d4. d8 d4 |
d2 r4 |
r4 bf4 bf4 |
bf2.~ |
bf2
r4 |
R1*3/4 |
R1*3/4 |
r8
d8 d4 d4 |
d2
r4 |
g,2. |
}
Alto = \relative c''
{
% 1
g4 g4 g8 g8 |
g8 g8 g2 \breathe |
% 3
g4. g8 g4 |
g4. g8 g4 |
g2 r4|
% 6
r4 g4 g4 |
g2. ~ |
g2 r4 |
% 9
r4 g4 g4 |
g8 g4. r4 |
% 11
r4
<<
\new Voice = AltoOne
{
\voiceOne
bf4 bf4|
bf2
}
\new Voice = AltoTwo
{
\voiceTwo
g4 g4 |
g2
}
\oneVoice
>>
% 13
r4 |
g2. |
}
AltoAligner = \relative c''
{
% 1
g4 g4 g8 g8 |
g8 g8 g2 \breathe |
% 3
g4. g8 g4 |
g4. g8 g4 |
g2 r4|
% 6
r4 g4 g4 |
g2. ~ |
g2 r4 |
% 9
r4 g4 g4 |
g8 g4. r4 |
% 11
r4
g4 g4 |
g2
% 13
r4 |
g2. |
}
SopranoLyrics = \lyricmode {
This phrase is the nor -- mal bit.
Here the sop -- ra -- no di -- vides.
I sing low __
Sop -- ra -- no words.
Yeah!
}
SopranoFourLyrics = \lyricmode {
and I sing la -- ter.
}
AltoLyrics = \lyricmode {
This phrase is the nor -- mal bit.
Here the sop -- ra -- no di -- vides.
I am bored. __
I am so -- lo.
Al -- to words.
Yeah!
}
AltoOneLyrics = \lyricmode {
}
\score {
<<
\new ChoirStaff
<<
\new Staff = "soprano"
<<
\global
\new Voice="v1"
{
\set Staff.shortInstrumentName = "S"
\set Staff.instrumentName = "Soprano"
\clef "treble"
\Soprano
}
\new NullVoice = "SopranoAligner" \SopranoAligner
\new Lyrics \lyricsto "SopranoAligner" \SopranoLyrics
\new Lyrics \with { alignAboveContext = #"soprano" }
\lyricsto "SopranoFour" { \SopranoFourLyrics }
>>
\new Staff = "alto"
<<
\global
\new Voice="v2"
{
\set Staff.shortInstrumentName = "A"
\set Staff.instrumentName = "Alto"
\clef "treble"
\Alto
}
\new NullVoice = "AltoAligner" \AltoAligner
\new Lyrics \lyricsto "AltoAligner" \AltoLyrics
>>
>>
>>
}
\paper{
ragged-last-bottom = ##t
system-system-spacing =
#'((basic-distance . 20) (minimum-distance . 0) (padding . 5))
}
> On 9 Apr 2022, at 17:28, Martin Baker <[email protected]> wrote:
>
> Hello. I am type-setting a choral piece and there is a need for occasional
> divisi within a part. In the example code below, I want all the lyrics to
> align horizontally - at the moment when moving from unison to divisi the
> lyrics interfere with each other and are pushed up or down. In most divisi
> sections the lyrics need only to be under the stave, but not always, as in
> the soprano bb 7 & 8.
>
> I have tried an option where only one new voice is created for each divisi,
> but then the stemming becomes a problem. I want the stems to be as in this
> example - when a part divides the upper part should be stems up and the lower
> part stems down.
>
> Thank you for any help. Martin
>
> \version "2.20.0"
>
> \language "english"
>
> #(set-default-paper-size "a4")
> #(set-global-staff-size 16.2)
>
> global = \transpose c c {
> \key bf \major
> \time 3/4
> \skip 1*3/4*13
> \bar "|."
> }
>
> Soprano = \relative c''
> {
> g4 g4 g8 g8 |
> g8 g8 g2 \breathe |
> <<
> \new Voice = SopranoOne
> {
> \voiceOne
> d'4. d8 d4 |
> d4. d8 d4 |
> d2 r4 |
> R1*3/4 |
> r8 d8 d4 d4 |
> d8 d4.
> }
>
> \new Voice = SopranoTwo
> {
> \voiceTwo
> bf4. bf8 bf4 |
> bf4. bf8 bf4 |
> bf2 r4 |
> r4 bf4 bf4 |
> bf2.~ |
> bf2
> }
> \oneVoice
> >>
>
> r4 |
> R1*3/4 |
> R1*3/4 |
> r8
>
> <<
> \new Voice = SopranoOne
> {
> \voiceOne
> g'8 g4 g4 |
> g2
> }
> \new Voice = SopranoThree
> {
> \voiceTwo
> d8 d4 d4 |
> d2
> }
> \oneVoice
> >>
>
> r4 |
> g,2. |
> }
>
> Alto = \relative c''
> {
> % 1
> g4 g4 g8 g8 |
> g8 g8 g2 \breathe |
> % 3
> g4. g8 g4 |
> g4. g8 g4 |
> g2 r4|
> % 6
> r4 g4 g4 |
> g2. ~ |
> g2 r4 |
> % 9
> r4 g4 g4 |
> g8 g4. r4 |
> % 11
> r4
> <<
> \new Voice = AltoOne
> {
> \voiceOne
> bf4 bf4|
> bf2
> }
> \new Voice = AltoTwo
> {
> \voiceTwo
> g4 g4 |
> g2
> }
> \oneVoice
> >>
> % 13
> r4 |
> g2. |
> }
>
> SopranoLyrics = \lyricmode {
> This phrase is the nor -- mal bit. Yeah!
> }
>
> SopranoOneLyrics = \lyricmode {
> _ _ _ _ _ _ _ and I sing la -- ter.
> }
>
> SopranoTwoLyrics = \lyricmode {
> Here the sop -- ra -- no di -- vides.
> I sing low __
> }
>
> SopranoThreeLyrics = \lyricmode {
> Sop -- ra -- no words.
> }
>
> AltoLyrics = \lyricmode {
> This phrase is the nor -- mal bit.
> Here the sop -- ra -- no di -- vides.
> I am bored. __
> I am so -- lo.
> Yeah!
> }
>
> AltoOneLyrics = \lyricmode {
> Al -- to words.
> }
>
> \score {
> <<
> \new ChoirStaff
> <<
> \new Staff = "soprano"
> <<
> \global
> \new Voice="v1"
> {
> \set Staff.shortInstrumentName = "S"
> \set Staff.instrumentName = "Soprano"
> \clef "treble"
> \Soprano
> }
> \new Lyrics \lyricsto "v1" { \SopranoLyrics }
> \new Lyrics \with { alignAboveContext = #"soprano" }
> \lyricsto "SopranoOne" { \SopranoOneLyrics }
> \new Lyrics \lyricsto "SopranoTwo" { \SopranoTwoLyrics }
> \new Lyrics \lyricsto "SopranoThree" {
> \SopranoThreeLyrics }
> >>
> \new Staff = "alto"
> <<
> \global
> \new Voice="v2"
> {
> \set Staff.shortInstrumentName = "A"
> \set Staff.instrumentName = "Alto"
> \clef "treble"
> \Alto
> }
> \new Lyrics \with { alignBelowContext = #"alto" }
> \lyricsto "v2" { \AltoLyrics }
> \new Lyrics \with { alignBelowContext = #"alto" }
> \lyricsto "AltoOne" { \AltoOneLyrics }
> >>
>
> >>
> >>
> }
>
> \paper{
> ragged-last-bottom = ##t
> system-system-spacing =
> #'((basic-distance . 20) (minimum-distance . 0) (padding . 5))
> }
>
>
>