Dear all,

I want to typeset a little hymn with two stanzas and a common chorus. Easy-peasy if the chorus begins after a line break, tedious tweaking otherwise. I am aware of

http://www.lilypond.org/doc/v2.17/Documentation/snippets/vocal-music#vocal-music-vertically-centered-common-lyrics
which uses manual Y-offsets for the chorus lyrics in their first line. This time, I'm in a situation where the LyricExtender of the first chorus line extends over the line break, and I need to give separate extra-Y-offset = #0 for the broken extender. Bah. Yes, I can and will figure out how to do it if necessary, but...

... isn't there a clean way to make a lyrics context (centered between two others) not to take any space where there are no lyrics? Like going hara-kiri and resurrecting when the lyrics start? Or making the surrounding lyrics commit suicide? Or fake an empty Y-extent in the common lyrics context until the lyrics actually start?

I tried some approaches (see attached file): "Stealing" the Y-extent seems to work, but as soon as I go "backtodefaults" (line 6), the original Y-extent-calculation seems to carry over to the entire line, IIUC. Trying to kill the Y-extent of the stanza lyrics after they end changes nothing, unfortunately.

Any ideas? I'm not sure at all if this is connected to the original question of the thread (removing an empty context), since AFAICS it only applies to entire lines of the context. A related discussion is, e.g., here
  http://lists.gnu.org/archive/html/lilypond-user/2013-08/msg00530.html
with a link to
  http://www.hymnary.org/page/fetch/WASH1957/264/low
which shows what I want to achieve; several other threads are around, but all of them end up with the recommendation of using the manual offset tweaking from the snippet.


TIA,
Alexander

<<attachment: lyrics.png>>

\version "2.17.96"

backtodefaults = {
  %% \override LyricText.extra-spacing-height = #'(0.2 . -0.2)
  %% \override LyricText.vertical-skylines = #grob::always-vertical-skylines-from-stencil
  \override LyricText.Y-extent = #grob::always-Y-extent-from-stencil
  %% \override VerticalAxisGroup.nonstaff-nonstaff-spacing =
  %% #'((basic-distance . 0)
  %%    (minimum-distance . 2.8)
  %%    (padding . 0.2)
  %%    (stretchability . 0))
}

lyrI = \lyricmode { Yes -- ter -- day ly -- rics spa -- cing still was far a -- way. }
lyrII = \lyricmode { Help! __ _ _ I need some -- bo -- dy! __ _ Help! __ _ _ }
lyrRef = \lyricmode { Now \backtodefaults it looks as if that's goin' to stay... Oh I be -- lieve in Li -- ly -- pond! }

mel = \relative c' { c8 c c2. | r4 c8 c c c c c | c8. c16 c2 r4 }
melRef = \relative c' { r4 c8 c c c c c | c4 c8 c4. c4 | c c c c | c c8 c4. r4 }

%% #(ly:set-option 'debug-skylines #t)
#(set-default-paper-size "a5")
\score {
  <<
    \new Staff = "staff" {
      \new Voice = "mel" \mel
      \new Voice = "melRef" \melRef
    }
    \new Lyrics = "lyrI" \lyricsto "mel" \lyrI
    \new Lyrics = "lyrRef" \with {
      %% \override LyricText.extra-spacing-height = #'(+inf.0 . -inf.0)
      %% \override LyricText.vertical-skylines = ##f
      \override LyricText.Y-extent = ##f
      %% \override VerticalAxisGroup.nonstaff-nonstaff-spacing = #'()
    } \lyricsto "melRef" \lyrRef
    \new Lyrics = "lyrII" \lyricsto "mel" \lyrII
  >>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to