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