Thanks all! Separating the voices did fix the problem. I used this score a
long time ago and then updated the layout, so I feel like an update several
years ago must have changed the behavior, which is interesting.

On Sat, Jan 21, 2023 at 8:27 PM David Wright <[email protected]>
wrote:

> On Sun 22 Jan 2023 at 11:59:06 (+1100), Vaughan McAlley wrote:
> > On Sun, 22 Jan 2023, 10:32 Jon Arnold, <[email protected]>
> wrote:
> >
> > > Hey folks-
> > >
> > > Can anyone tell me why the slurs are not being followed in the soprano
> > > part of the attached file? It first occurs in the 2nd half of bar 7,
> bottom
> > > of page 3. It seems to be related to the barLiner function I have (it
> goes
> > > away if I remove it), but I don't understand why this would affect the
> > > lyrics.
> > >
> > > Here's the function:
> > > barLiner = {
> > >   \repeat unfold 20 { s2 \bar "!" s2. }
> > >   \set Timing.measureLength = #(ly:make-moment 1/2)
> > >   s2 s2
> > >   \set Timing.measureLength = #(ly:make-moment 3/4)
> > >   s2. s2. \bar "|."
> > >
> > > }
> > >
> > > This is called with:
> > > \new Staff \with {
> > >     midiInstrument = "choir aahs"
> > >     instrumentName = "Soprano"
> > >   } { << \soprano \barLiner >> }
> > >   \addlyrics { \sopranoVerse }
> > >
> >
> > Hi Jon,
> >
> > I can't remember off the top of my head which Lilypond version things
> > changed but explicitly instantiating a voice has fixed this sort of thing
> > for me in the past:
> >
> > } \new Voice { << \soprano \barLiner >> }
>
> You need something more like:
>
> choirPart = \new ChoirStaff <<
>   \new Staff \with {
>     midiInstrument = "choir aahs"
>     instrumentName = "Soprano"
>   } <<
>     \new Voice { \barLiner }
>     \new Voice { \soprano }
>     \addlyrics { \sopranoVerse }
>   >>
>   \new Staff \with {
>     midiInstrument = "choir aahs"
>     instrumentName = "Alto"
>   } { \alto }
>
> I presume that \addlyrics gets totally confused when asked to
> add lyrics to a construction like { << \soprano \barLiner >> }.
> How would it know to use only the \soprano line?
>
> Cheers,
> David.
>
>

Reply via email to