空の譜が省略された楽譜で MarkLine を使用する
空の譜が省略された楽譜 (Frenched score) で
MarkLine
コンテキスト
(LSR1010)
を使用すると、2 つの MarkLine
に挟まれた全ての譜が省略された場合に問題が生じます。StaffGroup
内で Keep_alive_together_engraver
を使用し、グループ内の譜のどれかが残っている場合にのみ MarkLine
を残しておくようにします。
bars = {
\tempo "Allegro" 4=120
s1*2
\repeat unfold 5 { \mark \default s1*2 }
\bar "||"
\tempo "Adagio" 4=40
s1*2
\repeat unfold 8 { \mark \default s1*2 }
\bar "|."
}
winds = \repeat unfold 120 { c''4 }
trumpet = { \repeat unfold 8 g'2 R1*16 \repeat unfold 4 g'2 R1*8 }
trombone = { \repeat unfold 4 c'1 R1*8 d'1 R1*17 }
strings = \repeat unfold 240 { c''8 }
#(set-global-staff-size 16)
\paper {
systems-per-page = 5
ragged-last-bottom = ##f
}
\layout {
indent = 15\mm
short-indent = 5\mm
\context {
\name MarkLine
\type Engraver_group
\consists Output_property_engraver
\consists Axis_group_engraver
\consists Mark_engraver
\consists Metronome_mark_engraver
\consists Staff_collecting_engraver
\override VerticalAxisGroup.remove-empty = ##t
\override VerticalAxisGroup.remove-layer = #'any
\override VerticalAxisGroup.staff-affinity = #DOWN
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = 1
keepAliveInterfaces = #'()
}
\context {
\Staff
\override VerticalAxisGroup.remove-empty = ##t
\override VerticalAxisGroup.remove-layer = ##f
}
\context {
\StaffGroup
\accepts MarkLine
\consists Keep_alive_together_engraver
}
\context {
\Score
\remove Mark_engraver
\remove Metronome_mark_engraver
\remove Staff_collecting_engraver
}
}
\score {
<<
\new StaffGroup = "winds" \with {
instrumentName = "Winds"
shortInstrumentName = "Winds"
} <<
\new MarkLine \bars
\new Staff \winds
>>
\new StaffGroup = "brass" <<
\new MarkLine \bars
\new Staff = "trumpet" \with {
instrumentName = "Trumpet"
shortInstrumentName = "Tpt"
} \trumpet
\new Staff = "trombone" \with {
instrumentName = "Trombone"
shortInstrumentName = "Tbn"
} \trombone
>>
\new StaffGroup = "strings" \with {
instrumentName = "Strings"
shortInstrumentName = "Strings"
} <<
\new MarkLine \bars
\new Staff = "strings" { \strings }
>>
>>
}