On Sun 17 May 2026 at 22:11:23 (+0200), Lilypond-User wrote:
> Hmmm - I owe you all my deepest apologies... Removing all the "set
> associatedVoice" phrases, it turned out that in the last of those
> items I did not refer to "alto", but to "alto "; so with an extra
> trailing space.
> 
> Removed that, and hooray! it works as expected...
> 
> So for the moment I'll stay with that construct, since in this piece a
> lot of work has already been done. But I've certainly learned
> something!

FTR, I would prefer to write the second voice separately. Here I've
skipped the sections where voices are unison, but unless the division
was only for a few measures, I'd write the second part in full with
\voiceTwo (and first one voiceOne throughout).

I commented the VerticalAxisGroup.staff-affinity = #CENTER because
I wasn't sure what it would do here (obviously with more staves).

Using the NullVoice = aligner to set the words is extensible. Here it
aligns to just two voices. I use it to set four-part hymns: it moves
the alignment complexity from being in a line of notes (like Kieren's
spacer variable) into the lyrics themselves.

On Sat 16 May 2026 at 15:24:05 (-0400), Kieren MacMillan wrote:
> There are ways to automate the generation of the notes in that spacer 
> variable — I just didn’t want to get into that here, so I manually wrote out 
> the rhythms.

I don't think I have seen that demonstrated. Does it involve scheme?
(Answering this might best involve a change in the Subject line.)

Cheers,
David.
%%% Start snippet

\version "2.25.32"

\paper {
  % Add space for instrument names
  indent = 18\mm
  short-indent = 10\mm
}

global = {
  \key g \major
  \time 3/4
  s2.
  \time 4/4
  s1 * 7
  \time 3/4
  s2. * 5
  s2
  \bar "|."
}

alto = \relative c'' {
  r2 g4 ^\mf
  \voiceOne b2( a4) a
  a2( g )
  \oneVoice g2 \tuplet 3/2 { g2 g4 }
  g4 g2 g4 ^\f
  \voiceOne b2( a4) a
  \oneVoice a2( g)
  <g e> \tuplet 3/2 { <g~ es(>4 <g d)> <g c,> }
  <a d,> <g d>2
  R2.*2
  r4 g ^\mp g
  fis fis( e8) g~
  g2 \fermata
}

altoii = \relative c'' {
  \voiceTwo s2.
  g2. g4
  g1
  s1
  s1
  g2. g4
}

altoVerse = \lyricmode {
  Mag -- ni -- fi -- cat __ a -- ni -- ma me -- a,
  Mag -- ni -- fi -- cat __ a -- ni -- ma me -- a,
  an -- cil -- lae su -- ae. __
}

\score {
  \new ChoirStaff <<
    \new Staff \with {
      midiInstrument = "choir aahs"
      instrumentName = "Alt"
      shortInstrumentName = "A."
    } <<
      \clef treble \global
      \new Voice \alto
      \new Voice \altoii
      \new NullVoice = aligner { << \alto \altoii >> }
      \new Lyrics \with {
        %%\override VerticalAxisGroup.staff-affinity = #CENTER
      }
      \lyricsto aligner \altoVerse
    >>
  >>
  \layout {
    \override Score.BarNumber.break-visibility = #end-of-line-invisible
  }
  \midi { }
}

%%%% End snippet

Reply via email to