]> git.donarmstrong.com Git - lilypond.git/blob - input/tutorial/orchestral-score.ly
d46b66856ae9c7b11ef4a2414ec6695c4319f0ca
[lilypond.git] / input / tutorial / orchestral-score.ly
1 \version "1.3.130";
2
3 \include "paper16.ly";
4
5 % #(set! point-and-click #t)
6 #(define text-flat '((font-relative-size . -2) (music "accidentals--1")))
7
8 staffCombinePianoStaffProperties = {
9         \property PianoStaff.devNullThread = #'()
10         \property PianoStaff.soloADue = ##t
11         \property PianoStaff.soloText = #""
12         \property PianoStaff.soloIIText = #""
13         % This is non-conventional, but currently it is
14         % the only way to tell the difference.
15         \property PianoStaff.aDueText = #"\\`a2"
16         \property PianoStaff.splitInterval = #'(1 . 0)
17         \property PianoStaff.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
18 }
19
20 % Coriolan 218-222
21 flautoI = \notes\relative c'' {
22   \property Score.currentBarNumber = #218
23   des2.()c4|e(f e)f|\break
24   r2 des4\sf()c|r2 des4\sf()c|
25 }
26 flautoII = \notes\relative c'' {
27  g2.()as4|bes(as bes)as|
28  R1*2
29 }
30 oboeI = \notes\relative c'' {
31  e2.()f4|e(f e)f|
32  r2 as|r as\sf|
33 }
34 oboeII = \notes\relative c'' {
35  g2.()as4|bes(as bes)as|
36  r2 as'|r as\sf|
37 }
38 clarinettoI = \notes\relative c' {
39   es2.()d4|c(bis c)bes|
40 % r2 es4\sf()d|r2 es4\sf()d|
41 }
42 clarinettoII = \notes\relative c' {
43   es2.()d4|c(bes c)bes|
44 % r2 es'4\sf()d|r2 es4\sf()d|
45 }
46 fagottoI = \notes\relative c' {
47   bes2.()as4|g(f g)f|
48   r r8 des' des4\sf()es|r r8 des des4\sf()es|
49 }
50 fagottoII = \notes\relative c' {
51   bes2.()as4 | g(f g)f|
52   f4 r r2 | f4 r r2|
53 }
54 cornoI = \notes\relative c''' {
55   g2. f4|g f g f|
56 % r4 r8 f f2|r4 r8 f f2|
57 }
58 cornoII = \notes\relative c''' {
59   g,2. d'4|g, d' g, d'|
60   r4 r8 d d4\sf()es|r4 r8 d d4\sf()es|
61 }
62 tromboI = \notes\relative c'' {
63   c2. c4|c c c c|
64   R1*2|
65 }
66 tromboII = \notes\relative c' {
67   c2. c4|c c c c|
68   R1*2|
69 }
70 timpani = \notes\relative c {
71   c2:16 c4 c|c c c c |
72   R1*2|
73 }
74 violinoI = \notes\relative c' {
75  des'2:16\ff des4: c:|e,: f: e: f:|
76  r8 as des,4\sf~des()c |r8 as' des,4\sf~des()c|
77 }
78 violinoII = \notes\relative c' {
79   des2:16\ff des4: c: |  bes: as: bes: as:|
80 % r8 as des,4\sf ~ des()c| r8 as' des,4\sf ~ des()c|
81 }
82 violaI = \notes\relative c' {
83   e2:16\ff e4: f:|b,: c: b: c:|
84   r4 r8 as as2\sf|r4 r8 as as2\sf|
85 }
86 violaII = \notes\relative c' {
87   bes2:16\ff bes4: as:|g: f: g: f: |
88   r4 r8 f f4\sf()ges|r4 r8 f f4\sf()ges|
89 }
90 violoncello = \notes\relative c {
91   bes2.\ff()as4|g( f g )f |
92   r4 r8 f' f4\sf()ges |r4 r8 f f4\sf()ges |
93 }
94 contrabasso = \notes\relative c {
95   bes2.\ff()as4|g( f g )f|
96   f4 r r2 |f'4 r r2|
97 }
98
99
100
101 %%
102 %% Hmm, can't we move this to a `template.ly'
103 %%
104 \score {
105   < 
106     \context StaffGroup = wood <
107       \context Staff = flauti <
108         \property Staff.midiInstrument = #"flute"
109         \property Staff.instrument = "2 Flauti"
110         \property Staff.instr = "Fl."
111         \context Voice=one \partcombine Voice
112           \context Thread=one \flautoI
113           \context Thread=two \flautoII
114       >
115       \context Staff = oboes <
116         \property Staff.midiInstrument = #"oboe"
117         \property Staff.instrument = "2 Oboi"
118         \property Staff.instr = "Ob."
119         \context Voice=one \partcombine Voice
120           \context Thread=one \oboeI
121           \context Thread=two \oboeII
122       >
123       \context Staff = clarinets <
124         \property Staff.midiInstrument = #"clarinet"
125         \property Staff.instrument = #`(lines
126           "2 Clarinetti" (rows "(B" ,text-flat ")"))
127         \property Staff.instr = #`(lines
128           "Cl."  (rows "(B" ,text-flat ")"))
129         \property Staff.transposing = #-2
130         \notes \key f \major;
131         \context Voice=one \partcombine Voice
132           \context Thread=one \clarinettoI
133           \context Thread=two \clarinettoII
134       >
135       \context Staff = bassoons <
136         \property Staff.midiInstrument = #"bassoon"
137         \property Staff.instrument = "2 Fagotti"
138         \property Staff.instr = "Fg."
139         \clef bass;
140         \context Voice=one \partcombine Voice
141           \context Thread=one \fagottoI
142           \context Thread=two \fagottoII
143       >
144     >
145     \context StaffGroup = brass <
146       \context Staff = frenshHorns <
147         \property Staff.midiInstrument = #"french horn"
148         \property Staff.instrument = #`(lines
149           "2 Corni" (rows "(E" ,text-flat ")"))
150         \property Staff.instr = #`(lines
151           "Cor."  (rows "(E" ,text-flat ")"))
152         \property Staff.transposing = #3
153         \notes \key c \major;
154         \context Voice=one \partcombine Voice
155           \context Thread=one \cornoI
156           \context Thread=two \cornoII
157       >
158       \context Staff = trumpets <
159         \property Staff.midiInstrument = #"clarinet"
160         \property Staff.instrument = #`(lines
161           "2 Trombe" (rows "(C)"))
162         \property Staff.instr = #`(lines
163           "Tbe." (rows "(C)"))
164         \context Voice=one \partcombine Voice
165           \context Thread=one \tromboI
166           \context Thread=two \tromboII
167       >
168     >
169     \context StaffGroup = timpani <
170       \context Staff = timpani <
171         \property Staff.midiInstrument = #"timpani"
172         \property Staff.instrument = #'(lines
173           "2 Timpani" "(C-G)")
174         \property Staff.instr = #"Timp."
175         \clef bass;
176         \timpani
177       >
178     >
179     \context StaffGroup = strings <
180       \context GrandStaff = violins <
181         \context Staff = viI <
182           \property Staff.midiInstrument = #"violin"
183           \property Staff.instrument = "Violino I"
184           \property Staff.instr = "Vi. I"
185           \violinoI       
186         >
187         \context Staff = viII <
188           \property Staff.midiInstrument = #"violin"
189           \property Staff.instrument = "Violino II"
190           \property Staff.instr = "Vi. II"
191           \violinoII
192         >
193       >
194       \context Staff = vla <
195         \property Staff.midiInstrument = #"viola"
196         \property Staff.instrument = "Viola"
197         \property Staff.instr = "Vla."
198         \clef alto;
199         \context Voice=one \partcombine Voice
200           \context Thread=one \violaI
201           \context Thread=two \violaII
202       >
203       \context PianoStaff=bass <
204         \staffCombinePianoStaffProperties
205         \context Staff=one <
206           \property Staff.midiInstrument = #"cello"
207           \property Staff.instrument = #'(lines
208             "Violoncello" "    e" "Contrabasso")
209           \property Staff.instr = "Vc."
210           \clef bass;
211         >
212         \context Staff=two <
213           \property Staff.midiInstrument = #"contrabass"
214           \property Staff.instrument = "Contrabasso"
215           \property Staff.instr = "C.B."
216           \clef bass;
217           \skip 1*4; % sustain clef
218         >
219         \context Staff=one \partcombine Staff
220           \context Voice=one \violoncello
221           \context Voice=two \contrabasso
222       >
223     >
224   >
225   \paper {
226     \paperSixteen
227     linewidth = 80 * \staffspace;
228     textheight = 200 * \staffspace;
229     \translator{
230       \ThreadContext
231       \consists "Rest_engraver";
232     }
233     \translator{
234       \VoiceContext
235       \remove "Rest_engraver";    
236
237       % The staff combine (bassi part) needs a
238       % thread_devnull_engraver here.
239       % Instead of maintaining two separate hierarchies,
240       % we switch add it, but switch it off immediately.
241       % --> move to Score level to be able to override
242       % The staff combine part switches it on.
243       
244       %% devNullThread = #'never
245       \consists "Thread_devnull_engraver";
246     }
247     \translator{
248       \HaraKiriStaffContext
249       \consists "Mark_engraver";
250     }
251     \translator {
252       \OrchestralScoreContext
253       % skipBars = ##t
254
255       soloText = #"I."
256       soloIIText = #"II."
257       devNullThread = #'never
258
259       % Hmm
260       currentBarNumber = #218
261       BarNumber \override #'padding = #3
262       RestCollision \override #'maximum-rest-count = #1
263       TimeSignature \override #'style = #'C
264     }
265   }
266 }
267