That's odd... shouldn't lilypond be aware of this overlap? Strangely, using
seven repetitions instead of four will produce a clean and expected result.
But if you add a break, the error comes back (check the tag forcingError).
The code below was tested through 2.24.4 and 2.25.20; their outputs were
the same.

%%Code starts
\version "2.24.4"
music = {
  <<
    \new Staff { \new Voice = "melody" {
        \relative {
          a'4 a a a
          \repeat volta 2 { % seven measures
            { \repeat unfold 7 { b4 b b b } }
            \alternative {
              \volta 1 {
                \tag #'four  { \repeat unfold 4 { c4 c c c } }
                \tag #'seven { \repeat unfold 7 { c4 c c c } }
              } % end of volta 1
              \volta 2 { d4 d d d }
          } % end alternative
         } % end repeat
        } % end relative
      } % end voice
    } % end staff
    \new Lyrics \lyricsto "melody" {
        Not re -- peat -- ed.
        <<
            { \repeat unfold 7 { This is pass one } }
            \new Lyrics { \set associatedVoice = "melody"
                \tag #'four { \repeat unfold 4 { This is pass two } }
                \tag #'seven { \repeat unfold 6 { This is pass two } }
            }
        >>
        { \repeat unfold 4 { Vol -- ta one hey!
             \tag #'forcingError { \volta #'(1) {\break} }
        }} % end unfold
        Now vol -- ta two!
    } % end lyrics
  >>
} % end of var music
\score {\keepWithTag #'four {\music}}
\score {\keepWithTag #'(seven) {\music}}
\score {\keepWithTag #'(seven forcingError) {\music}}
%%Code ends

Em sáb., 18 de out. de 2025 às 15:55, Kieren MacMillan <
[email protected]> escreveu:

> Hi Mats,
>
> > here is a fuller example of what I've come up with - it actually works
> unless there is a line break in the first alternative, then the text
> overlap with the lie above the alternative
>
> Even when there isn’t a break in the first alternative, the volta bracket
> overlaps the second pass text (at least when I compile it here).
>
> Below, I’ve included your snippet (using \repeat unfold constructs to
> compress the notes and lyrics for better MWE readability!), as well as
> another option that doesn’t cause collisions/overlaps with the volta
> brackets. (Note: I used \omit LyricText instead of skips, because I find it
> more intuitive to read.)
>
> Hope this helps!
> Kieren.
>
> %%%  SNIPPET BEGINS
> \version "2.25.24"
>
> \score {
>   <<
>     \new Staff {
>       \new Voice = "melody" {
>         \relative {
>           a'4 a a a
>           \repeat volta 2 {
>             \repeat unfold 7 { b4 b b b }
>           }
>           \alternative {
>             { \repeat unfold 4 { c4 c c c } }
>             { d4 d d d }
>           }
>         }
>       }
>     }
>     \new Lyrics {
>       \lyricsto "melody" {
>         Not re -- peat -- ed.
>         <<
>           { \repeat unfold 7 { This is pass one } }
>           \new Lyrics { \repeat unfold 7 { This is pass two } }
>         >>
>         {
>           Vol -- ta one A
>           Vol -- ta one B
>           Vol -- ta one C
>           Vol -- ta one D
>         }
>         { Vol -- ta two words }
>       }
>     }
>   >>
> }
>
>
> \score {
>   <<
>     \new Staff {
>       \new Voice = "melody" {
>         \relative {
>           a'4 a a a
>           \repeat volta 2 {
>             \repeat unfold 7 { b4 b b b }
>           }
>           \alternative {
>             { \repeat unfold 4 { c4 c c c } }
>             { d4 d d d }
>           }
>         }
>       }
>     }
>     \new Lyrics \lyricsto "melody" {
>       Not re -- peat -- ed.
>       { \repeat unfold 7 { This is pass one } }
>       {
>         Vol -- ta one A
>         Vol -- ta one B
>         Vol -- ta one C
>         Vol -- ta one D
>       }
>       { Vol -- ta two words }
>     }
>     \new Lyrics \lyricsto "melody" {
>       \omit LyricText Not re peat ed. \undo \omit LyricText
>       { \repeat unfold 7 { This is pass two } }
>     }
>   >>
> }
> %%%  SNIPPET ENDS
> __________________________________________________
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>
>

Reply via email to