lilypond-user
[Top][All Lists]
Advanced

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

parts sharing a staff


From: Shevek
Subject: parts sharing a staff
Date: Thu, 15 Jun 2017 16:29:26 -0700 (MST)

I often run into situations where two parts share a staff some of the time
and have individual staffs the rest of the time. The way I handle it is like
this (including only relevant details):

\new StaffGroup \with {
  instrumentName = "Flute  "
  shortInstrumentName = "Fl."
} <<
  \new Staff = "Fl1" \with {
    instrumentName = \markup\column { "1" "2" }
    shortInstrumentName = \markup\column { "1" "2" }
  } << \global \partcombine \fluteI \fluteII >>
  \new Staff = "Fl2" \with {
    instrumentName = \markup\column { "1" "2" }
    shortInstrumentName = \markup\column { "1" "2" }
    \override VerticalAxisGroup.remove-empty = ##t
    \override VerticalAxisGroup.remove-first = ##t
  } << \global >>
>>
    
fluteI {
  \tag #'score {
    \partcombineApart
    \oneVoice
  }
  % music....
}
    
fluteII = {
  \tag #'score {
    \change Staff = "Fl2"
    \oneVoice
  }
  % music....
}

I use \partcombineApart with the second part \change'd to the second staff
as the default setting, and use \partcombineChords or \partcombineUnisono
when appropriate, since those pull the second part into the top staff
without needing to write \change Staff.

First, I thought this might just be of interest to others who deal with a
similar scenario. Are you using a similar technique, or do you have a better
approach?

Second, this strategy leads to the necessity of manually writing \set
Staff.shortInstrumentName = "1" whenever the second staff is visible, and
back again to \column { "1" "2" } whenever the second staff is hidden. Since
that depends on system breaking, which changes as I compose, getting the
correct labels in the left margin is a continual source of tedious manual
bugfixing.

What I'd really like is to be able to write some function or engraver that
checks whether the second staff is visible or hidden on that system, and
changes the shortInstrumentName on the top staff back and forth accordingly.
How feasible would such a project be? If it is feasible, how could I begin
to approach it?



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/parts-sharing-a-staff-tp203873.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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