]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/ly-examples/orchestra.ly
Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / Documentation / ly-examples / orchestra.ly
1 \version "2.16.0"
2
3 \header {
4   tagline = ##f
5   title = "Violent Dance For Orchestra"
6   composer = "Hu Haipeng"
7 %  arranger = "July 5, 2009"
8
9 %  poet = "  I'm writing this piece because I'm terribly frustrated, facing a task which will seriously stain my aesthetics and conviction to the true art. It consists of all kinds of devils, dancing and whirling violently, turning the world into an abyss of darkness. Although the main melodies are derived from folk music, these are only a beautiful skin, and the essence of this piece is violent and evil, full of my 10 years' pain and rage. It's a large volcano of my long repressed heart!"
10 }
11
12 \paper{
13   line-width = 158\mm
14 }
15
16 %% markups
17 #(define-markup-list-command (paragraph layout props args) (markup-list?)
18   (let ((indent (chain-assoc-get 'par-indent props 2)))
19   (interpret-markup-list layout props
20   (make-justified-lines-markup-list (cons (make-hspace-markup indent)
21   args)))))
22
23 #(define-markup-command (vspace layout props amount) (number?)
24   "This produces a invisible object taking vertical space."
25   (let ((amount (* amount 3.0)))
26     (if (> amount 0)
27         (ly:make-stencil "" (cons -1 1) (cons 0 amount))
28         (ly:make-stencil "" (cons -1 1) (cons amount amount)))))
29
30 %% text defs
31 presto = \markup { \bold \italic "Presto" }
32 div = \markup { \bold "Div." }
33 nondiv = \markup { \bold "Non div." }
34 unis = \markup { \bold "Unis." }
35 piz = \markup { \bold "Pizz." }
36 arc = \markup { \bold "Arco" }
37 pizz = \set Staff.midiInstrument = "pizzicato strings"
38 arco = \set Staff.midiInstrument = "string ensemble 1"
39 pont = \markup { \bold \italic "Sul ponticello" }
40 naturale = \markup { \bold \italic "Naturale" }
41 moltocr = {
42   \set crescendoText = \markup { \italic "Molto cresc." }
43   \set crescendoSpanner = #'text
44   \override DynamicTextSpanner #'style = #'dotted-line
45 }
46 offCr = {
47   \unset crescendoText
48   \unset crescendoSpanner
49   \revert DynamicTextSpanner #'style
50 }
51
52 %% Layout for piano dynamics
53 \layout {
54   \context {
55     \Voice
56     \override Glissando #'breakable = ##t
57     \override TextSpanner #'breakable = ##t
58     \override DynamicLineSpanner #'breakable = ##t
59     \override DynamicTextSpanner #'breakable = ##t
60     \override TrillSpanner #'breakable = ##t
61   }
62 }
63
64 %% layout to create orchestra staff group
65 %% with non-spanned barlines between two instrument groups
66 \layout {
67   \context {
68     \StaffGroup
69     \name Orchestra
70     \remove "Span_bar_engraver"
71   }
72   \context {
73     \Score
74     \accepts Orchestra
75   }
76 }
77
78 %% Layout to produce SquareStaff context
79 %% to group similar instruments in a staff group with thin square bracket
80 \layout {
81   \context {
82     \StaffGroup
83     \name SquareStaff
84     systemStartDelimiter = #'SystemStartSquare
85   }
86   \context {
87     \Orchestra
88     \accepts SquareStaff
89   }
90   \context {
91     \StaffGroup
92     \accepts SquareStaff
93   }
94 }
95
96 %% Layout to produce MarkLine context
97 %% to place rehearsal marks and texts above full score
98 \layout {
99   \context {
100     \type "Engraver_group"
101     \name "MarkLine"
102     \consists "Output_property_engraver"
103     \consists "Axis_group_engraver"
104     \consists "Mark_engraver"
105     \consists "Metronome_mark_engraver"
106     \consists "Script_engraver"
107     \consists "Text_engraver"
108     \consists "Text_spanner_engraver"
109     \consists "Font_size_engraver"
110     \override VerticalAxisGroup #'staff-affinity = #DOWN
111     \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #2
112     \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = #5
113     \override TextSpanner #'breakable = ##t
114   }
115   \context {
116     \Score
117     \accepts "MarkLine"
118   }
119   \context {
120     \Orchestra
121     \accepts "MarkLine"
122   }
123   \context {
124     \StaffGroup
125     \accepts "MarkLine"
126   }
127 }
128
129 %% layout to produce a smaller markline
130 %% put before 1st violin part
131 \layout {
132   \context {
133     \MarkLine
134     \name "SmallMarkLine"
135     \override MetronomeMark #'outside-staff-priority = #800
136     \override RehearsalMark #'outside-staff-priority = #1200
137   }
138   \context {
139     \Score
140     \accepts SmallMarkLine
141   }
142   \context {
143     \Orchestra
144     \accepts SmallMarkLine
145   }
146   \context {
147     \StaffGroup
148     \accepts SmallMarkLine
149   }
150 }
151
152 modern =
153 #`(Staff ,(make-accidental-rule 'same-octave 0)
154   ,(make-accidental-rule 'any-octave 0)
155   ,(make-accidental-rule 'same-octave 1))
156
157 \layout {
158   \context {
159     \Score
160     autoAccidentals = #modern
161     autoCautionaries = #modern
162   }
163 }
164
165   marks = \relative c' {
166     \set markFormatter = #format-mark-box-numbers
167     \tempo \presto 4.=112
168 \set Score.currentBarNumber = #11
169     s2.*4 |
170     s1*9/8 |
171   }
172
173   piccolo = \relative c'''' {
174     \clef treble \key ees \minor \time 6/8
175     \transposition c''
176     R2.
177     ges,16(\mf\< ees c ees ges bes) c( bes ges bes c ees) |
178     ges8-.->\!\ff \offCr r r r4 r8 | R2. |
179     \time 9/8
180     R1*9/8 |
181   }
182
183   flutes = \relative c'''' {
184     \clef treble \key ees \minor \time 6/8
185     R2.
186     <ges, c,>16(\mf\< <ees bes> <c ges> <ees bes> <ges c,> <bes ees,>) <c ges>( <bes ees,> <ges c,> <bes ees,> <c ges> <ees bes>) |
187     <ges c,>8-.->\!\ff \offCr r r r4 r8 | R2. |
188     \time 9/8
189     R1*9/8 |
190   }
191
192   oboes = \relative c''' {
193     \clef treble \key ees \minor \time 6/8
194     R2. |
195     <ges, c,>4(\mf\< <bes ees,>8 <c ges>4 <ees bes>8) |
196     <ges c,>-.->\!\ff \offCr r r r4 r8 | R2. |
197     \time 9/8
198     R1*9/8 |
199   }
200
201   clarinets = \relative c' {
202     \clef treble \key f \minor \time 6/8
203     \transposition bes
204     <aes' d,>4(\p\< <c f,>8) <d aes>4( <f c>8) |
205     <aes d,>4( <c f,>8) <d aes>4( <f c>8) |
206     <aes d,>-.->\!\ff \offCr r r r4 r8 | R2. |
207     \time 9/8
208     R1*9/8 |
209   }
210
211   bassoons = \relative c, {
212     \clef bass \key ees \minor \time 6/8
213     <ees bes'>4.\pp\< c'^"a2" |
214     bes8-. bes-. bes-. ges-. ges-. ges-. |
215     ees-.->\!\ff \offCr <ees bes'>4\pp ~ <ees bes'>4. ~ | <ees bes'>2. |
216     \time 9/8
217     ges4\p^"I" aes8 aes ees ges ges4 aes16( ges) |
218   }
219
220   hornI = \relative c'' {
221     \clef treble \key bes \minor \time 6/8
222     \transposition f
223     r4 r8 <f bes,>4.\p\< ~ |
224     <f bes,>8-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. |
225     <f bes,>-.->\!\ff \offCr r r r4 r8 | R2. |
226     \time 9/8
227     r4 r8 <b, g>2.\pp |
228   }
229
230   hornII = \relative c'' {
231     \clef treble \key bes \minor \time 6/8
232     \transposition f
233     \moltocr <des g,>2.\pp\< ~ |
234     <des g,>8-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. |
235     <f bes,>-.->\!\ff \offCr r r r4 r8 | R2. |
236     \time 9/8
237     <f, des>2.\pp <f des>4. ~ |
238   }
239
240   trumpetI = \relative c''' {
241     \clef treble \key f \minor \time 6/8
242     \transposition bes
243 R2. |
244     r4 r8 <aes f>-.\f\< <aes f>-. <aes f>-. |
245     <c aes>-.->\!\ff r r r4 r8 | R2. |
246     \time 9/8
247     R1*9/8 |
248   }
249
250   trumpetII = \relative c'' {
251     \clef treble \key f \minor \time 6/8
252     \transposition bes
253 R2. |
254     r8 d-.\mf\< d-. d-. d-. d-. |
255     d-.->\!\ff \offCr r r r4 r8 | R2. |
256     \time 9/8
257     R1*9/8 |
258   }
259
260   trombones = \relative c' {
261     \clef tenor \key ees \minor \time 6/8
262     r4 r8 <ges c>4.\mp\< ~ |
263     <ges c>8-. <ges c>-. <ges c>-. <ges c>-. <ges c>-. <ges c>-. |
264     <ges c>-.->\!\ff \offCr r r r4 r8 | R2. |
265     \time 9/8
266     R1*9/8 |
267   }
268
269   tuba = \relative c,, {
270     \clef bass \key ees \minor \time 6/8
271     <ees' ees'>4.(\pp\< <c c'> |
272     <bes bes'>8-.) <bes bes'>-. <bes bes'>-. <ges ges'>-. <ges ges'>-. <ges ges'>-. |
273     <ees ees'>-.->\!\ff \offCr r r r4 r8 | R2. |
274     \time 9/8
275     R1*9/8 |
276   }
277
278   timpani = \relative c {
279     \clef bass \key ees \minor \time 6/8
280     ees8\< ees ees ees ees ees |
281     bes bes bes bes bes bes |
282     ees,->\!\f \offCr ees'\pp ees ees ees ees |
283     ees ees ees ees ees ees |
284     \time 9/8
285     ees r r r4 r8 r4 r8 |
286   }
287
288   trian = \relative c' {
289     \clef percussion \time 6/8
290     R2.*4 |
291     \time 9/8
292     R1*9/8 |
293   }
294
295   cym = \relative c' {
296     \clef percussion \time 6/8
297     R2.*4 |
298     \time 9/8
299     R1*9/8 |
300   }
301
302   tamt = \relative c' {
303     \clef percussion \time 6/8
304 R2. |
305     r4 r8 r c4\mf\<^"*" ~ |
306     c8\!\ff r r r4 r8 | R2. |
307     \time 9/8
308     R1*9/8 |
309   }
310
311   tamb = \relative c' {
312     \clef percussion \time 6/8
313     R2.*4 |
314     \time 9/8
315     R1*9/8 |
316   }
317
318   snare = \relative c' {
319     \clef percussion \time 6/8
320     R2.*4 |
321     \time 9/8
322     c8\pp c c c c c c c c |
323   }
324
325   bsdrum = \relative c' {
326     \clef percussion \time 6/8
327     c2.:32\pp\< ~ | c: ~ |
328     c8\!\ff \offCr r r r4 r8 | R2. |
329     \time 9/8
330     c2.:32\pp ~ c4.: |
331   }
332
333   harprh = \relative c'' {
334     \clef treble \key ees \minor \time 6/8
335     \showStaffSwitch
336     R2.*4_\markup { \harp-pedal #"--^|^^^^" } |
337     \time 9/8
338     R1*9/8 |
339   }
340
341   harplh = \relative c {
342     \clef bass \key ees \minor
343     \showStaffSwitch
344     R2.*4 |
345     R1*9/8 |
346   }
347
348   dynamics = {
349     s2.*4 |
350     s1*9/8 |
351   }
352
353
354   violinI = \relative c'''' {
355     \clef treble \key ees \minor \time 6/8
356     ges,,16(\pp\< ees c ees ges bes) c( bes ges bes c ees) |
357     ges( ees c ees ges bes) c( bes ges bes c ees) |
358     ges8-.->\!\ff \offCr r r r4 r8 | R2. |
359     \time 9/8
360     R1*9/8 |
361   }
362
363   violinII = \relative c''' {
364     \clef treble \key ees \minor \time 6/8
365     c,,16(\pp\< bes ges bes c ees) ges( ees c ees ges bes) |
366     c( bes ges bes c ees) ges( ees c ees ges bes) |
367     c8-.->\!\ff \offCr r r r4 r8 | R2. |
368     \time 9/8
369     r4 r8 \repeat tremolo 6 { c,,32->\pp^\pont e } r4 r8 |
370   }
371
372   viola = \relative c {
373     \clef alto \key ees \minor \time 6/8
374     <ees bes'>8-.\pp\< <ees bes'>-. <ees bes'>-. <ges c>-. <ges c>-. <ges c>-. |
375     <bes ees>-. <bes ees>-. <bes ees>-. <c ges'>-. <c ges'>-. <c ges'>-. |
376     <ees bes'>-.->\!\ff \offCr r r r4 r8 | R2. |
377     \time 9/8
378     \repeat tremolo 12 { ges,32->^\pont bes } \repeat tremolo 6 {ges->( bes) } |
379   }
380
381   cello = \relative c {
382     \clef bass \key ees \minor \time 6/8
383     <c ges'>8-.\pp\< <c ges'>-. <c ges'>-. <bes ees>-. <bes ees>-. <bes ees>-. |
384     <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. |
385     <bes ges'>8-.->\!\ff \offCr <c ges'>-.\pp <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. |
386     <c ges'>-. r r r4 r8 |
387     \time 9/8
388     \repeat tremolo 12 <c ges'>32(^\pont \repeat tremolo 12 <cis g'> \repeat tremolo 12 <c ges'>) |
389   }
390
391   contrabass = \relative c {
392     \clef bass \key ees \minor \time 6/8
393     \transposition c
394     <ees bes'>8-.\pp\< ees-. ees-. c-. c-. c-. |
395     bes-. bes-. ges-. ges-. ges-. ges-. |
396     ees-.->\!\ff \offCr <ees' bes'>-.\pp <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. |
397     <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. |
398     \time 9/8
399     <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. |
400   }
401
402   #(set-global-staff-size 10)
403
404   \score {
405     \new Orchestra = "orchestra" <<
406     \set Score.skipBars = ##f
407     \new MarkLine { \marks }
408       \new StaffGroup = "woodwind" <<
409       \new SquareStaff = "picc fl" <<
410         \new Staff = "piccolo" {
411           \set Staff.instrumentName = "Piccolo"
412           \set Staff.shortInstrumentName = "Picc."
413         \piccolo
414         }
415         \new Staff = "flutes" {
416           \set Staff.instrumentName = "Flutes I & II"
417           \set Staff.shortInstrumentName = "Fl."
418         \flutes
419         }
420       >>
421       \new Staff = "oboes" {
422         \set Staff.instrumentName = "Oboes I & II"
423         \set Staff.shortInstrumentName = "Ob."
424       \oboes
425       }
426       \new Staff = "clarinets" {
427         \set Staff.instrumentName = \markup {
428           \column { \line { "Clarinets I & II" }
429             \line { "in B" \smaller \flat } } }
430         \set Staff.shortInstrumentName = "Cl."
431       \clarinets
432       }
433       \new Staff = "bassoons" {
434         \set Staff.instrumentName = "Bassoons I & II"
435         \set Staff.shortInstrumentName = "Bn."
436       \bassoons
437       }
438     >>
439     \new StaffGroup = "brass" <<
440       \new SquareStaff = "horns" <<
441         \new Staff = "hornsI" {
442           \set Staff.instrumentName = \markup {
443             \column { \line { "Horns I & II" }
444               \line { "in F" } } }
445           \set Staff.shortInstrumentName = "Hn. I & II"
446         \hornI
447         }
448         \new Staff = "hornsII" {
449           \set Staff.instrumentName = \markup {
450             \column { \line { "Horns III & IV" }
451               \line { "in F" } } }
452           \set Staff.shortInstrumentName = "Hn. III & IV"
453         \hornII
454         }
455       >>
456       \new SquareStaff = "trumpets" <<
457         \new Staff = "trumpetI" {
458           \set Staff.instrumentName = \markup {
459             \column { \line { "Trumpets I & II" }
460             \line { "in B" \smaller \flat } } }
461           \set Staff.shortInstrumentName = "Tp. I & II"
462         \trumpetI
463         }
464         \new Staff = "trumpetII" {
465           \set Staff.instrumentName = \markup {
466             \column { \line { "Trumpet III" }
467             \line { "in B" \smaller \flat } } }
468           \set Staff.shortInstrumentName = "Tp. III"
469         \trumpetII
470         }
471       >>
472       \new SquareStaff = "trombones" <<
473         \new Staff = "trombones 1 & 2" {
474           \set Staff.instrumentName = "Trombones I & II"
475           \set Staff.shortInstrumentName = "Tb. I & II"
476         \trombones
477         }
478         \new Staff = "tuba" {
479           \set Staff.instrumentName = "Bass trombone & Tuba"
480           \set Staff.shortInstrumentName = "Btb. & Tu."
481         \tuba
482         }
483       >>
484     >>
485     \new Staff = "timpani" {
486       \set Staff.instrumentName = "Timpani in A, D & E"
487       \set Staff.shortInstrumentName = "Tim."
488     \timpani
489     }
490     \new GrandStaff = "drums" <<
491       \new RhythmicStaff = "triangle" {
492         \set RhythmicStaff.instrumentName = "Triangle"
493         \set RhythmicStaff.shortInstrumentName = "Tri."
494       \trian
495       }
496       \new RhythmicStaff = "cymbals" {
497         \set RhythmicStaff.instrumentName = "Suspended cymbal"
498         \set RhythmicStaff.shortInstrumentName = "Susp. cym."
499       \cym
500       }
501       \new RhythmicStaff = "tamtam" {
502         \set RhythmicStaff.instrumentName = "Tamtam"
503         \set RhythmicStaff.shortInstrumentName = "Tamt."
504       \tamt
505       }
506       \new RhythmicStaff = "tambourine" {
507         \set RhythmicStaff.instrumentName = "Tambourine"
508         \set RhythmicStaff.shortInstrumentName = "Tamb."
509       \tamb
510       }
511       \new RhythmicStaff = "snare" {
512         \set RhythmicStaff.instrumentName = "Snare drum"
513         \set RhythmicStaff.shortInstrumentName = "Sn."
514       \snare
515       }
516       \new RhythmicStaff = "bass drum" {
517         \set RhythmicStaff.instrumentName = "Bass drum"
518         \set RhythmicStaff.shortInstrumentName = "Bd."
519       \bsdrum
520       }
521     >>
522     \new PianoStaff = "harp" <<
523       \set PianoStaff.instrumentName = "Harp"
524       \set PianoStaff.shortInstrumentName = "Hrp."
525       \set PianoStaff.connectArpeggios = ##t
526       \new Staff = "rh" { \harprh }
527       \new Dynamics { \dynamics }
528       \new Staff = "lh" { \harplh }
529     >>
530     \new SmallMarkLine { \marks }
531     \new StaffGroup = "strings" <<
532       \new SquareStaff = "violins" <<
533         \new Staff = "violin I" {
534           \set Staff.instrumentName = "Violin I"
535           \set Staff.shortInstrumentName = "Vn. I"
536         \violinI
537         }
538         \new Staff = "violin II" {
539           \set Staff.instrumentName = "Violin II"
540           \set Staff.shortInstrumentName = "Vn. II"
541         \violinII
542         }
543       >>
544       \new Staff = "viola" {
545         \set Staff.instrumentName = "Viola"
546         \set Staff.shortInstrumentName = "Vl."
547       \viola
548       }
549       \new SquareStaff = "Cello and Bass" <<
550         \new Staff = "violoncello" {
551           \set Staff.instrumentName = "Violoncello"
552           \set Staff.shortInstrumentName = "Vc."
553         \cello
554         }
555         \new Staff = "contrabass" {
556           \set Staff.instrumentName = "Contrabass"
557           \set Staff.shortInstrumentName = "Cb."
558         \contrabass
559         }
560         >>
561       >>
562     >>
563     \layout {
564       \context {
565         \Score
566         \remove "Mark_engraver"
567         \remove "Metronome_mark_engraver"
568       }
569       \context {
570         \Staff \RemoveEmptyStaves
571       }
572     }
573   }