Back to the drawing board...
\set associatedVoice = #""
\set associatedVoiceType = #'Staff
seem to simply mean that the topmost context is chosen for associating the
lyrics with it. If there is a different rhythm there, the result is wrong again
- see the attached file. The previous version was only correct by accident.
ChordNames is nothing special (except that extenders do not seem to work on
ChordNames lyrics at all) - it's just that they typically are the topmost
context.
So, AFAICS, for lyrics assigned to a container context, the associated voice
search should be restricted to contexts within that container. Still too
unfamiliar with the internals of that hierarchy to know how I can modify that
search appropriately; still, get_voice_to_lyrics looks like a good starting
place to me...
Cheers,
Alexander
On 2017-01-02 18:52, Alexander Kobel wrote:
> Ahem, I hit "send" too early.
>
> On 2017-01-02 18:38, Alexander Kobel wrote:
>> 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 [container] groups *unless there is
>> a ChordNames context.* [...]
>
> when the following is added:
> % \set searchForVoice = ##f
> % \set associatedVoiceContext = ##f
> \set associatedVoice = #""
> \set associatedVoiceType = #'Staff
> as seen in the attached lyr-ctx.ly. And, on a second try, turns out that only
> the last two lines are required. Also, associatedVoice has to be the empty
> string, not just any non-existing value.
>
>
> Cheers,
> Alexander
>
> _______________________________________________
> bug-lilypond mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/bug-lilypond
\version "2.19.50"
\paper { ragged-last = ##f }
\layout {
\context { \ChoirStaff \override SystemStartBracket.collapse-height = ##f }
\context { \GrandStaff \override SystemStartBrace.collapse-height = ##f }
\context { \StaffGroup \override SystemStartBracket.collapse-height = ##f }
}
one = { b'8. 8.\noBeam 8( 4) 4 }
two = { \autoBeamOff g'8 8 8 8~ 8[ 8] 8[ 8] }
tabsOne = { b'8 4 8( 4) 4 }
tabsTwo = { g'16 8 8 8~ 8 8 8 8 16 }
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! }
lyrTabs = \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 = \repeat unfold 32 \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, << \tabsOne \\ \tabsTwo >>
\new Lyrics \lyricsto TabStaff = "TabStaff" { \set stanza = "TabStaff" \lyrTabs }
\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
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond