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