Dear list,

I ran into a situation where using the Keep_alive_together_engraver, with VerticalAxisGroup.remove-layer settings, gives unexpected results in horizontal spacing for a Dynamics context with \accept-ed Lyrics. I very much want to use this configuration, and have correct horizontal spacing.

The attached pdf (v.2.19.83) shows an upper score without either Keep_alive_together_engraver or remove-layer settings, which gives expected (correct) horizontal spacing. The lower score shows that, for Keep_alive_together_engraver and remove-layer settings, the horizontal spacing of the notes is (incorrectly) expanded to fit the lyrics syllables to one note.

What setting can I apply to get correct horizontal spacing in the second case? Or, if this is a bug, is there a workaround (which should work in scores with multiple MarkLines and tens of instrument staves)?

Rationale: I use this Lyrics tric in my MarkLines to create a spanner with the spanner elements at specific times, and also at a fixed vertical offset. I cannot use David Nalesnik's textSpannerInnerTexts because their spacing of the words doesn't depend on the musical time. I cannot use multiple TextSpanners, because (at least in parts with few or no notes) the vertical offset of the texts is not constant: I saw situations where they are stacked 3 high.

Greetings,

Rutger
\version "2.19.83"

\paper {
    indent = 40
}

tempi = {
    \time 12/8
    
    s1. |
    \new Lyrics \with {
        \override LyricText.self-alignment-X = #LEFT
    } \lyricmode {
        "poco rit."4. -- accel. -- rit.2. -- "A tempo (tempo III)"4.*0
    }
    s1.*1 |
}

notes = {
    \repeat unfold 24 c''8 |
    \break
    \repeat unfold 24 c''8 |
}

\score {
    <<
        \new GrandStaff <<
            \new Dynamics \with {
                \accepts Lyrics
            } \tempi
            \new Staff \with {
                instrumentName = "No K_a_t_engraver"
            } <<
                \notes
            >>
        >>
    >>
}

\score {
    <<
        \new GrandStaff \with {
            \consists Keep_alive_together_engraver
        } <<
            \new Dynamics \with {
                \accepts Lyrics
            } \tempi
            \new Staff = staff \with {
                instrumentName = "K_a_t_engraver (r=80)"
                \override VerticalAxisGroup.remove-layer = #80
            } <<
                \notes
            >>
            \new Staff = staff \with {
                instrumentName = "K_a_t_engraver (r=20)"
                \override VerticalAxisGroup.remove-layer = #20
            } <<
                \notes
            >>
        >>
    >>
}

Attachment: timed-spanner.pdf
Description: timed-spanner.pdf

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to