When trying to create an ossia Staff
, that is used multiple times, above a PianoStaff
, Lilypond does not reuse the context, but creates a new one. How can I tell Lilypond to find the existing context outside the PianoStaff
?
\version "2.20.0"
<<
\new Staff = "ossia" \with {
\remove "Time_signature_engraver"
\remove "Clef_engraver"
fontSize = #-3
\override StaffSymbol.staff-space = #(magstep -3)
\override StaffSymbol.thickness = #(magstep -3)
%alignAboveContext = "left"
}
{ \stopStaff s1*5 }
%\new PianoStaff = "piano" \with { instrumentName = "Piano" } % <<< if I add this, it does not find the context anymore
<<
\new Staff = "right" \relative {
c'4 b c2
<<
{ e4 f }
\context Staff = "ossia" {
\startStaff e4 e8 f \stopStaff
}
>> e2
g4 a g2
<<
{ g4 a }
\context Staff = "ossia" {
%\change Staff = "ossia"
\startStaff g4 e8 f \stopStaff
%\change Staff = "right"
}
>> g2
e4 d c2
}
\new Staff = "left" \relative { \clef F c1 c c c c }
>>
>>
Note: I also tried to add the ossia Staff
inside the PianoStaff
: that works for the ossia staff, but it centers the name of the instument wrongly:
\override Staff.InstrumentName.extra-offset = ...
, or whatever property will give you the spacing you want.