Update: Solution
Following the accepted answer below, the trick is:
- to use
VerticalAxisGroup.remove-layer
for each of the doubling part's staves, - and the
Keep_alive_together_engraver
for the staff group:
Updated Code
\version "2.21.0"
piccoloOne = {
\new Staff = "piccolo-one" {
\set Staff.instrumentName = "Piccolo 1"
\set Staff.shortInstrumentName = "Picc. 1"
\set Staff.midiInstrument = #"piccolo"
\transposition c''
% 1
fis''1~ | fis''1~ |
% 3
fis''1 |
}
}
fluteOne = {
\new Staff {
\set Staff.instrumentName = "Flute 1"
\set Staff.shortInstrumentName = "Fl. 1"
\set Staff.midiInstrument = #"flute"
\transposition c'
% 1
b'1~ | b'1~ |
% 3
b'1 |
}
}
fluteTwoDoublingPiccoloTwo = {
\new Staff
\with { \override VerticalAxisGroup.remove-layer = 2 } {
\set Staff.instrumentName = "Flute 2"
\set Staff.shortInstrumentName = "Fl. 2"
\set Staff.midiInstrument = #"flute"
\transposition c'
% 1
d'1 | R1^\markup{"muta in Picc. 2"} | \break
}
% MUTA
\new Staff
\with { \override VerticalAxisGroup.remove-layer = 1 } {
\set Staff.alignBelowContext = #"piccolo-one"
\set Staff.shortInstrumentName = "Picc. 2"
\set Staff.midiInstrument = #"piccolo"
\transposition c''
\once\override Staff.TimeSignature #'stencil = ##f
% 3
d''1~ |
}
}
\score {
\new StaffGroup
\with { \consists "Keep_alive_together_engraver" } {
<<
\piccoloOne
\fluteOne
\fluteTwoDoublingPiccoloTwo
>>
}
\layout {
indent = 20
short-indent = 10
}
\midi { }
}