]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/web/ly-examples/orchestra.ly
edcdcc64ce430f6d53cf1e44e2cf674388528fdb
[lilypond.git] / Documentation / web / ly-examples / orchestra.ly
1 \version "2.13.36"
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 to produce piano dynamics context
53 \layout {
54   \context {
55     \type "Engraver_group"
56     \name Dynamics
57     \alias Voice
58     \consists "Output_property_engraver"
59     \consists "Axis_group_engraver"
60     \consists "Piano_pedal_engraver"
61     pedalSustainStrings = #'("Ped." "*Ped." "*")
62     pedalUnaCordaStrings = #'("una corda" "" "tre corde")
63     \consists "Script_engraver"
64     \consists "New_dynamic_engraver"
65     \consists "Dynamic_align_engraver"
66     \consists "Text_engraver"
67     \consists "Text_spanner_engraver"
68     \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
69     \override DynamicLineSpanner #'Y-offset = #0
70     \override TextScript #'font-size = #2
71     \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
72     \override TextScript #'font-shape = #'italic
73     \override TextSpanner #'breakable = ##t
74     \override DynamicLineSpanner #'breakable = ##t
75     \override DynamicTextSpanner #'breakable = ##t
76   }
77   \context {
78     \PianoStaff
79     \accepts "Dynamics"
80   }
81   \context {
82     \Voice
83     \override Glissando #'breakable = ##t
84     \override TextSpanner #'breakable = ##t
85     \override DynamicLineSpanner #'breakable = ##t
86     \override DynamicTextSpanner #'breakable = ##t
87     \override TrillSpanner #'breakable = ##t
88   }
89 }
90
91 %% layout to create orchestra staff group
92 %% with non-spanned barlines between two instrument groups
93 \layout {
94   \context {
95     \StaffGroup
96     \name Orchestra
97     \remove "Span_bar_engraver"
98   }
99   \context {
100     \Score
101     \accepts Orchestra
102   }
103 }
104
105 %% Layout to produce SquareStaff context
106 %% to group similar instruments in a staff group with thin square bracket
107 \layout {
108   \context {
109     \StaffGroup
110     \name SquareStaff
111     systemStartDelimiter = #'SystemStartSquare
112   }
113   \context {
114     \Orchestra
115     \accepts SquareStaff
116   }
117   \context {
118     \StaffGroup
119     \accepts SquareStaff
120   }
121 }
122
123 %% Layout to produce MarkLine context
124 %% to place rehearsal marks and texts above full score
125 \layout {
126   \context {
127     \type "Engraver_group"
128     \name "MarkLine"
129     \consists "Output_property_engraver"
130     \consists "Axis_group_engraver"
131     \consists "Mark_engraver"
132     \consists "Metronome_mark_engraver"
133     \consists "Script_engraver"
134     \consists "Text_engraver"
135     \consists "Text_spanner_engraver"
136     \consists "Font_size_engraver"
137     \override VerticalAxisGroup #'minimum-Y-extent = #'(-2 . 2 )
138     \override TextSpanner #'breakable = ##t
139   }
140   \context {
141     \Score
142     \accepts "MarkLine"
143   }
144   \context {
145     \Orchestra
146     \accepts "MarkLine"
147   }
148   \context {
149     \StaffGroup
150     \accepts "MarkLine"
151   }
152 }
153
154 %% layout to produce a smaller markline
155 %% put before 1st violin part
156 \layout {
157   \context {
158     \MarkLine
159     \name "SmallMarkLine"
160     \override MetronomeMark #'outside-staff-priority = #800
161     \override RehearsalMark #'outside-staff-priority = #1200
162   }
163   \context {
164     \Score
165     \accepts SmallMarkLine
166   }
167   \context {
168     \Orchestra
169     \accepts SmallMarkLine
170   }
171   \context {
172     \StaffGroup
173     \accepts SmallMarkLine
174   }
175 }
176
177 modern =
178 #`(Staff ,(make-accidental-rule 'same-octave 0)
179   ,(make-accidental-rule 'any-octave 0)
180   ,(make-accidental-rule 'same-octave 1))
181
182 \layout {
183   \context {
184     \Score
185     autoAccidentals = #modern
186     autoCautionaries = #modern
187   }
188 }
189
190   marks = \relative c' {
191     \set markFormatter = #format-mark-box-numbers
192     \tempo \presto 4.=112
193 \set Score.currentBarNumber = #11
194     s2.*4 |
195     s1*9/8 |
196   }
197
198   piccolo = \relative c'''' {
199     \clef treble \key ees \minor \time 6/8
200     \transposition c''
201     R2.
202     ges,16(\mf\< ees c ees ges bes) c( bes ges bes c ees) |
203     ges8-.->\!\ff \offCr r r r4 r8 | R2. |
204     \time 9/8
205     R1*9/8 |
206   }
207
208   flutes = \relative c'''' {
209     \clef treble \key ees \minor \time 6/8
210     R2.
211     <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>) |
212     <ges c,>8-.->\!\ff \offCr r r r4 r8 | R2. |
213     \time 9/8
214     R1*9/8 |
215   }
216
217   oboes = \relative c''' {
218     \clef treble \key ees \minor \time 6/8
219     R2. |
220     <ges, c,>4(\mf\< <bes ees,>8 <c ges>4 <ees bes>8) |
221     <ges c,>-.->\!\ff \offCr r r r4 r8 | R2. |
222     \time 9/8
223     R1*9/8 |
224   }
225
226   clarinets = \relative c' {
227     \clef treble \key f \minor \time 6/8
228     \transposition bes
229     <aes' d,>4(\p\< <c f,>8) <d aes>4( <f c>8) |
230     <aes d,>4( <c f,>8) <d aes>4( <f c>8) |
231     <aes d,>-.->\!\ff \offCr r r r4 r8 | R2. |
232     \time 9/8
233     R1*9/8 |
234   }
235
236   bassoons = \relative c, {
237     \clef bass \key ees \minor \time 6/8
238     <ees bes'>4.\pp\< c'^"a2" |
239     bes8-. bes-. bes-. ges-. ges-. ges-. |
240     ees-.->\!\ff \offCr <ees bes'>4\pp ~ <ees bes'>4. ~ | <ees bes'>2. |
241     \time 9/8
242     ges4\p^"I" aes8 aes ees ges ges4 aes16( ges) |
243   }
244
245   hornI = \relative c'' {
246     \clef treble \key bes \minor \time 6/8
247     \transposition f
248     r4 r8 <f bes,>4.\p\< ~ |
249     <f bes,>8-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. |
250     <f bes,>-.->\!\ff \offCr r r r4 r8 | R2. |
251     \time 9/8
252     r4 r8 <b, g>2.\pp |
253   }
254
255   hornII = \relative c'' {
256     \clef treble \key bes \minor \time 6/8
257     \transposition f
258     \moltocr <des g,>2.\pp\< ~ |
259     <des g,>8-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. <f bes,>-. |
260     <f bes,>-.->\!\ff \offCr r r r4 r8 | R2. |
261     \time 9/8
262     <f, des>2.\pp <f des>4. ~ |
263   }
264
265   trumpetI = \relative c''' {
266     \clef treble \key f \minor \time 6/8
267     \transposition bes
268 R2. |
269     r4 r8 <aes f>-.\f\< <aes f>-. <aes f>-. |
270     <c aes>-.->\!\ff r r r4 r8 | R2. |
271     \time 9/8
272     R1*9/8 |
273   }
274
275   trumpetII = \relative c'' {
276     \clef treble \key f \minor \time 6/8
277     \transposition bes
278 R2. |
279     r8 d-.\mf\< d-. d-. d-. d-. |
280     d-.->\!\ff \offCr r r r4 r8 | R2. |
281     \time 9/8
282     R1*9/8 |
283   }
284
285   trombones = \relative c' {
286     \clef tenor \key ees \minor \time 6/8
287     r4 r8 <ges c>4.\mp\< ~ |
288     <ges c>8-. <ges c>-. <ges c>-. <ges c>-. <ges c>-. <ges c>-. |
289     <ges c>-.->\!\ff \offCr r r r4 r8 | R2. |
290     \time 9/8
291     R1*9/8 |
292   }
293
294   tuba = \relative c,, {
295     \clef bass \key ees \minor \time 6/8
296     <ees' ees'>4.(\pp\< <c c'> |
297     <bes bes'>8-.) <bes bes'>-. <bes bes'>-. <ges ges'>-. <ges ges'>-. <ges ges'>-. |
298     <ees ees'>-.->\!\ff \offCr r r r4 r8 | R2. |
299     \time 9/8
300     R1*9/8 |
301   }
302
303   timpani = \relative c {
304     \clef bass \key ees \minor \time 6/8
305     ees8\< ees ees ees ees ees |
306     bes bes bes bes bes bes |
307     ees,->\!\f \offCr ees'\pp ees ees ees ees |
308     ees ees ees ees ees ees |
309     \time 9/8
310     ees r r r4 r8 r4 r8 |
311   }
312
313   trian = \relative c' {
314     \clef percussion \time 6/8
315     R2.*4 |
316     \time 9/8
317     R1*9/8 |
318   }
319
320   cym = \relative c' {
321     \clef percussion \time 6/8
322     R2.*4 |
323     \time 9/8
324     R1*9/8 |
325   }
326
327   tamt = \relative c' {
328     \clef percussion \time 6/8
329 R2. |
330     r4 r8 r c4\mf\<^"*" ~ |
331     c8\!\ff r r r4 r8 | R2. |
332     \time 9/8
333     R1*9/8 |
334   }
335
336   tamb = \relative c' {
337     \clef percussion \time 6/8
338     R2.*4 |
339     \time 9/8
340     R1*9/8 |
341   }
342
343   snare = \relative c' {
344     \clef percussion \time 6/8
345     R2.*4 |
346     \time 9/8
347     c8\pp c c c c c c c c |
348   }
349
350   bsdrum = \relative c' {
351     \clef percussion \time 6/8
352     c2.:32\pp\< ~ | c: ~ |
353     c8\!\ff \offCr r r r4 r8 | R2. |
354     \time 9/8
355     c2.:32\pp ~ c4.: |
356   }
357
358   harprh = \relative c'' {
359     \clef treble \key ees \minor \time 6/8
360     \showStaffSwitch
361     R2.*4_\markup { \harp-pedal #"--^|^^^^" } |
362     \time 9/8
363     R1*9/8 |
364   }
365
366   harplh = \relative c {
367     \clef bass \key ees \minor
368     \showStaffSwitch
369     R2.*4 |
370     R1*9/8 |
371   }
372
373   dynamics = {
374     s2.*4 |
375     s1*9/8 |
376   }
377
378
379   violinI = \relative c'''' {
380     \clef treble \key ees \minor \time 6/8
381     ges,,16(\pp\< ees c ees ges bes) c( bes ges bes c ees) |
382     ges( ees c ees ges bes) c( bes ges bes c ees) |
383     ges8-.->\!\ff \offCr r r r4 r8 | R2. |
384     \time 9/8
385     R1*9/8 |
386   }
387
388   violinII = \relative c''' {
389     \clef treble \key ees \minor \time 6/8
390     c,,16(\pp\< bes ges bes c ees) ges( ees c ees ges bes) |
391     c( bes ges bes c ees) ges( ees c ees ges bes) |
392     c8-.->\!\ff \offCr r r r4 r8 | R2. |
393     \time 9/8
394     r4 r8 \repeat tremolo 6 { c,,32->\pp^\pont e } r4 r8 |
395   }
396
397   viola = \relative c {
398     \clef alto \key ees \minor \time 6/8
399     <ees bes'>8-.\pp\< <ees bes'>-. <ees bes'>-. <ges c>-. <ges c>-. <ges c>-. |
400     <bes ees>-. <bes ees>-. <bes ees>-. <c ges'>-. <c ges'>-. <c ges'>-. |
401     <ees bes'>-.->\!\ff \offCr r r r4 r8 | R2. |
402     \time 9/8
403     \repeat tremolo 12 { ges,32->^\pont bes } \repeat tremolo 6 {ges->( bes) } |
404   }
405
406   cello = \relative c {
407     \clef bass \key ees \minor \time 6/8
408     <c ges'>8-.\pp\< <c ges'>-. <c ges'>-. <bes ees>-. <bes ees>-. <bes ees>-. |
409     <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. |
410     <bes ges'>8-.->\!\ff \offCr <c ges'>-.\pp <c ges'>-. <c ges'>-. <c ges'>-. <c ges'>-. |
411     <c ges'>-. r r r4 r8 |
412     \time 9/8
413     \repeat tremolo 12 <c ges'>32(^\pont \repeat tremolo 12 <cis g'> \repeat tremolo 12 <c ges'>) |
414   }
415
416   contrabass = \relative c {
417     \clef bass \key ees \minor \time 6/8
418     \transposition c
419     <ees bes'>8-.\pp\< ees-. ees-. c-. c-. c-. |
420     bes-. bes-. ges-. ges-. ges-. ges-. |
421     ees-.->\!\ff \offCr <ees' bes'>-.\pp <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. |
422     <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. |
423     \time 9/8
424     <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. <ees bes'>-. |
425   }
426
427   #(set-global-staff-size 10)
428
429   \score {
430     \new Orchestra = "orchestra" <<
431     \set Score.skipBars = ##f
432     \new MarkLine { \marks }
433       \new StaffGroup = "woodwind" <<
434       \new SquareStaff = "picc fl" <<
435         \new Staff = "piccolo" {
436           \set Staff.instrumentName = "Piccolo"
437           \set Staff.shortInstrumentName = "Picc."
438         \piccolo
439         }
440         \new Staff = "flutes" {
441           \set Staff.instrumentName = "Flutes I & II"
442           \set Staff.shortInstrumentName = "Fl."
443         \flutes
444         }
445       >>
446       \new Staff = "oboes" {
447         \set Staff.instrumentName = "Oboes I & II"
448         \set Staff.shortInstrumentName = "Ob."
449       \oboes
450       }
451       \new Staff = "clarinets" {
452         \set Staff.instrumentName = \markup {
453           \column { \line { "Clarinets I & II" }
454             \line { "in B" \smaller \flat } } }
455         \set Staff.shortInstrumentName = "Cl."
456       \clarinets
457       }
458       \new Staff = "bassoons" {
459         \set Staff.instrumentName = "Bassoons I & II"
460         \set Staff.shortInstrumentName = "Bn."
461       \bassoons
462       }
463     >>
464     \new StaffGroup = "brass" <<
465       \new SquareStaff = "horns" <<
466         \new Staff = "hornsI" {
467           \set Staff.instrumentName = \markup {
468             \column { \line { "Horns I & II" }
469               \line { "in F" } } }
470           \set Staff.shortInstrumentName = "Hn. I & II"
471         \hornI
472         }
473         \new Staff = "hornsII" {
474           \set Staff.instrumentName = \markup {
475             \column { \line { "Horns III & IV" }
476               \line { "in F" } } }
477           \set Staff.shortInstrumentName = "Hn. III & IV"
478         \hornII
479         }
480       >>
481       \new SquareStaff = "trumpets" <<
482         \new Staff = "trumpetI" {
483           \set Staff.instrumentName = \markup {
484             \column { \line { "Trumpets I & II" }
485             \line { "in B" \smaller \flat } } }
486           \set Staff.shortInstrumentName = "Tp. I & II"
487         \trumpetI
488         }
489         \new Staff = "trumpetII" {
490           \set Staff.instrumentName = \markup {
491             \column { \line { "Trumpet III" }
492             \line { "in B" \smaller \flat } } }
493           \set Staff.shortInstrumentName = "Tp. III"
494         \trumpetII
495         }
496       >>
497       \new SquareStaff = "trombones" <<
498         \new Staff = "trombones 1 & 2" {
499           \set Staff.instrumentName = "Trombones I & II"
500           \set Staff.shortInstrumentName = "Tb. I & II"
501         \trombones
502         }
503         \new Staff = "tuba" {
504           \set Staff.instrumentName = "Bass trombone & Tuba"
505           \set Staff.shortInstrumentName = "Btb. & Tu."
506         \tuba
507         }
508       >>
509     >>
510     \new Staff = "timpani" {
511       \set Staff.instrumentName = "Timpani in A, D & E"
512       \set Staff.shortInstrumentName = "Tim."
513     \timpani
514     }
515     \new GrandStaff = "drums" <<
516       \new RhythmicStaff = "triangle" {
517         \set RhythmicStaff.instrumentName = "Triangle"
518         \set RhythmicStaff.shortInstrumentName = "Tri."
519       \trian
520       }
521       \new RhythmicStaff = "cymbals" {
522         \set RhythmicStaff.instrumentName = "Suspended cymbal"
523         \set RhythmicStaff.shortInstrumentName = "Susp. cym."
524       \cym
525       }
526       \new RhythmicStaff = "tamtam" {
527         \set RhythmicStaff.instrumentName = "Tamtam"
528         \set RhythmicStaff.shortInstrumentName = "Tamt."
529       \tamt
530       }
531       \new RhythmicStaff = "tambourine" {
532         \set RhythmicStaff.instrumentName = "Tambourine"
533         \set RhythmicStaff.shortInstrumentName = "Tamb."
534       \tamb
535       }
536       \new RhythmicStaff = "snare" {
537         \set RhythmicStaff.instrumentName = "Snare drum"
538         \set RhythmicStaff.shortInstrumentName = "Sn."
539       \snare
540       }
541       \new RhythmicStaff = "bass drum" {
542         \set RhythmicStaff.instrumentName = "Bass drum"
543         \set RhythmicStaff.shortInstrumentName = "Bd."
544       \bsdrum
545       }
546     >>
547     \new PianoStaff = "harp" <<
548       \set PianoStaff.instrumentName = "Harp"
549       \set PianoStaff.shortInstrumentName = "Hrp."
550       \set PianoStaff.connectArpeggios = ##t
551       \new Staff = "rh" { \harprh }
552       \new Dynamics { \dynamics }
553       \new Staff = "lh" { \harplh }
554     >>
555     \new SmallMarkLine { \marks }
556     \new StaffGroup = "strings" <<
557       \new SquareStaff = "violins" <<
558         \new Staff = "violin I" {
559           \set Staff.instrumentName = "Violin I"
560           \set Staff.shortInstrumentName = "Vn. I"
561         \violinI
562         }
563         \new Staff = "violin II" {
564           \set Staff.instrumentName = "Violin II"
565           \set Staff.shortInstrumentName = "Vn. II"
566         \violinII
567         }
568       >>
569       \new Staff = "viola" {
570         \set Staff.instrumentName = "Viola"
571         \set Staff.shortInstrumentName = "Vl."
572       \viola
573       }
574       \new SquareStaff = "Cello and Bass" <<
575         \new Staff = "violoncello" {
576           \set Staff.instrumentName = "Violoncello"
577           \set Staff.shortInstrumentName = "Vc."
578         \cello
579         }
580         \new Staff = "contrabass" {
581           \set Staff.instrumentName = "Contrabass"
582           \set Staff.shortInstrumentName = "Cb."
583         \contrabass
584         }
585         >>
586       >>
587     >>
588     \layout {
589       \context {
590         \Score
591         \remove "Mark_engraver"
592         \remove "Metronome_mark_engraver"
593       }
594       \context {
595         \Staff \RemoveEmptyStaves
596       }
597     }
598   }
599