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