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