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