bug-lilypond
[Top][All Lists]
Advanced

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

Vertical alignment bug - Instrument_name_engraver


From: Daniel Johnson
Subject: Vertical alignment bug - Instrument_name_engraver
Date: Fri, 14 Oct 2005 11:58:22 -0700
User-agent: Mozilla Thunderbird 1.0.7 (X11/20051002)

Instrument_name_engraver has a problem calculating the correct Y-extent to which it applies, when it is applied to a staff-group rather than a single staff, and the bottom staff has lyrics attached to it. It calculates the Y-extent as being from the top staff to the bottom of the lyrics on the bottom staff. Consider the following snippet:

%%% BEGIN LILYPOND CODE %%%
\version "2.6.3" %Also tested with 2.7.12

\paper { raggedright = ##t }

text = \lyricmode { La La La }

\score {
   <<
       \context ChoirStaff <<
           \context Staff = highVoices {
               \set Staff.instrument = "Soprano"
               \set Staff.instr = "S"
               \context Voice = sop {c'1 \break c'1 c'1}
           }
           \context Lyrics = sop \lyricsto sop \text
\context InnerChoirStaff = lowVoices \with {\consists "Instrument_name_engraver"} {
               \set InnerChoirStaff.instrument = "Bass"
               \set InnerChoirStaff.instr = "B"
               <<
                   \context Staff = baritone {
                       \clef bass
                       \context Voice = bari { g1 a1 g1 }
                   }
                   \context Lyrics = bari \lyricsto bari \text
                   \context Staff = bass {
                       \clef bass
                       \context Voice = bass { c1 f1 c1 }
                   }
                   \context Lyrics = bass \lyricsto bass \text
               >>
           }
       >>
   >>
}
%%% END LILYPOND CODE %%%

The output of this snippet (using 2.6.3) is here:
http://www.theologian.org/ly/inner-choir-staff.png
As you can see, the InnerChoirStaff instrument name (and its abbreviation) are shifted down to compensate for the presence of lyrics below the bottom staff. Remove the bass lyrics, and everything looks normal.

I tried this using 2.7.12, and it repeated the incorrect output, except that it also mysteriously omitted the lyrics to both low parts on the first line (it picked them up on the second). Lyrics to the soprano part remained correct.

As an aside, it seems to me that the use of an InnerChoirStaff is to indicate a subdivision of voices (primarily choral, but could be used to indicate 1st vs. 2nd violins, etc). The standard in choral music is to include a small simple square-bracket outside the choir bracket. I have placed an example here:
http://www.theologian.org/ly/inner-choir-staff-delim.png
How much work and how many euros would it take to implement this? My ship may finally be coming in and I just might have a Lilypond category in my budget.

--Daniel




reply via email to

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