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