Dear all,

an update to my previous bug report.

First, I attach a slightly simplified and enhanced test case, including lyrics attached to ChordNames, TabStaff and FiguredBass. The latter does not work. I guess that's reasonable, because there is little point to have a FiguredBass without a companion Staff; on the other hand, I'm not sure if it points to a structural deficiency of the association algorithm, because AFAICS the FiguredBass is probably not that different from a ChordNames context when it comes to alignment...

Second, w.r.t. ChoirStaves/GrandStaves/StaffGroups, I tried to find my way through the codebase and figure out why no extenders are created. Going over the get_voice_to_lyrics function in lily/lyric-engraver.cc, I eventually noticed that correct extenders are printed for lyrics assigned to Staff and one of the above contained groups *unless there is a ChordNames context.* (That's why the ChordNames lines are commented out in the attached file...)

Maybe those settings could be applied per default for lyrics assigned to container contexts once someone more knowledgeable than I can resolve the issue with ChordNames?


Cheers,
Alexander


On 2016-12-26 16:31, Alexander Kobel wrote:
Dear all,

since the advent of 2.19.50, it is possible to attach lyrics to
different contexts than just a voice:  "The \addlyrics function now
works with arbitrary contexts incuding Staff."
Indeed, for Staves, it works like a charm AFAICS.  However, when
attached to a ChoirStaff, GrandStaff or StaffGroup, no extenders are
generated.  (Nb: the *alignment* with notes / music columns works
perfectly fine, just the extender generation fails.)

Attached is a test case.  The lyrics lines for the three multi-staff
contexts should look like the single-staff line, as far as I can tell.


Best,
Alexander
\version "2.19.50"

\paper { ragged-last = ##f }

one = { b'8 4 8( 4) 4 }
two = { \autoBeamOff g'8 8 8 8~ 8[ 8] 8[ 8] }
fbass = \figuremode { \bassFigureExtendersOn <5 3>8 <5 3\!>8 <5 3> <5\! 3\!>8 <5 3>8 8 <5\! 3\!> <5 3> }

lyrChords = \lyricmode { Foo bar xyzzy. __ _ Foo! }
lyrOne = \lyricmode { Foo bar xyzzy. __ Foo! }
lyrTwo = \lyricmode { Foo bar __ _ xyzzy. __ Foo! __ }
commonLyr = \lyricmode {
  \set searchForVoice = ##f
  \set associatedVoiceContext = ##f
  \set associatedVoice = #""
  \set associatedVoiceType = #'Staff
  Foo bar __ _ xyzzy. __ _ Foo! __ _
}
lyrFbass = \lyricmode { Foo bar __ _ xyzzy. __ _ _ Foo! __ _ }
beats = \lyricmode { ^ ^ ^ ^ ^ ^ ^ }

\score {
  <<
    % \new ChordNames = "ChordNames" \one
    % \new Lyrics \lyricsto ChordNames = "ChordNames" { \set stanza = "ChordNames" \lyrChords }
    % \new Lyrics \lyricsto ChordNames = "ChordNames" \beats

    \new TabStaff = "TabStaff" \transpose c c, << \one \\ \two >>
    \new Lyrics \lyricsto TabStaff = "TabStaff" { \set stanza = "TabStaff" \commonLyr }
    \new Lyrics \lyricsto TabStaff = "TabStaff" \beats

    \new Staff = "staff" << \new Voice = "VoiceOne" { \voiceOne \one }
                            \new Voice = "VoiceTwo" { \voiceTwo \two } >>
    \new Lyrics \with { alignAboveContext = "staff" } \lyricsto "VoiceOne" { \set stanza = "1st Voice" \lyrOne }
    \new Lyrics \with { alignAboveContext = "staff" } \lyricsto "VoiceOne" { \beats }
    \new Lyrics \lyricsto "VoiceTwo" { \set stanza = "2nd Voice" \lyrTwo }
    \new Lyrics \lyricsto "VoiceTwo" \beats

    \new Staff = "Staff" << \one \\ \two >>
    \new Lyrics \lyricsto Staff = "Staff" { \set stanza = "Staff" \commonLyr }
    \new Lyrics \lyricsto Staff = "Staff" \beats

    \new ChoirStaff = "ChoirStaff" << \one \\ \two >>
    \new Lyrics \lyricsto ChoirStaff = "ChoirStaff" { \set stanza = "ChoirStaff" \commonLyr }
    \new Lyrics \lyricsto ChoirStaff = "ChoirStaff" \beats

    \new GrandStaff = "GrandStaff" << \one \\ \two >>
    \new Lyrics \lyricsto GrandStaff = "GrandStaff" { \set stanza = "GrandStaff" \commonLyr }
    \new Lyrics \lyricsto GrandStaff = "GrandStaff" \beats

    \new StaffGroup = "StaffGroup" << \one \\ \two >>
    \new Lyrics \lyricsto StaffGroup = "StaffGroup" { \set stanza = "StaffGroup" \commonLyr }
    \new Lyrics \lyricsto StaffGroup = "StaffGroup" \beats
    
    \new FiguredBass = "FiguredBass" \fbass
    % \new Lyrics \lyricsto FiguredBass = "FiguredBass" { \set stanza = "FiguredBass" \lyrFbass }
    % \new Lyrics \lyricsto FiguredBass = "FiguredBass" \beats
  >>
}
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to