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