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