lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unexpected ChoirStaff name behaviour with lyrics


From: Mark Pim
Subject: Unexpected ChoirStaff name behaviour with lyrics
Date: Fri, 15 Sep 2006 09:45:23 -0700 (PDT)

Hi there,
 
I've been experimenting with adding Instrument_name_engraver to ChoirStaff and thought I discovered a bug. Turns out it isn't so much a bug, but I thought my experiment could serve as a caveat to other users.
 
Basically if you have a ChoirStaff with lyrics below each vocal line (in particular below the *last* vocal line) and try to add an instrument name to the ChoirStaff (ChoirStaff.instrument = ... after putting \consists Instrument_name_engraver in the ChoirStaff context) then the ChoirStaff name will be positioned too low. This is because Lilypond seems to position an instrument name half way between the first and last contexts contained in a ChoirStaff (including Lyrics contexts), NOT halfway down the system bracket. You can solve the problem by moving the last Lyrics context out of the ChoirStaff:
 
\new ChoirStaff <<
    ...
    \new Lyrics ...
>>
 
becomes
 
\new ChoirStaff <<
    ...
>>
 \new Lyrics ...
 
There is a second problem in that the instrument name set in the ChoirStaff seems to filter down to the Lyrics contexts. I've solved this by setting Lyrics.instrument = " " but I imagine you could remove Instrument_name_engraver from Lyrics.
 
Mark
 
P.S. Here's my example file demonstrating these problems and solutions:
 
\version "2.8.6"
\score {
    << 
 \new StaffGroup <<
     \new ChoirStaff = "fine" \with {
  \consists Instrument_name_engraver
     } <<
  \set ChoirStaff.instrument = "Fine"
  \new Staff <<
      \set Staff.instrument = "1"
      { g4 g g g g g g g}
  >>
  \new Staff <<
      \set Staff.instrument = "2"
      { e4 e e e e e e e}
  >>
     >>
     \new ChoirStaff = "fails" \with {
  \consists Instrument_name_engraver
     } <<
  \set ChoirStaff.instrument = "Fails"
  \new Staff <<
      \set Staff.instrument = "1"
      { g4 g g g g g g g}
  >>
  \new Lyrics \lyricmode { This does not work like it should do }
  \new Staff <<
      \set Staff.instrument = "2"
      { e4 e e e e e e e}
  >>
     >>
     \new ChoirStaff = "improved" \with {
  \consists Instrument_name_engraver
     } <<
  \set ChoirStaff.instrument = "Improved"
  \new Staff <<
      \set Staff.instrument = "1"
      { g4 g g g g g g g}
  >>
  \new Lyrics \lyricmode { \set instrument = " " This does indeed work like it should do }
  \new Staff <<
      \set Staff.instrument = "2"
      { e4 e e e e e e e}
  >>
     >>
     \new ChoirStaff = "failsAgain" \with {
  \consists Instrument_name_engraver
     } <<
  \set ChoirStaff.instrument = "Fails Again"
  \new Staff <<
      \set Staff.instrument = "1"
      { g4 g g g g g g g}
  >>
  \new Lyrics \lyricmode { \set instrument = " " This does not work like it should do }
  \new Staff <<
      \set Staff.instrument = "2"
      { e4 e e e e e e e}
  >>
  \new Lyrics \lyricmode { \set instrument = " " This does not work like it should do }
     >>
     \new ChoirStaff = "fixed" \with {
  \consists Instrument_name_engraver
     } <<
  \set ChoirStaff.instrument = "Fixed"
  \new Staff <<
      \set Staff.instrument = "1"
      { g4 g g g g g g g}
  >>
  \new Lyrics \lyricmode { \set instrument = " " This does indeed work like it should do }
  \new Staff <<
      \set Staff.instrument = "2"
      { e4 e e e e e e e}
  >>
     >>
     \new Lyrics \lyricmode { \set instrument = " " This does indeed work like it should do }
 >>
    >>
}

reply via email to

[Prev in Thread] Current Thread [Next in Thread]