Brian Lenth <[email protected]> writes:
> it should be part of a StaffGroup with the main Violin I staff (with a
> square bracket, barlines going through both staves, and, at the
> beginning of each system, an instrument name markup that is centered
> on the two staves). Then when the solo is over it should disappear,
> leaving only a single violin I staff with no bracket. This is all
> within a larger score containing other string section parts, possibly
> with their own temporary staves at the same time.
>
> I'm having trouble achieving this. The automatic behavior of a new
> staff is to go below, so from the Notation Manual I got
> "AlignAboveContext". This works when it's just a Staff, but doesn't do
> anything when it's a StaffGroup, which is what I need.
What? The Staff should be part of a StaffGroup and should go above the
StaffGroup? That is nonsensical. You don't need that additional stuff
to go _above_ the StaffGroup that _contains_ it. You need it to go
above the _Staff_ that is there.
To change your example accordingly:
\version "2.24.1"
global = {
\tempo 4 = 116
\time 4/4
s1*21
\bar "|."
}
violinIPart = \relative c'' {
\clef treble
\compressEmptyMeasures
f4 g a g |
\repeat unfold 6 { f g a g } | \break
\repeat unfold 7 { g a b g } | \break
<<
{
<>^"All others" \repeat unfold 7 { e a b a }
}
\new Staff \with {
alignAboveContext = "VnI"
\remove Time_signature_engraver
\magnifyStaff #3/4
} {
<>^"Solo - should be above the other staff" \repeat unfold 7 { c2 d }
}
>>
\break
\repeat unfold 7 { f,4 d f d }
}
\score {
\new StaffGroup \with {
instrumentName = #"Violin I "
} \new Staff = "VnI"
{ << \global \violinIPart >> }
\layout { }
}
--
David Kastrup