]> git.donarmstrong.com Git - lilypond.git/blob - input/les-nereides.ly
patch::: 1.3.94.jcn2
[lilypond.git] / input / les-nereides.ly
1 %{
2 cpp -P -traditional -o l.ly les-nereides.ly
3 cpp -P -traditional -o l-fake.ly  -DFAKE_GRACE les-nereides.ly
4 %}
5
6 \header{
7     composer =   "ARTHUR GRAY";
8     title =      "LES N\\'ER\\'EIDES";
9     subtitle =   "THE NEREIDS";
10     enteredby =  "JCN";
11     piece =      "Allegretto scherzando";
12     copyright =  "public domain";
13     description = "Natiest piece of competition at http://www.orphee.com/comparison/study.html, see http://www.orphee.com/comparison/gray.pdf";
14     comment =     "LilyPond (1.3.93) can't really do this yet, I guess";
15 }
16
17
18 %% cpp: don't start on first column
19  #(define (grace-beam-space-function multiplicity)
20          (* (if (<= multiplicity 3) 0.816 0.844) 0.8))
21
22 global = \notes{
23     \partial 2;
24     \key a \major;
25     \skip 2;
26     \skip 1*2;
27
28 #ifndef FAKE_GRACE
29     \skip 1;
30 #else % FAKE_GRACE
31     \skip 2.; \partial 32*24;
32     \skip 32*24;
33 #endif % FAKE_GRACE
34
35     \bar "||";
36 }
37
38 treble = \context Voice=treble \notes\relative c''{
39     % Broken?
40     \property Voice.NoteColumn \push #'horizontal-shift = #0
41     r2
42     %2
43     \property Voice.Stem \pop #'direction
44     \property Voice.Stem \push #'direction = #1
45     r4 <cis eis a cis> r2
46     %3
47     r4 <cis fis a cis> r8.
48     \translator Staff=bass
49     cis,16^2^"m.d."( <fis8 fis,> <e! e,!>
50     %4
51     <)dis,4 a' dis>
52     \translator Staff=treble
53     \property Voice.Slur \pop #'direction
54     \property Voice.Slur \push #'direction = #1
55     %% 8va
56     cis''''4^"m.g." (
57
58 #ifndef FAKE_GRACE
59
60     \property Voice.Stem \pop #'direction
61
62     % grace is a mess
63     % maybe we should fake this and put 5/4 in this bar?
64
65     \grace {
66         )cis8
67         \property Grace.Stem \pop #'direction
68         \property Grace.Stem \push #'direction = #0
69         \property Grace.Beam \push #'space-function = #grace-beam-space-function
70         %urg, dim. during grace dumps core here
71         %%[a16-5( fis dis] [cis'32 a-1 fis-4 dis] [cis a )fis-2]
72         [a16-5( fis dis] [cis32 a-1 fis-4 dis] [cis a )fis-2]
73     }
74
75 #else % FAKE_GRACE 
76
77     \property Voice.NoteHead \push #'font-size = #-1
78     \property Voice.Stem \push #'font-size = #-1
79     \property Voice.Beam \push #'font-size = #-1
80     \property Voice.TextScript \push #'font-size = #-1
81     \property Voice.Slur \push #'font-size = #-1
82     \property Voice.LocalKey \push #'font-size = #-1
83     \property Voice.Beam \push #'space-function = #grace-beam-space-function
84
85     )cis16
86     \property Voice.Stem \pop #'direction
87     \property Voice.Stem \push #'direction = #0
88     %%[a16^5( fis dis] [cis'32 a-1 fis-4 dis] [cis a )fis-2] s s s
89     [a16^5( fis dis] [cis32 a^1 fis^4 dis] [cis a )fis-2] s % s s
90
91     \property Voice.NoteHead \pop #'font-size
92     \property Voice.Stem \pop #'font-size
93     \property Voice.Beam \pop #'font-size
94     \property Voice.TextScript \pop #'font-size
95     \property Voice.Slur \pop #'font-size
96     \property Voice.LocalKey \pop #'font-size
97     \property Voice.Beam \pop #'space-function
98
99 #endif % FAKE_GRACE
100     
101
102     \property Voice.Stem \pop #'direction
103     \property Voice.Stem \push #'direction = #1
104     cis'4()bis
105     r8
106     <a'8( a,> <gis gis,> <fis fis,> <gis gis,> <fis fis,> )e^" "^1^4^5 r|
107     r<a8( a,> <gis gis,> <fis fis,> <gis gis,> <fis fis,> )e r|
108 }
109
110 trebleTwo = \context Voice=trebleTwo \notes\relative c''{
111     % Broken?
112     \property Voice.NoteColumn \push #'horizontal-shift = #1
113     s2
114     s1*2
115     s4
116     \property Voice.Stem \pop #'direction
117     \property Voice.Stem \push #'direction = #-1
118     <cis4 a fis dis>
119
120 #ifdef FAKE_GRACE
121     s32*16
122 #endif
123
124     \property Voice.NoteColumn \push #'force-hshift = #-0.2
125     <e2 gis, e d>
126     %r8 cis4. d4 [<cis8-5-4( e,-1> <b-3 d,-1> |
127     r8 cis4. d4
128     \property Voice.NoteColumn \pop #'force-hshift
129     [<cis8( e,> <b-3 d,-1> |
130     \property Voice.NoteColumn \push #'force-hshift = #-0.2
131     <)a-2 cis,-1>] cis4. d4 
132     \property Voice.NoteColumn \pop #'force-hshift
133     [<cis8( e,> <b d,> |
134     <)a cis,>]
135 }
136
137 bass = \context Voice=bass \notes\relative c{
138     \property Voice.Slur \pop #'details
139     \property Voice.Slur \push #'details =
140 %        #'((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5) (beautiful . 1.0))
141         #'((height-limit . 6.0) (ratio . 0.333) (force-blowfit . 1.0) (beautiful . 0.1))
142     \property Voice.Slur \pop #'de-uglify-parameters
143     \property Voice.Slur \push #'de-uglify-parameters =
144 %    #'(1.5  0.8  -2.0)
145     #'(2.4  0.8  4.0)
146     \property Voice.Stem \pop #'direction
147     \property Voice.Slur \push #'direction = #-1
148     % huh, auto-beamer?
149     r8. e,16-2( [<a8 a,> <b b,>] <cis4 cis,> |
150     %2
151     \translator Staff=treble
152     \property Voice.Stem \pop #'direction
153     \property Voice.Stem \push #'direction = #-1
154     \property Voice.slurEndAttachment = #'stem
155     <)a''4 eis cis> 
156     %\stemboth
157     \property Voice.slurEndAttachment = ##f
158     \translator Staff=bass
159     \property Voice.Stem \pop #'direction
160     \property Voice.Slur \pop #'y-free
161     \property Voice.Slur \push #'y-free = #0.1
162     r8. cis,,16( <fis8 fis,> <gis gis,>
163     %3
164     \property Voice.Stem \pop #'length
165     \property Voice.Stem \push #'length = #5
166     <a4 a,>
167     \translator Staff=treble
168     \property Voice.Stem \pop #'length
169     \property Voice.Stem \pop #'direction
170     \property Voice.Stem \push #'direction = #-1
171     <)a' fis cis>
172     \translator Staff=bass
173     \property Voice.Stem \pop #'direction
174     r2
175     %4
176     \property Voice.Slur \pop #'details
177     \property Voice.Slur \push #'details =
178         #'((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5) (beautiful . 0.5))
179     \property Voice.Stem \pop #'direction
180     \property Voice.Stem \push #'direction = #-1
181     <b,,4 b,>
182     \clef treble;
183     \property Voice.Stem \pop #'direction
184     \property Voice.Stem \push #'direction = #0
185     <
186         %urg: staff-change: ! on dis
187         <cis'' a fis dis!>
188 %       { s8. \clef bass;}
189     >
190
191 #ifndef FAKE_GRACE
192     %Hmm
193     %\grace { s16 s s s s32 s s s s \clef bass; s }
194     \clef bass;
195 #else
196     s4 s8 s32 s  s \clef bass; s
197 #endif
198
199     \grace { <e,,,32( e,> } <)gis'2 e>
200     %5%
201     \property Voice.Slur \pop #'direction
202     \property Voice.Slur \push #'direction = #1
203     a,8 [e'-5(<)a-2 cis-3>]
204     r b,-5 <e4-3 gis-5 d'>
205     \property Voice.Slur \pop #'direction
206     \property Voice.Slur \push #'direction = #0
207     [e,8-5(|
208     %6
209     )a-2]
210     \property Voice.Slur \pop #'direction
211     \property Voice.Slur \push #'direction = #1
212     [e'(<)a cis>] r b, <e4 gis d'>
213     \property Voice.Slur \pop #'direction
214     \property Voice.Slur \push #'direction = #0
215     [e,8(|
216     %7
217     )a]
218 }
219
220 bassTwo = \context Voice=bassTwo \notes\relative c{
221     \skip 2;
222     \skip 1*2;
223     \skip 2;
224
225 #ifdef FAKE_GRACE
226     \skip 32*16;
227 #endif
228
229     \property Voice.Stem \pop #'direction
230     \property Voice.Stem \push #'direction = #1
231     \property Voice.Slur \pop #'direction
232     \property Voice.Slur \push #'direction = #1
233
234     cis'4()bis
235 }
236
237 middleDynamics = \context Dynamics=middle \notes{
238     s8 s16 s\f s4
239     s1*2
240     %4
241     s2
242
243 #ifdef FAKE_GRACE
244     s32*12
245     s32\> s s \!s
246 #endif
247
248     s32 s-"rall." s s
249     s8 s4
250
251     \outputproperty #(make-type-checker 'dynamic-interface) 
252             #'extra-offset = #'(0 . 10)
253     s1\mf-"a tempo"
254     s8 s8\mf s4 s4 s8\> s32 s s \!s
255 }
256
257 lowerDynamics = \context Dynamics=lower \notes{
258     s2
259     %2
260     s2\sustaindown s8. s16\sustainup s4
261     %3
262     s2\sustaindown s8. s16\sustainup s4
263     %3
264
265 #ifndef FAKE_GRACE
266     s4\sustaindown s16
267     s32 s s\sustainup s
268     s32\sustaindown s s s
269     s8
270 #else
271     s2\sustaindown
272     s32*12
273     s32 s s\sustainup s
274     s32\sustaindown s s s
275 #endif
276
277     \property Dynamics.stopSustain = #""
278     s4 s16. s32\sustainup
279
280     %5
281     s8\sustaindown s s
282     \property Dynamics.stopSustain = #"*"
283     \property Dynamics.stopStartSustain = #"-P"
284     s s\sustainup\sustaindown s s
285     s\sustainup
286
287     %6
288     \property Dynamics.stopStartSustain = #""
289     s8\sustaindown s s
290     \property Dynamics.stopStartSustain = #"-P"
291     s s\sustainup\sustaindown s s
292     s\sustainup
293 }
294
295 \score{
296     \context PianoStaff <
297         \context Staff=treble <
298             \global
299             \treble
300             \trebleTwo
301         >
302         %\context Dynamics=middle <
303         %    \global
304         %    \middleDynamics
305         %>
306         \middleDynamics
307         \context Staff=bass <
308             \clef bass;
309             \global
310             \bass
311             \bassTwo
312         >
313         \context Dynamics=lower <
314             \global
315             \lowerDynamics
316         >
317     >
318     \paper {
319         \translator {
320             \ScoreContext
321             TimeSignature \push #'style = #"C"
322         }
323         \translator {
324             \type "Engraver_group_engraver";
325             \name Dynamics;
326             \consists "Output_property_engraver";
327             Generic_property_list = #generic-voice-properties
328             %Generic_property_list = #generic-lyrics-properties
329             \consists "Property_engraver";
330             DynamicsMinimumVerticalExtent = #(cons -3 -3)
331             VerticalAlignment \push #'threshold = #'(8 . 8) 
332
333             startSustain = #"Ped."
334             stopSustain = #"*"
335             stopStartSustain = #"*Ped."
336             startUnaChorda = #"una chorda"
337             stopUnaChorda = #"tre chorde"
338             % should make separate lists for stopsustain and startsustain 
339             
340             \consists "Piano_pedal_engraver";
341             \consists "Script_engraver";
342             \consists "Dynamic_engraver";
343             \consists "Text_engraver";
344             %GURGURGU, text is initialised using TextScript
345             TextScript \push #'style = #"italic"
346             TextScript \push #'font-size = #2
347
348             \consists "Skip_req_swallow_translator";
349
350             \consistsend "Axis_group_engraver";
351         }
352
353         \translator {
354             \VoiceContext
355             TextScript \push #'style = #"italic"
356         }
357         \translator {
358             \PianoStaffContext
359             \accepts Dynamics;
360             VerticalAlignment \push #'threshold = #'(8 . 8) 
361         }
362         \translator {
363             \GraceContext
364             Stem \push #'flag-style = #""
365         }
366     }
367 }