]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/engravers-one-by-one.ly
Merge commit 'origin' into includes
[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.12.0"
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
75 %% sample music
76 topVoice =  \relative c' {
77   \key d\major
78   es8([ g] a[ fis])
79   b4
80   b16[-. b-. b-. cis-.]
81   d4->
82 }
83
84 botVoice =  \relative c' {
85   \key d\major
86   c8[( f] b[ a)]
87   es4
88   es16[-. es-. es-. fis-.]
89   b4->
90 }
91
92 hoom =  \relative c {
93   \key d \major
94   \clef bass
95   g8-. r
96   r4 
97   fis8-.
98   r8
99   r4
100   b'4->
101 }
102
103 pah =  \relative c' {
104   r8 b-.
105   r4
106   r8 g8-.
107   r16 g-. r8
108   \clef treble
109   fis'4->
110 }
111
112 %
113 % setup for Request->Element conversion. Guru-only
114 %
115
116 MyStaff =\context {
117   \type "Engraver_group"
118   \name Staff
119
120   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
121 @code{Voice} contexts."
122
123   
124   \consists "Output_property_engraver"  
125   
126   \consists "Font_size_engraver"
127
128   \consists "Volta_engraver"
129   \consists "Separating_line_group_engraver"    
130   \consists "Dot_column_engraver"
131
132   \consists "Ottava_spanner_engraver"
133   \consists "Rest_collision_engraver"
134   \consists "Piano_pedal_engraver"
135   \consists "Piano_pedal_align_engraver"
136   \consists "Instrument_name_engraver"
137   \consists "Grob_pq_engraver"
138   \consists "Forbid_line_break_engraver"
139   \consists "Axis_group_engraver"
140
141   \consists "Pitch_squash_engraver"
142
143   \override VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 6)
144   extraVerticalExtent = ##f
145   verticalExtent = ##f 
146   localKeySignature = #'()
147
148                                 % explicitly set instrument, so we don't get 
149                                 % weird effects when doing instrument names for
150                                 % piano staves
151
152   instrumentName = #'()
153   shortInstrumentName = #'()
154   
155   \accepts "Voice"
156 }
157
158
159 MyVoice = \context {
160   \type "Engraver_group"
161   \name Voice
162
163   \description "
164     Corresponds to a voice on a staff.  This context handles the
165     conversion of dynamic signs, stems, beams, super- and subscripts,
166     slurs, ties, and rests.
167
168     You have to instantiate this explicitly if you want to have
169     multiple voices on the same staff."
170
171   localKeySignature = #'()
172   \consists "Font_size_engraver"
173   
174                                 % must come before all
175   \consists "Output_property_engraver"  
176   \consists "Arpeggio_engraver"
177   \consists "Multi_measure_rest_engraver"
178   \consists "Text_spanner_engraver"
179   \consists "Grob_pq_engraver"
180   \consists "Note_head_line_engraver"
181   \consists "Glissando_engraver"
182   \consists "Ligature_bracket_engraver"
183   \consists "Breathing_sign_engraver"
184                                 % \consists "Rest_engraver"
185   \consists "Grace_beam_engraver"
186   \consists "New_fingering_engraver"
187   \consists "Chord_tremolo_engraver"
188   \consists "Percent_repeat_engraver"
189   \consists "Slash_repeat_engraver"
190
191 %{
192   Must come before text_engraver, but after note_column engraver.
193
194 %}
195   \consists "Text_engraver"
196   \consists "Dynamic_engraver"
197   \consists "Fingering_engraver"
198
199   \consists "Script_column_engraver"
200   \consists "Rhythmic_column_engraver"
201   \consists "Cluster_spanner_engraver"
202   \consists "Tie_engraver"
203   \consists "Tie_engraver"
204   \consists "Tuplet_engraver"
205   \consists "Note_heads_engraver"
206   \consists "Rest_engraver"
207
208   \consists "Skip_event_swallow_translator"
209 }
210
211
212 \score {
213   \topVoice
214   \layout {
215     \context { \MyStaff }
216     \context { \MyVoice }
217   }
218 }
219
220
221 MyStaff = \context {
222     \MyStaff
223     \consists "Staff_symbol_engraver"
224 }
225
226 \score {
227   \topVoice
228   \layout {
229       \context { \MyStaff }
230       \context { \MyVoice }
231             }
232 }
233
234 MyStaff = \context {
235     \MyStaff
236     \consists "Clef_engraver"
237     \remove "Pitch_squash_engraver"
238 }
239
240 \score {
241   \topVoice
242   \layout {
243     \context { \MyStaff }
244     \context { \MyVoice }
245   }
246 }
247
248 MyVoice = \context {
249   \MyVoice
250   \consists "Stem_engraver"
251 }
252
253 \score {
254   \topVoice
255   \layout {
256     \context { \MyStaff }
257     \context { \MyVoice }
258   }
259 }
260
261 MyVoice = \context {
262   \MyVoice
263   \consists "Beam_engraver"
264 }
265
266 \score {
267   \topVoice
268   \layout {
269     \context { \MyStaff }
270     \context { \MyVoice }
271   }
272 }
273
274 MyVoice= \context {
275   \MyVoice
276   \consists "Phrasing_slur_engraver"
277   \consists "Slur_engraver"
278   \consists "Script_engraver"
279 }
280
281
282 \score {
283   \topVoice
284   \layout {
285     \context { \MyStaff }
286     \context { \MyVoice }
287   }
288 }
289
290 MyStaff = \context {
291   \MyStaff
292   \consists "Bar_engraver"
293   \consists "Time_signature_engraver"
294 }
295
296 \score {
297   \topVoice
298   \layout {
299     \context { \MyStaff }
300     \context { \MyVoice }
301   }
302 }
303
304 MyStaff = \context {
305   \MyStaff
306   \consists "Accidental_engraver"    
307   \consists "Key_engraver"
308 }
309 \score {
310   \topVoice
311   \layout {
312     \context { \MyStaff }
313     \context { \MyVoice }
314   }
315 }
316