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