]> git.donarmstrong.com Git - lilypond.git/blob - input/tutorial/orchestral-score.ly
patch::: 1.3.137.jcn1
[lilypond.git] / input / tutorial / orchestral-score.ly
1
2
3 \include "paper13.ly";
4
5 % #(set! point-and-click #t)
6
7 % Coriolan 218-222
8 flautoI = \notes\relative c'' {
9   \property Score.currentBarNumber = #218
10   des2.()c4|e(f e)f|\break
11   r2 des4\sf()c|r2 des4\sf()c|
12 }
13 flautoII = \notes\relative c'' {
14  g2.()as4|bes(as bes)as|
15  R1*2
16 }
17 oboeI = \notes\relative c'' {
18  e2.()f4|e(f e)f|
19  r2 as|r as\sf|
20 }
21 oboeII = \notes\relative c'' {
22  g2.()as4|bes(as bes)as|
23  r2 as'|r as\sf|
24 }
25 clarinettoI = \notes\relative c' {
26   es2.()d4|c(bis c)bes|
27 % r2 es4\sf()d|r2 es4\sf()d|
28 }
29 clarinettoII = \notes\relative c' {
30   es2.()d4|c(bes c)bes|
31 % r2 es'4\sf()d|r2 es4\sf()d|
32 }
33 fagottoI = \notes\relative c' {
34   bes2.()as4|g(f g)f|
35   r r8 des' des4\sf()es|r r8 des des4\sf()es|
36 }
37 fagottoII = \notes\relative c' {
38   bes2.()as4 | g(f g)f|
39   f4 r r2 | f4 r r2|
40 }
41 cornoI = \notes\relative c''' {
42   g2. f4|g f g f|
43 % r4 r8 f f2|r4 r8 f f2|
44 }
45 cornoII = \notes\relative c''' {
46   g,2. d'4|g, d' g, d'|
47   r4 r8 d d4\sf()es|r4 r8 d d4\sf()es|
48 }
49 tromboI = \notes\relative c'' {
50   c2. c4|c c c c|
51   R1*2|
52 }
53 tromboII = \notes\relative c' {
54   c2. c4|c c c c|
55   R1*2|
56 }
57 timpani = \notes\relative c {
58   c2:16 c4 c|c c c c |
59   R1*2|
60 }
61 violinoI = \notes\relative c' {
62  des'2:16\ff des4: c:|e,: f: e: f:|
63  r8 as des,4\sf~des()c |r8 as' des,4\sf~des()c|
64 }
65 violinoII = \notes\relative c' {
66   des2:16\ff des4: c: |  bes: as: bes: as:|
67 % r8 as des,4\sf ~ des()c| r8 as' des,4\sf ~ des()c|
68 }
69 violaI = \notes\relative c' {
70   e2:16\ff e4: f:|b,: c: b: c:|
71   r4 r8 as as2\sf|r4 r8 as as2\sf|
72 }
73 violaII = \notes\relative c' {
74   bes2:16\ff bes4: as:|g: f: g: f: |
75   r4 r8 f f4\sf()ges|r4 r8 f f4\sf()ges|
76 }
77 violoncello = \notes\relative c {
78   bes2.\ff()as4|g( f g )f |
79   r4 r8 f' f4\sf()ges |r4 r8 f f4\sf()ges |
80 }
81 contrabasso = \notes\relative c {
82   bes2.\ff()as4|g( f g )f|
83   f4 r r2 |f'4 r r2|
84 }
85
86
87 #(define text-flat '((font-relative-size . -2) (music "accidentals--1")))
88
89 staffCombinePianoStaffProperties = {
90         \property PianoStaff.devNullThread = #'()
91         \property PianoStaff.soloADue = ##t
92         \property PianoStaff.soloText = #""
93         \property PianoStaff.soloIIText = #""
94         % This is non-conventional, but currently it is
95         % the only way to tell the difference.
96         \property PianoStaff.aDueText = #"\\`a2"
97         \property PianoStaff.splitInterval = #'(1 . 0)
98         \property PianoStaff.changeMoment = #`(,(make-moment 1 1) . ,(make-moment 1 1))
99         \property PianoStaff.noDirection = ##t
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 = frenchHorns <
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 = #"trumpet"
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     \paperThirteen
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