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