]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/engravers-one-by-one.ly
Docs: run convert-ly for 2.14.0.
[lilypond.git] / Documentation / snippets / engravers-one-by-one.ly
1 % DO NOT EDIT this file manually; it is automatically
2 % generated from Documentation/snippets/new
3 % Make any changes in Documentation/snippets/new/
4 % and then run scripts/auxiliar/makelsr.py
5 %
6 % This file is in the public domain.
7 %% Note: this file works from version 2.13.52
8 \version "2.14.0"
9
10 \header {
11 %% Translation of GIT committish: 59caa3adce63114ca7972d18f95d4aadc528ec3d
12   texidoces = "
13 Del problema central de la notación, esto es, crear un determinado
14 símbolo, se encargan los «plugins» o complementos añadidos.  Cada
15 uno de los complementos se conoce como un grabador. En este
16 ejemplo, los grabadores se van activando uno por uno, en el orden
17 siguiente:
18
19 - cabeza de las notas,
20
21 - el símbolo del pentagrama,
22
23 - clave,
24
25 - plicas,
26
27 - barras, ligaduras de expresión, acentos,
28
29 - alteraciones, líneas divisorias, indicación del compás, y armadura.
30
31 Los grabadores se encuentran agrupados. Por ejemplo, las cabezas de
32 nota, ligaduras de expresión, barras de corchea, etc. forman un
33 contexto de voz, @code{Voice}. Los grabadores de la armadura,
34 alteraciones, líneas de compás, etc. forman un contexto de pentagrama,
35 @code{Staff}.
36
37 "
38   doctitlees = "Los grabadores uno por uno"
39
40   lsrtags = "contexts-and-engravers"
41
42   texidoc = "
43 The notation problem, creating a certain symbol, is handled by plugins.
44  Each plugin is called an Engraver. In this example, engravers are
45 switched on one by one, in the following order:
46
47 - note heads,
48
49
50 - staff symbol,
51
52
53 - clef,
54
55
56 - stem,
57
58
59 - beams, slurs, accents,
60
61
62 - accidentals, bar lines, time signature and key signature.
63
64
65
66 Engravers are grouped. For example, note heads, slurs, beams etc. form
67 a @code{Voice} context. Engravers for key signature, accidentals, bar
68 line, etc. form a @code{Staff} context.
69
70 "
71   doctitle = "Engravers one-by-one"
72 } % begin verbatim
73
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 } % begin verbatim
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   \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   localKeySignature = #'()
144
145   % explicitly set instrumentName, so we don't get
146   % weird effects when doing instrument names for
147   % piano staves
148
149   instrumentName = #'()
150   shortInstrumentName = #'()
151
152   \accepts "Voice"
153 }
154
155
156 MyVoice = \context {
157   \type "Engraver_group"
158   \name Voice
159
160   \description "
161     Corresponds to a voice on a staff.  This context handles the
162     conversion of dynamic signs, stems, beams, super- and subscripts,
163     slurs, ties, and rests.
164
165     You have to instantiate this explicitly if you want to have
166     multiple voices on the same staff."
167
168   localKeySignature = #'()
169   \consists "Font_size_engraver"
170
171   % must come before all
172   \consists "Output_property_engraver"
173   \consists "Arpeggio_engraver"
174   \consists "Multi_measure_rest_engraver"
175   \consists "Text_spanner_engraver"
176   \consists "Grob_pq_engraver"
177   \consists "Note_head_line_engraver"
178   \consists "Glissando_engraver"
179   \consists "Ligature_bracket_engraver"
180   \consists "Breathing_sign_engraver"
181   % \consists "Rest_engraver"
182   \consists "Grace_beam_engraver"
183   \consists "New_fingering_engraver"
184   \consists "Chord_tremolo_engraver"
185   \consists "Percent_repeat_engraver"
186   \consists "Slash_repeat_engraver"
187
188   %{
189     Must come before text_engraver, but after note_column engraver.
190   %}
191   \consists "Text_engraver"
192   \consists "Dynamic_engraver"
193   \consists "Fingering_engraver"
194
195   \consists "Script_column_engraver"
196   \consists "Rhythmic_column_engraver"
197   \consists "Cluster_spanner_engraver"
198   \consists "Tie_engraver"
199   \consists "Tie_engraver"
200   \consists "Tuplet_engraver"
201   \consists "Note_heads_engraver"
202   \consists "Rest_engraver"
203 }
204
205
206 \score {
207   \topVoice
208   \layout {
209     \context { \MyStaff }
210     \context { \MyVoice }
211   }
212 }
213
214
215 MyStaff = \context {
216   \MyStaff
217   \consists "Staff_symbol_engraver"
218 }
219
220 \score {
221   \topVoice
222   \layout {
223     \context { \MyStaff }
224     \context { \MyVoice }
225   }
226 }
227
228 MyStaff = \context {
229   \MyStaff
230   \consists "Clef_engraver"
231   \remove "Pitch_squash_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 "Stem_engraver"
245 }
246
247 \score {
248   \topVoice
249   \layout {
250     \context { \MyStaff }
251     \context { \MyVoice }
252   }
253 }
254
255 MyVoice = \context {
256   \MyVoice
257   \consists "Beam_engraver"
258 }
259
260 \score {
261   \topVoice
262   \layout {
263     \context { \MyStaff }
264     \context { \MyVoice }
265   }
266 }
267
268 MyVoice = \context {
269   \MyVoice
270   \consists "Phrasing_slur_engraver"
271   \consists "Slur_engraver"
272   \consists "Script_engraver"
273 }
274
275
276 \score {
277   \topVoice
278   \layout {
279     \context { \MyStaff }
280     \context { \MyVoice }
281   }
282 }
283
284 MyStaff = \context {
285   \MyStaff
286   \consists "Bar_engraver"
287   \consists "Time_signature_engraver"
288 }
289
290 \score {
291   \topVoice
292   \layout {
293     \context { \MyStaff }
294     \context { \MyVoice }
295   }
296 }
297
298 MyStaff = \context {
299   \MyStaff
300   \consists "Accidental_engraver"
301   \consists "Key_engraver"
302 }
303 \score {
304   \topVoice
305   \layout {
306     \context { \MyStaff }
307     \context { \MyVoice }
308   }
309 }
310