This is a follow-up question to this answer.

I have a melisma defined like so

  c'4. e8 g4 c a c8 a g2
\addlyrics {
  Al -- le Vö -- gel sind schon __ _ da,

which gives me this output:

enter image description here

I want to align the end of the melisma extender line with the last note of the melisma. It should look like this:

enter image description here

(The red line is only here for showing the alignment - I don't want such a line in the output.)

Is this possible, and if yes, how?

I want to do this not by tweaking magic numbers like in the linked answer, but in a way that is robust against spacing changes (like changing paper size or font size or minimum distance between notes or words, or adding manual breaks in the notes, etc.).

I found this in the LilyPond Internals Reference regarding spanner-interface:

Some objects are horizontally spanned between objects. For example, slurs, beams, ties, etc. These grobs form a subtype called Spanner. All spanners have two span points (these must be Item objects), one on the left and one on the right. The left bound is also the X reference point of the spanner.

Maybe I can set the right span point of the LyricExtender to some point of the (to-be-aligned) note? How?

  • I think this is not how Lilypond is meant to work. It will primarily arrange the nodes according to their length and only then try to fit the lyrics. The way your arrangement is designed, the space between the first and the second eighth note in the second bar is way to large compared to the space between the second eighth note and the half note at the end. Therefore, the only thing that might work would be to somehow rearrange the lyrics, but I currently cannot think of a good way to do this. At least not in this very example. Nov 4 at 2:28
  • There is \set lyricMelismaAlignment = #RIGHT and \unset lyricMelismaAlignment, but this seems not to work here, since it pushes both eighth notes to the right of the lyrics. But maybe this can be a starting point? Nov 4 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.