Here's my (rather tedious) suggestion for a workaround: so that the alternative 
starts with a note, not a rest, provide a note and hide it, then patch the rest 
in using another voice; the lyrics need a skip to avoid the dummy note.  It 
works (see below).



Paul


%%%%%%%%%%%%%%%%%%%%%%%%%



\version "2.25.10" 


music = \relative { 
   \time 4/4 
   \repeat volta 2 { 
      d'1 | 
      \alternative { 
         { d1 | } 
         { | << { \hideNotes d4 \unHideNotes } \new Voice { b'4\rest } >> d,2 
d4 | d1 } 
      } 
   } 
   \bar "|." 
} 


words = \lyricmode { 
   \repeat volta 2 { 
      a 
      \alternative { 
         { b } 
         { \skip1 c d e } 
      } 
   } 
} 


\score { 
   \new Staff << 
      \new Voice \music 
      \addlyrics \words 
   >> 
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



 From:   Kevin Pye <[email protected]> 
 To:   Michael Werner <[email protected]> 
 Cc:   Lilypond User <[email protected]> 
 Sent:   09/12/2023 21:14 
 Subject:   Re: Unexpected bar boundaries with volta repeats and lyrics. 



Thank you,



Unfortunately, in this case (the real score from which the example was 
extracted) I need the words to be repeated so I can unfold them for midi 
output. I'll just have to do the unfold manually.



Kevin.



On Sat, 9 Dec 2023, at 23:45, Michael Werner wrote:


Hi Kevin,




On Fri, Dec 8, 2023 at 11:31 PM Kevin Pye <[email protected]> wrote:





What silly mistake am I making here?



Not all that silly. Though the docs do talk about putting lyrics into the same 
repeat structure as the music, there's one detail in 
http://lilypond.org/doc/v2.25/Documentation/notation/lyrics-and-repeats that 
you may have missed:



"... when one of the \alternative blocks starts with a rest, a repeat construct 
cannot be used around the words"



Change the lyrics block to just



words = \lyricmode {


    a b c d e 

}



and it should behave itself a bit better for you.

--




Michael


Reply via email to