Staff containers: Difference between revisions
Appearance
Import snippet from LSR |
m New category |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
In this preliminary test of a modern score, the staff lines are washed out temporarily. This is done by making a tuned <code>StaffContainer</code>, which <code>\skip</code>s some notes without printing lines either and creates a <code>\new Staff</code> then in order to create the lines again. (Be careful if you use this; it has been done by splitting the grouping <code>Axis_group_engraver</code> and creating functionality into separate contexts, but the clefs and time signatures may not do what you would expect.) | In this preliminary test of a modern score, the staff lines are washed out temporarily. This is done by making a tuned <code>StaffContainer</code>, which <code>\skip</code>s some notes without printing lines either and creates a <code>\new Staff</code> then in order to create the lines again. (Be careful if you use this; it has been done by splitting the grouping <code>Axis_group_engraver</code> and creating functionality into separate contexts, but the clefs and time signatures may not do what you would expect.) | ||
<lilypond version="2.24 | <lilypond version="2.24"> | ||
%% http://lsr.di.unimi.it/LSR/Item?id=138 | %% http://lsr.di.unimi.it/LSR/Item?id=138 | ||
| Line 55: | Line 55: | ||
[[Category:Contexts and engravers]] | [[Category:Contexts and engravers]] | ||
[[Category:Specific notation]] | [[Category:Specific notation]] | ||
[[Category:Snippet]] | |||
Latest revision as of 23:33, 21 November 2025
In this preliminary test of a modern score, the staff lines are washed out temporarily. This is done by making a tuned StaffContainer, which \skips some notes without printing lines either and creates a \new Staff then in order to create the lines again. (Be careful if you use this; it has been done by splitting the grouping Axis_group_engraver and creating functionality into separate contexts, but the clefs and time signatures may not do what you would expect.)
\version "2.24"
%% http://lsr.di.unimi.it/LSR/Item?id=138
\score {
\relative c'' <<
\new StaffContainer {
%% need << >>, otherwise we descend to the voice inside SA
<< \new Staff { c4 c4 } >>
\skip 4 % s4 would create staff.
<< \new Staff { b4 b4 } >>
}
\new StaffContainer {
\skip 4
<< \context Staff { e d f \bar ":|." } >>
\skip 4
}
>>
\layout {
\context {
\Score
\accepts StaffContainer
\denies Staff
}
\context {
\type Engraver_group
\consists "Clef_engraver"
\consists "Time_signature_engraver"
\consists "Separating_line_group_engraver"
\consists "Axis_group_engraver"
\accepts "Staff"
\defaultchild "Staff"
\name StaffContainer
}
\context {
\Staff
\remove "Axis_group_engraver"
\remove "Separating_line_group_engraver"
\remove "Clef_engraver"
\remove "Time_signature_engraver"
}
}
}