summaryrefslogtreecommitdiff
path: root/Documentation/snippets/new/using-marklines-in-a-frenched-score.ly
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/snippets/new/using-marklines-in-a-frenched-score.ly')
-rw-r--r--Documentation/snippets/new/using-marklines-in-a-frenched-score.ly97
1 files changed, 97 insertions, 0 deletions
diff --git a/Documentation/snippets/new/using-marklines-in-a-frenched-score.ly b/Documentation/snippets/new/using-marklines-in-a-frenched-score.ly
new file mode 100644
index 0000000000..0fdefc9138
--- /dev/null
+++ b/Documentation/snippets/new/using-marklines-in-a-frenched-score.ly
@@ -0,0 +1,97 @@
+\version "2.19.48"
+\header {
+ lsrtags = "contexts-and-engravers, staff-notation"
+ texidoc = "
+Using @{MarkLine} contexts (such as in
+@uref{http://lsr.di.unimi.it/LSR/Item?id=1010, LSR1010}) in a
+Frenched score can be problematic if all the staves between two
+@code{MarkLine}s are removed in one system. The
+@code{Keep_alive_together_engraver} can be used within each
+@code{StaffGroup} to keep the @code{MarkLine} alive only as long
+as the other staves in the group stay alive.
+"
+ doctitle = "Using marklines in a Frenched score"
+}
+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
+ \override VerticalAxisGroup.remove-empty = ##t
+ \override VerticalAxisGroup.remove-layer = #'any
+ \override VerticalAxisGroup.staff-affinity = #DOWN
+ \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = 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
+ }
+}
+
+\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 }
+ >>
+ >>
+}