At 18:02 on 19 Aug 2016, Mats Bengtsson wrote:
>I recently typeset a concerto grosso from the baroque period, where
>the solo and tutti parts are identical during long sections and then
>they differ for some bars, every here and there. When entering the
>parts, I used tags to handle the differences so producing the separate
>parts works without problem. However, in the conductors score, I would
>prefer to only use a single stave per instrument when the solo and
>tutti play in unison, but individual staves when they differ. I
>managed to handle this using remove-layer as long as there's only a
>single instrument group that contains and occasional solo part, but if
>for example both violin 1 and violin 2 have a solo plus a tutti, then
>I didn't manage to get it to work correctly. The following example
>shows my current attempt. As can be seen, the split between solo and
>tutti parts happens both for violin 1 and 2 as soon as one of them is
>split. For example, in the second score line, I would like to see Vi I
>solo, Vi I tutti but only one stave with Vi II.

Hi Mats,

How does the attached look to you? Note I have moved the
Keep_alive_together_engraver to the GrandStaff level so that the vln I
and vln II groups can work independently. The problem now is making the
system start braces cooperate.

-- 
Mark Knoop
\version "2.19.40"

viI = \relative c'' {
   \repeat unfold 8 { c4 d e d | }
   \tag #'viIsolo { \repeat unfold 4 { c16 d e f g f e d } }
   \tag #'viItutti { \repeat unfold 2 { c1 } }
   \repeat unfold 24 { c4 d e d | }
}

viII = \relative c' {
   \repeat unfold 16 { g4 c a b | }
   \tag #'viIIsolo { \repeat unfold 4 { g16 c e c g c e c } }
   \tag #'viIItutti { \repeat unfold 2 { g1 } }
   \repeat unfold 16 { g4 c a b | }
}

\paper {
   left-margin = 25\mm
}

\score {
  \new StaffGroup <<
    \new GrandStaff <<
      \new Staff = "vlnisolo" \with {
        instrumentName = #"Violin I solo"
        shortInstrumentName = "Vi I solo"
        \override VerticalAxisGroup.remove-empty = ##t
        \override VerticalAxisGroup.remove-first = ##t
        \override VerticalAxisGroup.remove-layer = 1
      }
      \pushToTag #'viIsolo \unset Staff.keepAliveInterfaces
      \appendToTag #'viIsolo \set Staff.keepAliveInterfaces = #'()
      \keepWithTag #'viIsolo { \set Staff.keepAliveInterfaces = #'() \viI }
      \new Staff = "vlni" \with {
        instrumentName = #"Violin I"
        shortInstrumentName = "Vi I"
        \override VerticalAxisGroup.remove-empty = ##t
        \override VerticalAxisGroup.remove-first = ##t
        \override VerticalAxisGroup.remove-layer = 1
      }
      \pushToTag #'viItutti \unset Staff.keepAliveInterfaces
      \appendToTag #'viItutti \set Staff.keepAliveInterfaces = #'()
      \keepWithTag #'viItutti { \set Staff.keepAliveInterfaces = #'() \viI }
      \new Staff = "vlnitutti" \with {
        instrumentName = #"Violin I tutti"
        shortInstrumentName = "Vi I tutti"
        \override VerticalAxisGroup.remove-layer = 2
      }
      \pushToTag #'viItutti \unset Staff.keepAliveInterfaces
      \appendToTag #'viItutti \set Staff.keepAliveInterfaces = #'()
      \keepWithTag #'viItutti { \set Staff.keepAliveInterfaces = #'() \viI }
    >>
    \new GrandStaff <<
      \new Staff = "vlniisolo" \with {
        instrumentName = #"Violin II solo"
        shortInstrumentName = "Vi II solo"
        alignBelowContext = "vlnisolo"
        \override VerticalAxisGroup.remove-empty = ##t
        \override VerticalAxisGroup.remove-first = ##t
        \override VerticalAxisGroup.remove-layer = 1
      }
      \pushToTag #'viIIsolo \unset Staff.keepAliveInterfaces
      \appendToTag #'viIIsolo \set Staff.keepAliveInterfaces = #'()
      \keepWithTag #'viIIsolo { \set Staff.keepAliveInterfaces = #'() \viII }
      \new Staff = "vlnii" \with {
        instrumentName = #"Violin II"
        shortInstrumentName = "Vi II"
        \override VerticalAxisGroup.remove-empty = ##t
        \override VerticalAxisGroup.remove-first = ##t
        \override VerticalAxisGroup.remove-layer = 1
      }
      \pushToTag #'viIItutti \unset Staff.keepAliveInterfaces
      \appendToTag #'viIItutti \set Staff.keepAliveInterfaces = #'()
      \keepWithTag #'viIItutti { \set Staff.keepAliveInterfaces = #'() \viII }
      \new Staff = "vlniitutti" \with {
        instrumentName = #"Violin II tutti"
        shortInstrumentName = "Vi II tutti"
        \override VerticalAxisGroup.remove-layer = 2
      }
      \pushToTag #'viIItutti \unset Staff.keepAliveInterfaces
      \appendToTag #'viIItutti \set Staff.keepAliveInterfaces = #'()
      \keepWithTag #'viIItutti { \set Staff.keepAliveInterfaces = #'() \viII }
    >>
  >>
  \layout {
    \context {
      \GrandStaff
      \consists Keep_alive_together_engraver
      \remove System_start_delimiter_engraver
    }
  }
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to