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