]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver.ly
ee09f7bee8ac7dc4a10e3b85af359e52998cadf0
[lilypond.git] / ly / engraver.ly
1
2 \version "1.3.96"
3         %
4 % setup for Request->Element conversion. Guru-only
5 %
6
7 StaffContext=\translator {
8         \type "Engraver_group_engraver";
9         \name Staff ;
10         \consists "Output_property_engraver";   
11         Generic_property_list = #generic-staff-properties
12         \consists "Property_engraver";
13         
14         \consists "Multi_measure_rest_engraver";
15
16         \consists "Bar_engraver";
17  % Bar_engraver must be first so default bars aren't overwritten
18 % with empty ones.
19
20
21 %       \consists "Repeat_engraver";
22         \consists "Volta_engraver";
23         \consists "Separating_line_group_engraver";     
24
25
26
27         \consists "Clef_engraver";
28         \consists "Key_engraver";
29         \consists "Time_signature_engraver";
30         \consists "Staff_symbol_engraver";
31         \consists "Collision_engraver";
32         \consists "Rest_collision_engraver";
33         \consists "Local_key_engraver";
34         \consists "Piano_pedal_engraver";
35
36         \consistsend "Axis_group_engraver";
37
38 %{
39         The Instrument_name_engraver puts the name of the instrument
40         (\property Staff.instrument; Staff.instr for subsequent lines)
41         to the left of a staff.
42
43         This is commented out, so you don't get funny things on the
44         PianoStaff      
45         \consists "Instrument_name_engraver";
46 %}
47
48
49           
50         \accepts "Voice";
51 }
52
53 ChoirStaffContext = \translator {
54         \type "Engraver_group_engraver";
55         \name ChoirStaff;
56         alignmentReference = \center;
57         \consists "System_start_delimiter_engraver";
58         systemStartDelimiterGlyph = #'bracket
59
60         \accepts "Staff";
61         \accepts "RhythmicStaff";
62         \accepts "GrandStaff";
63         \accepts "PianoStaff";
64         \accepts "Lyrics";
65         \accepts "ChordNames";
66 }
67
68
69 RhythmicStaffContext=\translator{
70         \type "Engraver_group_engraver";
71         
72         \consists "Property_engraver";
73         \consists "Output_property_engraver";   
74
75         Generic_property_list = #generic-staff-properties
76
77         \consists "Pitch_squash_engraver";
78         \consists "Separating_line_group_engraver";     
79         \name RhythmicStaff;
80         Bar \push #'bar-size = #4
81         VoltaBracket \push #'minimum-space =  #15  % urg, in \pt
82         VoltaBracket \push #'padding =  #5  % urg, in \pt
83         StaffSymbol \push #'line-count = #1     
84
85 %       \consists "Repeat_engraver";
86         \consists "Volta_engraver";
87         \consists "Bar_engraver";
88         \consists "Time_signature_engraver";
89         \consists "Staff_symbol_engraver";
90         \consistsend "Axis_group_engraver";
91         \accepts "Voice";
92 }
93
94
95 VoiceContext = \translator {
96         \type "Engraver_group_engraver";
97         \name Voice;
98
99         Generic_property_list = #generic-voice-properties
100         
101         \consists "Output_property_engraver";   
102         \consists "Arpeggio_engraver";
103
104         \consists "Dynamic_engraver";   % must come before text_engraver.
105         \consists "Text_spanner_engraver";
106         \consists "Property_engraver";
107         
108         \consists "Breathing_sign_engraver";
109         \consists "Rest_engraver";
110         \consists "Dot_column_engraver";
111         \consists "Stem_engraver";
112         \consists "Beam_engraver";
113         \consists "Auto_beam_engraver";
114
115         \consists "Chord_tremolo_engraver";
116         \consists "Melisma_engraver";
117         \consists "Text_engraver";
118         \consists "A2_engraver";
119         \consists "Voice_devnull_engraver";
120
121         \consists "Script_engraver";
122         \consists "Script_column_engraver";
123         \consists "Rhythmic_column_engraver";
124         \consists "Slur_engraver";
125         \consists "Tie_engraver";
126         \consists "Tuplet_engraver";
127         \consists "Grace_position_engraver";
128         \consists "Skip_req_swallow_translator";
129         \accepts Thread; % bug if you leave out this!
130         \accepts Grace;
131 }
132
133 GraceContext=\translator {
134         \type "Grace_engraver_group";
135         \name "Grace";
136         \consists "Output_property_engraver";   
137
138         Generic_property_list = #generic-grace-properties
139         
140         \consists "Note_heads_engraver";
141         \consists "Local_key_engraver";
142         \consists "Stem_engraver";
143         \consists "Beam_engraver";
144         \consists "Slur_engraver";
145         
146         \consists "Auto_beam_engraver";
147         \consists "Align_note_column_engraver";
148
149         \consists "Rhythmic_column_engraver";
150
151         \consists "Dynamic_engraver";% in Grace ???
152         \consists "Text_engraver"; % in Grace ???
153
154         \consists "Property_engraver";
155
156         Stem \push  #'style = #"grace"
157         Stem \push  #'flag-style = #"grace"
158         Stem \push  #'stem-length = #6.0
159         Stem \push  #'direction = #1
160
161         NoteHead \push #'font-size = #-1
162         Stem \push #'font-size = #-1
163         Stem \push #'stem-shorten = #'(0)
164         Beam \push #'font-size = #-1
165         TextScript \push #'font-size = #-1
166         Slur \push #'font-size = #-1
167         Accidentals \push #'font-size = #-1
168         Beam \push #'beam-thickness = #0.3
169         Beam \push #'beam-space-function = #(lambda (x) 0.5)
170
171         Stem \push #'lengths = #(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0))
172         Stem \push #'beamed-lengths =
173                 #'(0.0 2.5 2.0 1.5)
174         Stem \push #'minimum-beamed-lengths
175                  = #(map (lambda (x) (* 0.8 x)) '(0.0 2.5 2.0 1.5))
176
177         weAreGraceContext = ##t   
178         graceAccidentalSpace= 1.5 ; % in staff space
179 }
180
181 ThreadContext = \translator{
182         \type Engraver_group_engraver;
183         \consists "Thread_devnull_engraver";
184         \consists "Note_heads_engraver";
185         \consists "Output_property_engraver";   
186         Generic_property_list = #generic-thread-properties
187         \consists "Property_engraver";
188         \name Thread;
189 }
190
191 GrandStaffContext=\translator{
192         \type "Engraver_group_engraver";
193         \name GrandStaff;
194         \consists "Span_bar_engraver";
195         \consists "Span_arpeggio_engraver";
196         \consists "System_start_delimiter_engraver";
197         systemStartDelimiterGlyph = #'brace
198         
199         \consists "Property_engraver";  
200         Generic_property_list = #generic-grand-staff-properties
201         \accepts "Staff";
202 }
203
204 PianoStaffContext = \translator{
205         \GrandStaffContext
206         \name "PianoStaff";
207
208         \consists "Vertical_align_engraver";
209
210         alignmentReference = \center;
211         VerticalAlignment \push #'threshold = #'(12 . 12) 
212
213 %       \consistsend "Axis_group_engraver";
214 }
215
216 StaffGroupContext= \translator {
217         \type "Engraver_group_engraver";
218         \name StaffGroup;
219
220         \consists "Span_bar_engraver";
221         \consists "Span_arpeggio_engraver";
222         \consists "Output_property_engraver";   
223         systemStartDelimiterGlyph = #'bracket
224         \consists "System_start_delimiter_engraver";
225         \accepts "Staff";
226         \accepts "RhythmicStaff";
227         \accepts "GrandStaff";
228         \accepts "PianoStaff";
229         
230         \accepts "Lyrics";
231         \accepts "ChordNames";
232 }
233
234
235 % UGH! JUNKME
236 LyricsVoiceContext= \translator{
237         \type "Engraver_group_engraver";
238         \consistsend "Axis_group_engraver";
239         LyricVoiceMinimumVerticalExtent = #(cons -1.2 1.2)
240
241         \name LyricVoice ;
242         \consists "Separating_line_group_engraver";
243         \consists "Lyric_engraver";
244         \consists "Extender_engraver";
245         \consists "Hyphen_engraver";
246         \consists "Stanza_number_engraver";
247         phrasingPunctuation = #".,;:!?\""
248         
249 }
250 NoteNamesContext = \translator {
251         \type "Engraver_group_engraver";
252         \name NoteNames;
253         \consistsend "Axis_group_engraver";
254         \consists "Note_name_engraver";
255         \consists "Separating_line_group_engraver";
256 }
257
258 LyricsContext = \translator {
259         \type "Engraver_group_engraver";
260         \name Lyrics;
261         \consists Vertical_align_engraver; %need this for getting folded repeats right.
262         Generic_property_list = #generic-lyrics-properties
263         \consists "Property_engraver";
264         \consistsend "Axis_group_engraver";
265         
266         \accepts "LyricVoice";
267 }
268
269 ChordNamesVoiceContext = \translator {
270         \type "Engraver_group_engraver";
271         \name ChordNamesVoice ;
272
273         \consists "Output_property_engraver";   
274         \consistsend "Axis_group_engraver";
275         \consists "Separating_line_group_engraver";
276         \consists "Chord_name_engraver";
277 }
278 ChordNamesContext = \translator {
279         \type "Engraver_group_engraver";
280         \name ChordNames;
281
282         Generic_property_list = #generic-chord-staff-properties
283         \consists "Property_engraver";  
284         \consists "Output_property_engraver";   
285         \accepts "ChordNamesVoice";
286         \consistsend "Axis_group_engraver";
287         }
288
289
290 ScoreWithNumbers = \translator {
291         \type "Score_engraver";
292
293         % uncomment to bar numbers on a whole system.
294         \consists "Bar_number_engraver";
295 }
296
297 StupidScore = \translator {
298         \type "Score_engraver";
299         \name Score;
300         \consists "Note_heads_engraver";
301 }
302
303
304
305 BarNumberingStaffContext = \translator {
306         \StaffContext
307         \consists "Mark_engraver";
308 }
309
310 HaraKiriStaffContext = \translator {
311         \StaffContext
312         \remove "Axis_group_engraver";
313         \consistsend "Hara_kiri_engraver";        
314         \consists "Instrument_name_engraver";
315         \accepts "Voice";
316 }
317 %{
318   The HaraKiriStaffContexts doesn't override \name,
319   so it is still named `Staff'.
320
321   %\translator { \HaraKiriStaffContext }
322 %}
323
324 OrchestralPartStaffContext = \translator {
325         \StaffContext
326         \consists "Mark_engraver";
327 }
328
329 ScoreContext = \translator {
330         \type Score_engraver;
331         \name Score;
332         
333
334         \consists "Repeat_acknowledge_engraver";
335         \consists "Timing_engraver";
336         \consists "Output_property_engraver";   
337         \consists "System_start_delimiter_engraver";
338         \consists "Mark_engraver";      
339         \consists "Break_align_engraver";
340         \consists "Spacing_engraver";
341         \consists "Vertical_align_engraver";
342
343         \consists "Lyric_phrasing_engraver";
344         \consists "Bar_number_engraver";
345         \consists "Span_arpeggio_engraver";
346
347         
348         \accepts "Staff";
349         \accepts "StaffGroup";
350         \accepts "RhythmicStaff";       
351         \accepts "Lyrics";
352         \accepts "ChordNames";
353         \accepts "GrandStaff";
354         \accepts "ChoirStaff";
355         \accepts "PianoStaff";
356         \accepts "NoteNames";
357
358         soloText = #"Solo"
359         soloIIText = #"Solo II"
360         aDueText = #"\\`a2"
361         soloADue = ##t
362         splitInterval = #'(0 . 1)
363         changeMoment = #`(,(make-moment 0 0) . ,(make-moment 1 512))
364
365         defaultClef = #"treble"
366
367         StaffMinimumVerticalExtent = #(cons -4.0 4.0)
368
369         barAuto = ##t
370         voltaVisibility = ##t
371         %  name, glyph id, c0 position
372         supportedClefTypes = #'(
373           ("treble" . ("clefs-G" -2))
374           ("violin" . ("clefs-G" -2))
375           ("G" . ("clefs-G" -2))
376           ("G2" . ("clefs-G" -2))
377           ("french" . ("clefs-G" -4 ))
378           ("soprano" . ("clefs-C" -4 ))
379           ("mezzosoprano" . ("clefs-C" -2 ))
380           ("alto" . ("clefs-C" 0 ))
381           ("tenor" . ("clefs-C" 2 ))
382           ("baritone" . ("clefs-C" 4 ))
383           ("varbaritone"  . ("clefs-F" 0))
384           ("bass" . ("clefs-F" 2 ))
385           ("F" . ( "clefs-F" 2))
386           ("subbass" . ("clefs-F" 4))
387         )
388         % where is c0 in this clef?
389         clefPitches = #'(("clefs-G" . -4)
390           ("clefs-C" . 0)
391           ("clefs-F" . 4))
392                 
393
394         automaticPhrasing = ##t;
395         alignmentReference = \down;
396         defaultClef = #"treble"
397         defaultBarType = #"|"
398         systemStartDelimiterGlyph = #'bar-line
399         explicitClefVisibility = #all-visible
400         explicitKeySignatureVisibility = #all-visible
401         
402         scriptDefinitions = #default-script-alist
403
404         startSustain = #"Ped."
405         stopSustain = #"*"
406         stopStartSustain = #"*Ped."
407         startUnaChorda = #"una chorda"
408         stopUnaChorda = #"tre chorde"
409         % should make separate lists for stopsustain and startsustain 
410
411
412        %
413        % what order to print accs.  We could compute this, 
414        % but computing is more work than putting it here.
415        %
416        % Flats come first, then sharps.
417        keyAccidentalOrder = #'(
418          (6 . -1) (2  . -1) (5 . -1 ) (1  . -1) (4  . -1) (0  . -1) (3  . -1)
419          (3  . 1) (0 . 1) (4 . 1) (1 . 1) (5 . 1) (2 . 1) (6 . 1)
420        )
421         breakAlignOrder = #'(
422           Instrument_name
423           Left_edge_item
424           Span_bar
425           Breathing_sign
426           Clef_item
427           Key_item
428           Staff_bar
429           Time_signature
430           Stanza_number
431         )
432        
433         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
434         % TODO: uniform naming.;  
435         %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
436
437
438         %
439         % distances are given in stafflinethickness (thicknesses) and
440         % staffspace (distances)
441         %
442         Arpeggio = #`(
443                 (interfaces . (arpeggio-interface side-position-interface))
444                 (X-extent-callback . ,Arpeggio::width_callback)
445                 (molecule-callback . ,Arpeggio::brew_molecule)
446                 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
447                 (X-offset-callbacks . (,Side_position::aligned_side))
448                 (right-padding . 0.4)  ; Hmm, not generic?
449                 (direction . -1)
450                 (staff-position . 0.0)
451                 (name . "Arpeggio") 
452         )
453         BarLine = #`(
454                 (interfaces . (bar-interface staff-bar-interface))
455                 (break-align-symbol . Staff_bar)
456                 (glyph . "|")
457                 (break-glyph-function . ,default-break-barline)
458                 (barsize-procedure . ,Bar::get_staff_bar_size)
459                 (molecule-callback . ,Bar::brew_molecule)          
460                 (visibility-lambda . ,all-visible)
461                 (breakable . #t)
462                 (before-line-breaking-callback . ,Bar::before_line_breaking)
463                 ;;
464                 ;; Ross. page 151 lists other values, we opt for a leaner look
465                 ;; 
466                 (kern . 3.0)
467                 (thin-kern . 3.0)
468                 (hair-thickness . 1.6)
469                 (thick-thickness . 6.0)
470                 (name . "BarLine")
471         )
472
473         BarNumber = #`(
474                 (molecule-callback . ,Text_item::brew_molecule)
475                 (breakable . #t)
476                 (visibility-lambda . ,begin-of-line-visible)
477                 (padding . 1.0)
478                 (direction . 1)
479                 (properties-to-font-name . ,properties-to-font-name)
480                 (style-to-font-name . ,style-to-font-name)
481                 (markup-to-properties . ,markup-to-properties)
482                 (font-family . roman)
483                 (name . "BarNumber")
484         )
485
486         Beam = #basic-beam-properties
487
488         BreakAlignment = #`(
489                 (breakable . #t)
490                 (interfaces . (break-align-interface))
491                 (stacking-dir . 1)
492                 (axes 0)
493                 (X-offset-callbacks . (,Break_align_interface::self_align_callback))
494                 (space-alist . ,default-break-align-space-alist) 
495                 (name . "BreakAlignment")               
496         )
497
498         BreakAlignGroup = #`(
499                 (interfaces . (axis-group-interface))
500                 (axes  . (0))
501                 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
502                 
503                 (name . "BreakAlignGroup")
504         )
505
506         BreathingSign = #`(
507                 (interfaces . (breathing-sign-interface))
508                 (break-align-symbol . Breathing_sign)
509                 (breakable . #t )
510                 (molecule-callback . ,Breathing_sign::brew_molecule)
511                 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
512                 (visibility-lambda . ,begin-of-line-invisible)
513                 (name . "BreathingSign")
514         )
515
516         Clef = #`(
517            (interfaces .  (clef-interface))
518            (molecule-callback . ,Score_element::brew_molecule)
519            (before-line-breaking-callback . ,Clef::before_line_breaking)
520            (breakable . #t)
521            (break-align-symbol . Clef_item)
522            (visibility-lambda . ,begin-of-line-visible)
523            (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
524            (name . "Clef")
525         )
526
527         ChordNames = #`(
528                 (molecule-callback . ,Chord_name::brew_molecule)
529                 (interfaces . (chord-name-interface))
530                 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
531                 (chord-name-function . ,default-chord-name-function)
532                 (properties-to-font-name . ,properties-to-font-name)
533                 (style-to-font-name . ,style-to-font-name)
534                 (markup-to-properties . ,markup-to-properties)
535                 (font-family . roman)
536                 (name . "ChordNames")  
537         )
538
539         NoteCollision = #`(
540                 (axes 0 1)
541                 (interfaces . (collision-interface))
542                 (note-width . 1.65)
543                 (name . "NoteCollision")
544         )
545
546         Crescendo = #`(
547                 (molecule-callback . ,Crescendo::brew_molecule)
548                 (interfaces . (crescendo-interface dynamic-interface))
549                 (thickness . 1.0)
550                 (shorten-for-letter  .  4.0)
551                 (height . 0.6666)
552                 (dash-thickness . 1.2)
553                 (dash-length . 4.0)
554                 (name . "Crescendo")
555                 (self-alignment-Y . 0)
556                 (Y-offset-callbacks . (,Side_position::aligned_on_self))
557         )
558
559         DotColumn = #`(
560                 (interfaces . (dot-column-interface axis-group-interface ))
561                 (axes 0 )
562                 (name . "DotColumn")
563         )
564
565         Dots = #`(
566                 (interfaces . (dot-interface))
567                 (molecule-callback . ,Dots::brew_molecule)
568                 (dot-count . 1)
569                 (staff-position . 0.0)
570                 (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
571
572                 (name . "Dots")         
573         )
574         
575         DynamicText = #`(
576                 (interfaces . (dynamic-interface))
577                 (Y-offset-callbacks . (,Side_position::aligned_on_self))
578                 (molecule-callback . ,Text_item::brew_molecule)
579                 (font-style . dynamic)
580                 (properties-to-font-name . ,properties-to-font-name)
581                 (style-to-font-name . ,style-to-font-name)
582                 (markup-to-properties . ,markup-to-properties)
583                 (script-priority . 100)
584                 (self-alignment-Y . 0)
585                 (name . "DynamicText")
586         )
587         
588         DynamicLineSpanner = #`(
589                 (interfaces . (dynamic-interface axis-group-interface side-position-interface))
590                 (axes . ( 1))
591                 (padding . 3)
592                 (minimum-space . 6)
593                 (name . "dynamic alignment")
594         )
595         
596         LeftEdge = #`(
597                 (break-align-symbol . Left_edge_item)
598                 (breakable . #t)
599                 (name . "LeftEdge")
600         )
601         
602         Fingering = #`(
603                 (interfaces . (finger-interface text-script-interface text-item-interface side-position-interface))
604                 (molecule-callback . ,Text_item::brew_molecule)
605                 (padding .      3.0)
606                 (self-alignment-X . 0)
607                 (name . "Fingering") 
608         )
609
610         GraceAlignment = #`(
611                 (interfaces . (axis-group-interface align-interface))
612                 (axes . (0))
613                 (horizontal-space . 1.2)
614                 (padding . 1.0)
615                 (before-line-breaking-callback . ,Grace_align_item::before_line_breaking)
616                 (name . "GraceAlignment")
617         )
618         
619         HaraKiriVerticalGroup = #`(
620                 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
621                 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
622                 (interfaces . (hara-kiri-group-interface))
623                 (axes 1)
624                 (name . "HaraKiriVerticalGroup")
625         )
626
627         LyricHyphen = #`(
628                 (interfaces  . (lyric-hyphen-interface))        
629                 (thickness . 1.0)
630                 (height . 0.4)
631                 (minimum-length .  0.5) 
632                 (molecule-callback . ,Hyphen_spanner::brew_molecule)
633                 (Y-extent-callback . ,Score_element::point_dimension_callback)
634                 (name . "LyricHyphen")
635         )
636         
637         InstrumentName = #`(
638                 (interfaces . (instrument-name-interface))
639                 (breakable . #t)
640                 (Y-offset-callbacks . (,Side_position::centered_on_parent))
641                 (molecule-callback . ,Text_item::brew_molecule)         
642                 (break-align-symbol . Instrument_name)
643                 (visibility-lambda . ,begin-of-line-visible)
644                 (properties-to-font-name . ,properties-to-font-name)
645                 (style-to-font-name . ,style-to-font-name)
646                 (markup-to-properties . ,markup-to-properties)
647                 (font-family . roman)
648                 (name . "InstrumentName")
649         )
650         
651         KeySignature = #`(
652           (interfaces . (key-item-interface))
653           (molecule-callback . ,Key_item::brew_molecule)
654           (break-align-symbol . Key_item)
655           (visibility-lambda . ,begin-of-line-visible)
656           (breakable . #t)
657           (name . "KeySignature")
658         )
659         
660         Accidentals = #`(
661                 (molecule-callback . ,Local_key_item::brew_molecule)
662                 (X-offset-callbacks . (,Side_position::aligned_side))
663                 (direction . -1)
664                 (left-padding . 0.2)
665                 (right-padding . 0.4)
666                 (interfaces . (accidentals-interface))
667                 (name .  "Accidentals")
668         )
669         
670         LineOfScore = #`(
671                 (axes . (0 1))
672                 (interfaces . (axis-group-interface))
673                 (name .  "LineOfScore")
674         )
675         
676         LyricExtender = #`(
677                 (interfaces . (lyric-extender-interface))
678                 (molecule-callback . ,Lyric_extender::brew_molecule)
679                 (height . 0.8) ; stafflinethickness;
680                 (right-trim-amount . 0.5)
681                 (Y-extent-callback . ,Score_element::point_dimension_callback)
682                 (name . "LyricExtender")
683         )
684         
685         LyricText = #`(
686                 (interfaces .  (lyric-syllable-interface text-item-interface))
687                 (molecule-callback . ,Text_item::brew_molecule)
688                 (X-offset-callbacks . (,Side_position::aligned_on_self))
689                 (self-alignment-X . 0)
690                 (non-rhythmic . #t)
691                 (word-space . 0.6)
692                 (properties-to-font-name . ,properties-to-font-name)
693                 (style-to-font-name . ,style-to-font-name)
694                 (markup-to-properties . ,markup-to-properties)
695                 (font-family . roman)
696                 (name . "LyricText") 
697         )
698         
699         RehearsalMark = #`(
700                 (interfaces . (mark-interface side-position-interface))
701                 (molecule-callback . ,Text_item::brew_molecule) 
702                 (breakable . #t)
703                 (visibility-lambda . ,end-of-line-invisible)
704                 (padding . 4.0)
705                 (properties-to-font-name . ,properties-to-font-name)
706                 (style-to-font-name . ,style-to-font-name)
707                 (markup-to-properties . ,markup-to-properties)
708                 (font-style . mark)
709                 (name . "RehearsalMark")
710         )
711         
712         MultiMeasureRest = #`(
713                 (interfaces . (multi-measure-rest-interface))
714                 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
715                 (molecule-callback . ,Multi_measure_rest::brew_molecule)
716                 (staff-position . 0)
717                 (expand-limit . 10)
718                 (padding . 2.0) ; staffspace
719                 (minimum-width . 12.5) ; staffspace
720                 (name . "MultiMeasureRest")
721         )
722         
723         NoteColumn = #`(
724                 (interfaces . (axis-group-interface note-column-interface))
725                 (axes 0 1)
726                 (name . "NoteColumn")
727         )
728         
729         NoteHead = #`(
730                 (interfaces . (note-head-interface rhythmic-head-interface))
731                 (style . default)
732                 (molecule-callback . ,Note_head::brew_molecule)
733                 (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
734                 (name . "NoteHead")
735         )
736
737         NoteName = #`(
738                 (molecule-callback . ,Text_item::brew_molecule)
739                 (name . "NoteName")
740         )
741
742         OctavateEight  = #`(
743                 (self-alignment-X . 0)
744                 (text . "8")
745                 (visibility-lambda . ,begin-of-line-visible)
746                 (X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
747                 (Y-offset-callbacks . (,Side_position::aligned_side))
748                 (molecule-callback . ,Text_item::brew_molecule)
749                 (font-shape . "italic")
750                 (properties-to-font-name . ,properties-to-font-name)
751                 (style-to-font-name . ,style-to-font-name)
752                 (markup-to-properties . ,markup-to-properties)
753                 (name . "OctavateEight")
754         )
755         
756         PaperColumn = #`(
757                 (interfaces . (paper-column-interface axis-group-interface))
758                 (axes 0)
759                 (before-musical-spacing-factor . 0.4)
760                 (name . "PaperColumn")
761         )
762         NonMusicalPaperColumn = #`(
763                 (interfaces . (paper-column-interface axis-group-interface))
764                 (axes 0)
765                 (before-musical-spacing-factor . 1.0)
766                 (name . "PaperColumn")
767         )
768
769         Rest = #`(
770                 (interfaces . (rest-interface rhythmic-head-interface))
771                 (after-line-breaking-callback . ,Rest::after_line_breaking)
772                 (molecule-callback . ,Rest::brew_molecule)
773                 (minimum-beam-collision-distance . 1.5)
774                 (name . "Rest")
775         )
776         
777         RestCollision = #`(
778                 (interfaces . (rest-collision-interface))
779                 (minimum-distance . 0.75)
780                 (name . "RestCollision")                
781         )
782
783         Script = #`(
784                 (molecule-callback . ,Script::brew_molecule)
785                 (interfaces . (script-interface side-position-interface))
786                 (X-offset-callbacks . (,Side_position::centered_on_parent))
787                 (name . "Script")
788         )
789         
790         ScriptColumn = #`(
791                 (before-line-breaking-callback . ,Script_column::before_line_breaking)
792                 (name . "ScriptColumn")
793         )
794         
795         Slur = #`(
796                 (interfaces . (slur-interface))
797                 (molecule-callback . ,Slur::brew_molecule)
798                 (thickness . 1.2)               
799                 (spacing-procedure . ,Slur::set_spacing_rods)           
800                 (minimum-length . 1.5)
801                 (after-line-breaking-callback . ,Slur::after_line_breaking)
802                 (extremity-rules . ,default-slur-extremity-rules)
803                 (extremity-offset-alist . ,default-slur-extremity-offset-alist)
804                 (de-uglify-parameters . ( 1.5  0.8  -2.0))
805                 (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)))
806                 (beautiful . 0.5)
807                 (y-free . 0.75)
808                 (slope-limit . 0.8)
809                 (attachment-offset . ((0 . 0) . (0 . 0)))
810                 (name . "Slur")
811                 )
812
813         SpacingSpanner =#`(
814                 (spacing-procedure . ,Spacing_spanner::set_springs)
815
816                 ;; assume that notes at least this long are present.
817                 (maximum-duration-for-spacing . ,(make-moment 1 8))
818                 (name . "SpacingSpanner")
819         )
820         SpanBar = #`(
821                 (interfaces . (bar-interface span-bar-interface))
822                 (break-align-symbol . Staff_bar)
823                 (barsize-procedure . ,Span_bar::get_bar_size) 
824                 (molecule-callback . ,Bar::brew_molecule)
825                 (visibility-lambda . ,begin-of-line-invisible)
826                 (X-extent-callback . ,Span_bar::width_callback)
827                 (Y-offset-callbacks . (,Span_bar::center_on_spanned_callback))
828                 
829                 (breakable . #t)
830                 (glyph . "|")
831                 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
832                 ;; ugh duplication! 
833                 
834                 ;;
835                 ;; Ross. page 151 lists other values, we opt for a leaner look
836                 ;; 
837                 (kern . 3.0)
838                 (thin-kern . 3.0)
839                 (hair-thickness . 1.6)
840                 (thick-thickness . 6.0)
841                 (name . "SpanBar")
842         )
843
844         StanzaNumber = #`(
845                 (breakable . #t)
846                 (molecule-callback . ,Text_item::brew_molecule)         
847                 (break-align-symbol . Clef_item)
848                 (visibility-lambda . ,begin-of-line-visible)
849                 (name . "StanzaNumber")
850         )
851
852         StaffSymbol = #`(
853                 (interfaces . (staff-symbol-interface ))
854                 (molecule-callback . ,Staff_symbol::brew_molecule)
855                 (staff-space . 1.0)
856                 (line-count . 5 )
857                 (name . "StaffSymbol")
858         )
859
860         SystemStartDelimiter = #`(
861                 (molecule-callback . ,System_start_delimiter::brew_molecule)
862                 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
863                 (collapse-height . 1.0)
864                 (thickness . 1.6)
865                 (arch-height . 1.5)
866                 (arch-angle . 50.0)
867                 (arch-thick . 0.25)
868                 (arch-width . 1.5)
869                 (bracket-thick . 0.25)
870                 (bracket-width . 2.0)
871                 (name . "SystemStartDelimiter")
872         )
873
874         TextScript = #`(
875                 (molecule-callback . ,Text_item::brew_molecule)
876                 (no-spacing-rods . #t)
877                 (interfaces . (text-script-interface text-item-interface side-position-interface))
878                 (padding . 0.5)
879                 (properties-to-font-name . ,properties-to-font-name)
880                 (style-to-font-name . ,style-to-font-name)
881                 (markup-to-properties . ,markup-to-properties)
882                 (name . "TextScript") 
883         )
884         TextSpanner = #`(
885                 (interfaces . (text-spanner-interface))
886                 (molecule-callback . ,Text_spanner::brew_molecule)
887                 (type . "line")
888                 (direction . 1)
889                 (font-shape . "italic")
890                 (properties-to-font-name . ,properties-to-font-name)
891                 (style-to-font-name . ,style-to-font-name)
892                 (markup-to-properties . ,markup-to-properties)
893                 (name . "TextSpanner")          
894         )
895         Tie = #`(
896                 (interfaces . (tie-interface))
897                 (molecule-callback . ,Tie::brew_molecule)
898                 (spacing-procedure . ,Tie::set_spacing_rods)
899                 (staffline-clearance . 0.24)
900                 (details . ((ratio . 0.333) (height-limit . 1.0)))
901                 (thickness . 1.2)
902                 (x-gap . 0.2)
903                 (minimum-length  . 2.5)
904                 (name . "Tie")
905         )
906
907         TieColumn = #`(
908                 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
909                 (interfaces . (tie-column-interface))
910                 (name . "TieColumn")            
911         )
912
913         TimeSignature = #`(
914                 (interfaces . (time-signature-interface))
915                 (molecule-callback . ,Time_signature::brew_molecule)
916                 (break-align-symbol . Time_signature)
917                 (visibility-lambda . ,all-visible)
918                 (breakable . #t)
919                 (properties-to-font-name . ,properties-to-font-name)
920                 (style-to-font-name . ,style-to-font-name)
921                 (markup-to-properties . ,markup-to-properties)
922                 (font-style . timesig)
923                 (name . "TimeSignature")
924         )
925
926         TupletBracket = #`(
927                 (interfaces . (tuplet-spanner-interface))
928                 (number-gap . 2.0)   
929                 (delta-y . 0)
930                 (thick . 1.0)
931                 (after-line-breaking-callback . ,Tuplet_spanner::after_line_breaking)
932                 (molecule-callback . ,Tuplet_spanner::brew_molecule)
933                 (properties-to-font-name . ,properties-to-font-name)
934                 (style-to-font-name . ,style-to-font-name)
935                 (markup-to-properties . ,markup-to-properties)
936                 (font-shape . "italic")
937                 (name . "TupletBracket")
938         )       
939
940         SostenutoPedal = #`(
941                 (molecule-callback . ,Text_item::brew_molecule)
942                 (X-offset-callbacks . (,Side_position::aligned_on_self))
943                 (Y-offset-callbacks .
944                  (,Side_position::aligned_side
945                   ,Side_position::centered_on_parent))
946
947                 (font-shape . "italic")
948                 (properties-to-font-name . ,properties-to-font-name)
949                 (style-to-font-name . ,style-to-font-name)
950                 (markup-to-properties . ,markup-to-properties)
951                 (no-spacing-rods . #t)
952                 (self-alignment-X . 0)
953                 (name  . "SostenutoPedal")
954                                 
955         )
956
957         Stem = #`(
958                 (interfaces . (stem-interface))
959                 (before-line-breaking-callback . ,Stem::before_line_breaking)
960                 (molecule-callback . ,Stem::brew_molecule)
961                 (thickness . 0.8)
962                 (beamed-lengths . (0.0 2.5 2.0 1.5))
963                 (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
964                 
965 ;;  Stems in unnatural (forced) direction should be shortened,
966 ;;  according to [Roush & Gourlay].  Their suggestion to knock off
967 ;;  a whole staffspace seems a bit drastical: we'll do half.
968
969                 (lengths . (3.5 3.5 3.5 4.5 5.0))
970                 (stem-shorten . (0.5))
971                 ; if stem is on middle line, choose this direction.
972                 (default-neutral-direction . 1)
973                 (X-offset-callbacks . (,Stem::off_callback))            
974                 (name . "Stem")
975         )
976
977         StemTremolo = #`(
978                 (molecule-callback . ,Stem_tremolo::brew_molecule)
979                 (beam-width . 2.0) ; staff-space
980                 (beam-thickness . 0.42) ; staff-space
981                 (beam-space-function . ,default-beam-space-function)
982                 (name . "StemTremolo")
983         )
984
985         SeparationItem = #`(
986                 (interfaces . (separation-item-interface))
987                 (name . "SeparationItem")
988         )
989
990         SeparatingGroupSpanner = #`(
991                 (interfaces . (separation-spanner-interface))
992                 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
993                 (name . "SeparatingGroupSpanner")
994         )
995
996         SustainPedal = #`(
997                 (interfaces . (sustain-pedal-interface  side-position-interface))
998                 (no-spacing-rods . #t)
999                 (molecule-callback . ,Sustain_pedal::brew_molecule)
1000                 (self-alignment-X . 0)
1001                 (X-offset-callbacks . (,Side_position::aligned_on_self))
1002                 (Y-offset-callbacks .
1003                  (,Side_position::aligned_side
1004                   ,Side_position::centered_on_parent))
1005
1006                 (name . "SustainPedal")         
1007         )       
1008         UnaChordaPdeal = #`(
1009                 (molecule-callback . ,Text_item::brew_molecule)
1010                 (font-shape . "italic")
1011                 (properties-to-font-name . ,properties-to-font-name)
1012                 (style-to-font-name . ,style-to-font-name)
1013                 (markup-to-properties . ,markup-to-properties)
1014                 (no-spacing-rods . #t)
1015                 (self-alignment-X . 0)
1016                 (X-offset-callbacks . (,Side_position::aligned_on_self))
1017                 (Y-offset-callbacks .
1018                  (,Side_position::aligned_side
1019                   ,Side_position::centered_on_parent))
1020
1021                 (name . "UnaChordaPedal")
1022         )
1023
1024         VoltaBracket = #`(
1025                 (molecule-callback . ,Volta_spanner::brew_molecule)
1026                 (interfaces . (volta-spanner-interface side-position-interface))
1027                 (direction . 1)
1028                 (padding . 5)
1029                 (thickness . 1.6)  ;  stafflinethickness
1030                 (height . 2.0) ; staffspace;
1031                 (minimum-space . 25)
1032                 (properties-to-font-name . ,properties-to-font-name)
1033                 (style-to-font-name . ,style-to-font-name)
1034                 (markup-to-properties . ,markup-to-properties)
1035                 (font-style . volta)
1036                 (name . "VoltaBracket")
1037         )       
1038
1039         VerticalAlignment = #`(
1040                 (axes 1)
1041                 (interfaces . (align-interface axis-group-interface))
1042                 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1043                 (X-extent-callback . #f)
1044                 (stacking-dir . -1)
1045                 (name . "VerticalAlignment")
1046         )
1047
1048         VerticalAxisGroup = #`(
1049                 (axes 1)
1050                 (interfaces . (axis-group-interface))
1051                 (name . "VerticalAxisGroup")
1052         )
1053
1054
1055         \include "auto-beam-settings.ly";
1056
1057 }
1058
1059 OrchestralScoreContext= \translator {
1060         \ScoreContext
1061 }
1062