[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ChoirStaff with Instrument_name_engraver bug
From: |
Daniel Johnson |
Subject: |
ChoirStaff with Instrument_name_engraver bug |
Date: |
Fri, 05 Jan 2007 23:07:18 -0800 |
User-agent: |
Thunderbird 2.0b1 (X11/20061219) |
When the Instrument_name_engraver is added to a ChoirStaff, GrandStaff
or StaffGroup, and that composite-staff contains child Lyrics contexts,
those Lyric contexts inherit the instrumentName (and
shortInstrumentName) from the parent context; so, for example, if a
ChoirStaff contains two Lyrics children, the instrumentName will print
three times (once for the ChoirStaff and once each for the Lyrics). The
following example illustrates this. To avoid this, the
Instrument_name_engraver must be explicitly removed from the Lyrics context.
%%% BEGIN LILYPOND CODE %%%
\version "2.10.9"
trbText = \lyricmode { Foo }
tenText = \lyricmode { Bar }
basText = \lyricmode { Baz }
\score {
<<
\new ChoirStaff
<<
\new Staff = trbVoxStaff { \context Voice = trbVoice { <c''
e'>1 } }
\new Lyrics = trbLyrics { s2. }
\new Staff = tenVoxStaff { \context Voice = tenVoice { \clef
"G_8" g1 } }
\new Lyrics = tenLyrics { s2. }
\new Staff = basVoxStaff { \context Voice = basVoice { \clef
bass c1 } }
>>
\context Lyrics = trbLyrics \lyricsto trbVoice \trbText
\context Lyrics = tenLyrics \lyricsto tenVoice \tenText
\lyricsto basVoice \new Lyrics \basText
>>
\layout
{
\context {
\ChoirStaff
\consists Instrument_name_engraver
instrumentName = "Coro"
}
% Uncomment the following line to fix the problem
%\context { \Lyrics \remove Instrument_name_engraver }
}
}
%%% END LILYPOND CODE %%%
- ChoirStaff with Instrument_name_engraver bug,
Daniel Johnson <=