]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/engravers-one-by-one.ly
Fix makelsr.py and update LSR
[lilypond.git] / input / lsr / engravers-one-by-one.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 %% Tags: contexts-and-engravers
4 \version "2.11.35"
5
6 \header { texidoc = "
7 The notation problem, creating a certain symbol, is handled by plugins.
8 Each plugin is called an Engraver. In this example, engravers are
9 switched on one by one, in the following order:
10
11 - note heads
12
13
14 - staff symbol,
15
16
17 - clef,
18
19
20 - stem,
21
22
23 - beams, slurs, accents,
24
25
26 - accidentals, bar lines, time signature, and key signature.
27
28
29
30 Engravers are grouped. For example, note heads, slurs, beams etc. form
31 a Voice context. Engravers for key, accidental, bar, etc. form a Staff
32 context.
33
34
35 You may only see the first example in this document; please download
36 this snippet and run it from your own computer. 
37 " }
38 % begin verbatim
39 %% sample music
40 topVoice =  \relative c' {
41   \key d\major
42   es8([ g] a[ fis])
43   b4
44   b16[-. b-. b-. cis-.]
45   d4->
46 }
47
48 botVoice =  \relative c' {
49   \key d\major
50   c8[( f] b[ a)]
51   es4
52   es16[-. es-. es-. fis-.]
53   b4->
54 }
55
56 hoom =  \relative c {
57   \key d \major
58   \clef bass
59   g8-. r
60   r4 
61   fis8-.
62   r8
63   r4
64   b'4->
65 }
66
67 pah =  \relative c' {
68   r8 b-.
69   r4
70   r8 g8-.
71   r16 g-. r8
72   \clef treble
73   fis'4->
74 }
75
76 %
77 % setup for Request->Element conversion. Guru-only
78 %
79
80 MyStaff =\context {
81   \type "Engraver_group"
82   \name Staff
83
84   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
85 @code{Voice} contexts."
86
87   
88   \consists "Output_property_engraver"  
89   
90   \consists "Font_size_engraver"
91
92   \consists "Volta_engraver"
93   \consists "Separating_line_group_engraver"    
94   \consists "Dot_column_engraver"
95
96   \consists "Ottava_spanner_engraver"
97   \consists "Rest_collision_engraver"
98   \consists "Piano_pedal_engraver"
99   \consists "Piano_pedal_align_engraver"
100   \consists "Instrument_name_engraver"
101   \consists "Grob_pq_engraver"
102   \consists "Forbid_line_break_engraver"
103   \consists "Axis_group_engraver"
104
105   \consists "Pitch_squash_engraver"
106
107   \override VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 6)
108   extraVerticalExtent = ##f
109   verticalExtent = ##f 
110   localKeySignature = #'()
111
112                                 % explicitly set instrument, so we don't get 
113                                 % weird effects when doing instrument names for
114                                 % piano staves
115
116   instrumentName = #'()
117   shortInstrumentName = #'()
118   
119   \accepts "Voice"
120 }
121
122
123 MyVoice = \context {
124   \type "Engraver_group"
125   \name Voice
126
127   \description "
128     Corresponds to a voice on a staff.  This context handles the
129     conversion of dynamic signs, stems, beams, super- and subscripts,
130     slurs, ties, and rests.
131
132     You have to instantiate this explicitly if you want to have
133     multiple voices on the same staff."
134
135   localKeySignature = #'()
136   \consists "Font_size_engraver"
137   
138                                 % must come before all
139   \consists "Output_property_engraver"  
140   \consists "Arpeggio_engraver"
141   \consists "Multi_measure_rest_engraver"
142   \consists "Text_spanner_engraver"
143   \consists "Grob_pq_engraver"
144   \consists "Note_head_line_engraver"
145   \consists "Glissando_engraver"
146   \consists "Ligature_bracket_engraver"
147   \consists "Breathing_sign_engraver"
148                                 % \consists "Rest_engraver"
149   \consists "Grace_beam_engraver"
150   \consists "New_fingering_engraver"
151   \consists "Chord_tremolo_engraver"
152   \consists "Percent_repeat_engraver"
153   \consists "Slash_repeat_engraver"
154
155 %{
156   Must come before text_engraver, but after note_column engraver.
157
158 %}
159   \consists "Text_engraver"
160   \consists "Dynamic_engraver"
161   \consists "Fingering_engraver"
162
163   \consists "Script_column_engraver"
164   \consists "Rhythmic_column_engraver"
165   \consists "Cluster_spanner_engraver"
166   \consists "Tie_engraver"
167   \consists "Tie_engraver"
168   \consists "Tuplet_engraver"
169   \consists "Note_heads_engraver"
170   \consists "Rest_engraver"
171
172   \consists "Skip_event_swallow_translator"
173 }
174
175
176 \score {
177   \topVoice
178   \layout {
179     \context { \MyStaff }
180     \context { \MyVoice }
181   }
182 }
183
184
185 MyStaff = \context {
186     \MyStaff
187     \consists "Staff_symbol_engraver"
188 }
189
190 \score {
191   \topVoice
192   \layout {
193       \context { \MyStaff }
194       \context { \MyVoice }
195             }
196 }
197
198 MyStaff = \context {
199     \MyStaff
200     \consists "Clef_engraver"
201     \remove "Pitch_squash_engraver"
202 }
203
204 \score {
205   \topVoice
206   \layout {
207     \context { \MyStaff }
208     \context { \MyVoice }
209   }
210 }
211
212 MyVoice = \context {
213   \MyVoice
214   \consists "Stem_engraver"
215 }
216
217 \score {
218   \topVoice
219   \layout {
220     \context { \MyStaff }
221     \context { \MyVoice }
222   }
223 }
224
225 MyVoice = \context {
226   \MyVoice
227   \consists "Beam_engraver"
228 }
229
230 \score {
231   \topVoice
232   \layout {
233     \context { \MyStaff }
234     \context { \MyVoice }
235   }
236 }
237
238 MyVoice= \context {
239   \MyVoice
240   \consists "Phrasing_slur_engraver"
241   \consists "Slur_engraver"
242   \consists "Script_engraver"
243 }
244
245
246 \score {
247   \topVoice
248   \layout {
249     \context { \MyStaff }
250     \context { \MyVoice }
251   }
252 }
253
254 MyStaff = \context {
255   \MyStaff
256   \consists "Bar_engraver"
257   \consists "Time_signature_engraver"
258 }
259
260 \score {
261   \topVoice
262   \layout {
263     \context { \MyStaff }
264     \context { \MyVoice }
265   }
266 }
267
268 MyStaff = \context {
269   \MyStaff
270   \consists "Accidental_engraver"    
271   \consists "Key_engraver"
272 }
273 \score {
274   \topVoice
275   \layout {
276     \context { \MyStaff }
277     \context { \MyVoice }
278   }
279 }
280