]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/using-marklines-in-a-frenched-score.ly
Add '-dcrop' option to ps and svg backends
[lilypond.git] / Documentation / snippets / using-marklines-in-a-frenched-score.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.19.48
8 \version "2.19.48"
9 \header {
10   lsrtags = "contexts-and-engravers, staff-notation"
11   texidoc = "
12 Using @code{MarkLine} contexts (such as in
13 @uref{http://lsr.di.unimi.it/LSR/Item?id=1010, LSR1010}) in a
14 Frenched score can be problematic if all the staves between two
15 @code{MarkLine}s are removed in one system. The
16 @code{Keep_alive_together_engraver} can be used within each
17 @code{StaffGroup} to keep the @code{MarkLine} alive only as long
18 as the other staves in the group stay alive.
19 "
20   doctitle = "Using marklines in a Frenched score"
21 } % begin verbatim
22
23 bars = {
24   \tempo "Allegro" 4=120
25   s1*2
26   \repeat unfold 5 { \mark \default s1*2 }
27   \bar "||"
28   \tempo "Adagio" 4=40
29   s1*2
30   \repeat unfold 8 { \mark \default s1*2 }
31   \bar "|."
32 }
33 winds = \repeat unfold 120 { c''4 }
34 trumpet = { \repeat unfold 8 g'2 R1*16 \repeat unfold 4 g'2 R1*8 }
35 trombone = { \repeat unfold 4 c'1 R1*8 d'1 R1*17 }
36 strings = \repeat unfold 240 { c''8 }
37
38 #(set-global-staff-size 16)
39 \paper {
40   systems-per-page = 5
41   ragged-last-bottom = ##f
42 }
43
44 \layout {
45   indent = 15\mm
46   short-indent = 5\mm
47   \context {
48     \name MarkLine
49     \type Engraver_group
50     \consists Output_property_engraver
51     \consists Axis_group_engraver
52     \consists Mark_engraver
53     \consists Metronome_mark_engraver
54     \override VerticalAxisGroup.remove-empty = ##t
55     \override VerticalAxisGroup.remove-layer = #'any
56     \override VerticalAxisGroup.staff-affinity = #DOWN
57     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing.basic-distance = 1
58     keepAliveInterfaces = #'()
59   }
60   \context {
61     \Staff
62     \override VerticalAxisGroup.remove-empty = ##t
63     \override VerticalAxisGroup.remove-layer = ##f
64   }
65   \context {
66     \StaffGroup
67     \accepts MarkLine
68     \consists Keep_alive_together_engraver
69   }
70   \context {
71     \Score
72     \remove Mark_engraver
73     \remove Metronome_mark_engraver
74   }
75 }
76
77 \score {
78   <<
79     \new StaffGroup = "winds" \with {
80       instrumentName = "Winds"
81       shortInstrumentName = "Winds"
82     } <<
83       \new MarkLine \bars
84       \new Staff \winds
85     >>
86     \new StaffGroup = "brass" <<
87       \new MarkLine \bars
88       \new Staff = "trumpet" \with {
89         instrumentName = "Trumpet"
90         shortInstrumentName = "Tpt"
91       } \trumpet
92       \new Staff = "trombone" \with {
93         instrumentName = "Trombone"
94         shortInstrumentName = "Tbn"
95       } \trombone
96     >>
97     \new StaffGroup = "strings" \with {
98       instrumentName = "Strings"
99       shortInstrumentName = "Strings"
100     } <<
101       \new MarkLine \bars
102       \new Staff = "strings" { \strings }
103     >>
104   >>
105 }