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