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