Folks,
in my quest to maybe get rid of the recommendations of "\skip 1" for
lyrics in the NR I stumbled upon the following example in
http://lilypond.org/doc/v2.23/Documentation/notation/techniques-specific-to-lyrics.html:
% If you wish to show extenders and hyphens into and out
% of alternative sections these must be inserted manually.
\version "2.23.4"
\relative {
\time 2/4
\repeat volta 2 { b'4 b ~}
\alternative {
\volta 1 { b b }
\volta 2 { b \repeatTie c }
}
c4 c
}
\addlyrics {
Here's a __ verse.
\repeat unfold 2 { \skip 1 } % btw: why this line?
}
\addlyrics {
Here's "a_"
\skip 1
"_" sec -- ond one.
}
(I simplified the input code a bit - which I actually also would like
to propose for the NR -, but the gist of the original example remains
unchanged.)
Now this looks kind-of decent in the NR, but once you issue
ragged-last = ##f, the limits of that hack show clearly (see attached
image). And there should be a difference between a LyricExtender and
an underscore as part of literal lyrics.
Of course the problem is exacerbated if the second alternative extends
the melisma with multiple notes.
The best I could come up with is:
\relative {
\time 2/4
\repeat volta 2 { b'4 b ~}
\alternative {
\volta 1 { b b }
\volta 2 { b \repeatTie c }
}
c4 c
}
\addlyrics {
Here's a __ verse.
}
\addlyrics {
Here's \set ignoreMelismata = ##t a __
"" "" \set ignoreMelismata = ##f
\markup\null __ sec -- ond one.
% \markup\null doesn't kill melismata,
% in contrast to ""
}
This has the advantage of being more-or-less semantically correct
input, and it works with longer melismata:
\relative {
\time 2/4
\repeat volta 2 { b'4 b( | c8 b a g | }
\alternative {
\volta 1 { b4) b }
\volta 2 {
\shape #'((-3 . 0) (-2 . 0) (-1 . 0) (0 . 0)) Slur
a8( b c b) | }
}
a8 g g4
}
\addlyrics {
Here's a __ verse.
}
\addlyrics {
Here's \set ignoreMelismata = ##t a __ _ _ _ _
"" ""
\set ignoreMelismata = ##f \markup\null __ sec -- ond one.
}
Does anybody see a better solution that might be good enough for the NR?