Rip _Mus <[email protected]> writes:

> Hello,
> please consider the following example:
>
> %%%
> \version "2.24.1"
>
> global = {
>   s1\break
>   s1\break
>   s1
> }
>
> flOne = \relative c' {
>   e1
>   r1
>   e1
> }
>
> flTwo = \relative c' {
>   c1
>   r1
>   c1
> }
>
> \new StaffGroup \with { shortInstrumentName = "Fl. 1-2" } <<
>   \new Staff \with {
>     instrumentName = "Flute 1"
>     shortInstrumentName = "Fl. 1"
>   } <<\global \flOne>>
>   \new Staff \with {
>     instrumentName = "Flute 2"
>     shortInstrumentName = "Fl. 2"
>   } <<\global \flTwo>>
>>>
> %%%
>
> I would like to have a condensation at the second bar (that is at the
> second system, where both instruments have a rest), showing only one staff.
> Regarding the names of the staves, when the two flutes are split, I would
> like to show the single names, while during the condensation I would like
> to show the name of the staffGroup

Sounds somewhat like

%%%
\version "2.24.1"

global = {
  s1\break
  s1\break
  s1
}

flOne = \relative c' {
  e1
  r1
  e1
}

flTwo = \relative c' {
  c1
  r1
  c1
}

\new StaffGroup \with { \consists "Keep_alive_together_engraver" }

<<
  \new Staff \with {
    \RemoveAllEmptyStaves
    \override VerticalAxisGroup.remove-layer = 1
    instrumentName = "Flute 1"
    shortInstrumentName = "Fl. 1"
  } <<\global \flOne>>
  \new Staff \with {
    \RemoveAllEmptyStaves
    \override VerticalAxisGroup.remove-layer = 1
    instrumentName = "Flute 2"
    shortInstrumentName = "Fl. 2"
  } <<\global \flTwo>>
  \new Staff \with {
    instrumentName = "Flutes"
    shortInstrumentName = "Fl. 1-2"
    \override VerticalAxisGroup.remove-layer = 2
  } \partCombine \flOne \flTwo
>>

-- 
David Kastrup

Reply via email to