]> git.donarmstrong.com Git - lilypond.git/blob - scm/grob-description.scm
''
[lilypond.git] / scm / grob-description.scm
1 ;;;; grob-description.scm -- part of generated backend documentation
2 ;;;;
3 ;;;;  source file of the GNU LilyPond music typesetter
4 ;;;; 
5 ;;;; (c) 1998--20.301  Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
7
8 ;;;; distances are given in stafflinethickness (thicknesses) and
9 ;;;; staffspace (distances)
10
11 ;;;; WARNING: the meta field should be the last one.
12
13 ;; TODO: junk the meta field in favor of something more compact?
14 (define all-grob-descriptions
15   `(
16     (Accidentals
17      . (
18         (molecule-callback . ,Local_key_item::brew_molecule)
19         (X-offset-callbacks . (,Side_position_interface::aligned_side))
20         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))     
21         (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
22         (direction . -1)
23         (left-padding . 0.2)
24         (right-padding . 0.5)
25         (paren-cautionaries . #t)
26         (font-family . music)
27         (meta . ((interfaces . (accidentals-interface staff-symbol-referencer-interface font-interface side-position-interface))))
28         ))
29     (Accidental
30      . (
31         (molecule-callback . ,Accidental_interface::brew_molecule)
32         (font-family . music)
33         (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)             (meta . ((interfaces . (accidental-interface font-interface))))
34         ))
35     (AccidentalPlacement
36      . (
37         (X-extent-callback . ,Accidental_placement::extent_callback)
38         (left-padding . 0.3)
39         (right-padding . 0.3)
40         (meta . ((interfaces . (accidental-placement-interface))))
41         ))
42
43     (Arpeggio
44      . (
45         (X-extent-callback . ,Arpeggio::width_callback)
46         (Y-extent-callback . #f)               
47         (molecule-callback . ,Arpeggio::brew_molecule)
48         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
49         (X-offset-callbacks . (,Side_position_interface::aligned_side))
50         (direction . -1)
51         (staff-position . 0.0)
52         (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface font-interface))))
53         ))
54
55     (BarLine
56      . (
57         (break-align-symbol . staff-bar)
58         (glyph . "|")
59         (break-glyph-function . ,default-break-barline)
60         (bar-size-procedure . ,Bar_line::get_staff_bar_size)
61         (molecule-callback . ,Bar_line::brew_molecule)     
62         (visibility-lambda . ,all-visible)
63         (breakable . #t)
64         (before-line-breaking-callback . ,Bar_line::before_line_breaking)
65         (space-alist . (
66                         (time-signature . (extra-space . 0.75)) 
67                         (custos . (minimum-space . 2.0))
68                         (clef .   (minimum-space . 1.0))
69                         (first-note . (extra-space . 1.3))
70                         ))
71
72         ;;
73         ;; Ross. page 151 lists other values, we opt for a leaner look
74         ;; 
75         (kern . 3.0)
76         (thin-kern . 3.0)
77         (hair-thickness . 1.6)
78         (thick-thickness . 6.0)
79         (meta . ((interfaces . (bar-line-interface  break-aligned-interface font-interface))))
80         ))
81
82     
83     (BarNumber
84      . (
85         (molecule-callback . ,Text_item::brew_molecule)
86         (breakable . #t)
87         (visibility-lambda . ,begin-of-line-visible)
88         (padding . 1.0)
89         (direction . 1)
90         (font-family . roman)
91         (font-relative-size . -1)
92         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
93         (meta .
94               ((interfaces . (side-position-interface
95                               text-interface
96                               font-interface break-aligned-interface))))
97
98              ))
99
100     (BassFigure
101      . (
102         (molecule-callback . ,brew-bass-figure)
103         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
104         (direction . 0)
105         (font-family . number)
106         (font-relative-size . -1)
107         (padding . 0.1)
108         (kern . 0.2)
109         (thickness . 1.0)
110         (meta . ((interfaces . (text-interface bass-figure-interface self-alignment-interface font-interface))))
111         ))
112     (Beam
113      . (
114         ;; todo: clean this up a bit: the list is getting
115         ;; rather long.
116         (molecule-callback . ,Beam::brew_molecule)
117         (concaveness-gap . 2.0)
118         (concaveness-threshold . 0.08)
119         (positions . (#f . #f))
120         (position-callbacks . (,Beam::least_squares
121                                ,Beam::check_concave
122                                ,Beam::slope_damping
123                                ,Beam::quanting
124                               ))
125
126         ;; TODO: should be in SLT.
127         (thickness . 0.48) ; in staff-space
128         (before-line-breaking-callback . ,Beam::before_line_breaking)
129         (after-line-breaking-callback . ,Beam::after_line_breaking)
130         (neutral-direction . -1)
131         (dir-function . ,beam-dir-majority-median)
132         (beamed-stem-shorten . (1.0 0.5))
133         (outer-stem-length-limit . 0.2)
134         (slope-limit . 0.2)
135         (flag-width-function . ,default-beam-flag-width-function)
136         (damping . 1)
137         (auto-knee-gap . 7)
138         (font-name . "cmr10")
139         (space-function . ,Beam::space_function)
140         (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface))))
141         ))
142
143     (BreakAlignment
144      . (
145         (breakable . #t)
146         (stacking-dir . 1)
147         (axes . (0))
148         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
149         (meta . ((interfaces . (break-alignment-interface axis-group-interface)))))
150         )
151
152     (BreakAlignGroup
153      . (
154         (axes  . (0))
155         (X-offset-callbacks . (,Break_align_interface::alignment_callback))
156         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
157         (meta . ((interfaces . (break-aligned-interface axis-group-interface))))
158         ))
159
160     (BreathingSign
161      . (
162         (break-align-symbol . breathing-sign)
163         (breakable . #t)
164         (space-alist . (
165                         (key-signature . (minimum-space . 1.5))
166                         (staff-bar . (minimum-space . 1.5))
167                         (clef . (minimum-space . 2.0))
168                         (first-note . (minimum-space . 1.0))
169                         ))
170         (molecule-callback . ,Text_item::brew_molecule)
171         (lookup . name)
172         (font-family . music)
173         (text . "scripts-rcomma")
174         (Y-offset-callbacks . (,Breathing_sign::offset_callback))
175         (visibility-lambda . ,begin-of-line-invisible)
176         (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface))))
177         ))
178
179     (Clef
180      . (
181         (molecule-callback . ,Clef::brew_molecule)
182         (before-line-breaking-callback . ,Clef::before_line_breaking)
183         (breakable . #t)
184         (font-family . music)      
185         (break-align-symbol . clef)
186         (visibility-lambda . ,begin-of-line-visible)
187         (space-alist . (
188                         (staff-bar . (minimum-space .  3.7))
189                         (key-signature . (minimum-space . 4.0))
190                         (time-signature . (minimum-space . 4.2))
191                         (first-note . (minimum-space . 5.0))
192                         (next-note . (extra-space . 0.5))                       
193                         ))
194         (Y-offset-callbacks  . (,Staff_symbol_referencer::callback)) 
195         (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface))))
196         ))
197
198     (ChordName
199      . (
200         (molecule-callback . ,Chord_name::brew_molecule)
201         (after-line-breaking-callback . ,Chord_name::after_line_breaking)
202         (chord-name-function . ,default-chord-name-function)
203         (font-family . roman)
204         (meta . ((interfaces . (font-interface text-interface chord-name-interface))))
205         ))
206
207     (Custos
208      . (
209         (break-align-symbol . custos)
210         (breakable . #t)
211         (molecule-callback . ,Custos::brew_molecule)
212         (visibility-lambda . ,end-of-line-visible)
213         (style . vaticana)
214         (neutral-position . 0)
215         (neutral-direction . -1)
216         (adjust-if-on-staffline . #t)
217         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
218         (font-family . music)
219         (space-alist . (
220                         (first-note . (minimum-space . 0.0))
221                         ))
222         (meta . ((interfaces . (custos-interface staff-symbol-referencer-interface break-aligned-interface))))
223         ))
224
225
226     (DotColumn
227      . (
228         (axes . (0))
229         (direction . 1)
230         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
231         (X-offset-callbacks . (,Dot_column::side_position))
232         (meta . ((interfaces . (dot-column-interface axis-group-interface))))
233         ))
234
235     (Dots
236      . (
237         (molecule-callback . ,Dots::brew_molecule)
238         (dot-count . 1)
239         (Y-offset-callbacks  . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
240         (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface))))
241         ))
242
243     (DoublePercentRepeat .
244                          (
245                           (molecule-callback . ,Percent_repeat_item_interface::double_percent)
246                           (breakable . #t)
247                           (slope . 1.0)
248                           (font-family . music)
249                           (width . 2.0)
250                           (thickness . 0.48)
251                           (break-align-symbol . staff-bar)
252                           (visibility-lambda . ,begin-of-line-invisible)
253                           (meta . ((interfaces . (font-interface percent-repeat-interface))))
254                          ))
255
256     (DynamicText
257      . (
258         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
259         (molecule-callback . ,Text_item::brew_molecule)
260         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
261                                ,Self_alignment_interface::centered_on_parent))
262         (self-alignment-X . 0)
263         (no-spacing-rods . #t)
264         (script-priority . 100)
265         (font-series . bold)
266         (font-family . dynamic)
267         (font-shape . italic)
268         (self-alignment-Y . 0)
269         (meta . ((interfaces . (font-interface text-interface self-alignment-interface  dynamic-interface))))
270         ))
271
272     (DynamicLineSpanner
273      . (
274         (axes . (1))
275         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
276         
277         (padding . 0.6)
278         (minimum-space . 1.2)
279         (direction . -1)
280         (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface))))
281         ))
282
283     (LeftEdge
284      . (
285         (break-align-symbol . left-edge)
286         (X-offset-callbacks . (,Break_align_interface::alignment_callback))
287         (X-extent-callback . ,Grob::point_dimension_callback)
288         (breakable . #t)
289         (space-alist . (
290                         (time-signature . (extra-space . 0.0)) 
291                         (staff-bar . (extra-space . 0.0))
292                         (breathing-sign . (minimum-space  . 0.0))
293                         (clef . (extra-space . 1.0))
294                         (first-note . (extra-space . 0.0))
295                         (key-signature . (extra-space . 0.0))
296                         ))
297         (meta . ((interfaces . (break-aligned-interface))))
298         ))
299
300     (Fingering
301      . (
302         (molecule-callback . ,Text_item::brew_molecule)
303         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
304                                ,Self_alignment_interface::aligned_on_self))
305         (padding . 0.6)
306                                         ;               (direction . -1)
307         (self-alignment-X . 0)
308         (self-alignment-Y . 0)
309         (font-family . number)
310         (font-relative-size . -3)
311         (font-shape . upright)
312         (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface))))
313         ))
314
315
316     (HaraKiriVerticalGroup
317      . (
318         (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
319         (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
320         (axes . (1))
321         (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface))))
322         ))
323
324     (Hairpin
325      . (
326         (molecule-callback . ,Hairpin::brew_molecule)
327         (thickness . 1.0)
328         (height . 0.6666)
329         (spacing-procedure . ,Spanner::set_spacing_rods)
330         (minimum-length . 2.0)
331         (if-text-padding . 1.0)
332         (width-correct . -1.0)
333
334         (dash-thickness . 1.2)
335         (dash-length . 4.0)
336         (self-alignment-Y . 0)
337         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
338         (meta . ((interfaces . (hairpin-interface self-alignment-interface dynamic-interface))))
339         ))
340
341     (InstrumentName
342      . (
343         (breakable . #t)
344         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
345                                ,Side_position_interface::aligned_on_support_refpoints))
346         ;; huh? what's this for?
347         (direction . 0)
348         (space-alist . (
349                         (left-edge . (extra-space . 1.0))
350                         ))
351
352         (self-alignment-Y . 0)
353         (molecule-callback . ,Text_item::brew_molecule)         
354         (break-align-symbol . instrument-name)
355         (visibility-lambda . ,begin-of-line-visible)
356         (baseline-skip . 2)
357         (font-family . roman)
358         (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface))))
359         ))
360
361     (KeySignature
362      . (
363         (molecule-callback . ,Key_signature_interface::brew_molecule)
364         (space-alist . (
365                         (time-signature . (extra-space . 1.25))
366                         (staff-bar .  (extra-space . 1.1))
367                         (first-note . (extra-space . 2.5))
368                         ))
369         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
370         (break-align-symbol . key-signature)
371         (visibility-lambda . ,begin-of-line-visible)
372         (breakable . #t)
373         (meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface))))
374         ))
375
376     (Ligature
377      . (
378         (molecule-callback . ,Ligature_bracket::brew_molecule)
379         (meta . ((interfaces . (ligature-interface))))
380         ))
381
382     (LigatureBracket
383      . (
384         (width . 0.75)
385         (height . 0.5)
386         (ligature-primitive-callback . ,Note_head::brew_molecule)
387         (molecule-callback . ,Ligature_bracket::brew_molecule)
388         (meta . ((interfaces . (ligature-bracket-interface))))
389         ))
390
391     (LigatureHead
392      . (
393         (ligature-primitive-callback . ,Note_head::brew_molecule)
394         (molecule-callback . ,Ligature_head::brew_molecule)
395         (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
396         (stem-attachment-function . ,note-head-style->attachment-coordinates)
397         (font-family . ancient)
398         (style . mensural)
399         (meta . ((interfaces . (ligature-head-interface rhythmic-head-interface note-head-interface staff-symbol-referencer-interface))))
400         ))
401
402     (LyricHyphen
403      . (
404         (thickness . 1.0)
405         (height . 0.4)
406         (minimum-length .  0.5) 
407         (maximum-length .  100)
408         (molecule-callback . ,Hyphen_spanner::brew_molecule)
409         (Y-extent-callback . ,Grob::point_dimension_callback)
410         (meta . ((interfaces . (lyric-hyphen-interface))))
411         ))
412
413     (LyricExtender
414      . (
415         (molecule-callback . ,Lyric_extender::brew_molecule)
416         (height . 0.8) ; stafflinethickness;
417         (right-trim-amount . 0.5)
418         (Y-extent-callback . ,Grob::point_dimension_callback)
419         (meta . ((interfaces . (lyric-extender-interface))))
420         ))
421
422     (LyricText
423      . (
424         (molecule-callback . ,Text_item::brew_molecule)
425         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
426         (self-alignment-X . 0)
427         (word-space . 0.6)
428         (ignore-length-mismatch . #f)
429         (begin-alignment . 4)
430         (end-alignment . 2)
431         (font-family . roman)
432         (font-shape . upright)
433         ;; duh, side-position-interface?
434         (meta . ((interfaces . (lyric-syllable-interface self-alignment-interface text-interface font-interface))))
435         ))
436
437     (MensuralLigature
438      . (
439         (thickness . 1.4)
440         (flexa-width . 2.0)
441         (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
442         (molecule-callback . ,Mensural_ligature::brew_molecule)
443         (font-family . ancient)
444         (meta . ((interfaces . (mensural-ligature-interface))))
445         ))
446
447     (Porrectus
448      . (
449         (style . mensural)
450         (auto-properties . #f)
451         (solid . #f)
452         (width . 2.4)
453         (thickness . 1.0)
454         (add-stem . #t)
455         (direction . 1)
456         (molecule-callback . ,Porrectus::brew_molecule)
457         (meta . ((interfaces . (porrectus-interface))))
458         ))
459
460     (RehearsalMark
461      . (
462         (molecule-callback . ,Text_item::brew_molecule)
463         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
464         (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
465         (self-alignment-X . 0)
466
467         (direction . 1)
468         (breakable . #t)
469         (visibility-lambda . ,end-of-line-invisible)
470         (padding . 0.8)
471         (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface))))
472         ))
473
474     (MultiMeasureRest
475      . (
476         (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
477         (molecule-callback . ,Multi_measure_rest::brew_molecule)
478         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
479         (staff-position . 0)
480         (expand-limit . 10)
481         (number-threshold . 1)
482         (padding . 1)
483         (thickness . 6.6)
484         (font-family . number)
485         (padding . 1)
486         (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface))))
487         ))
488
489     (NoteCollision
490      . (
491         (axes . (0 1))
492         ;; Ugh, should not be hard-coded. 
493         (note-width . 1.321)
494         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
495         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
496         (meta . ((interfaces . (note-collision-interface axis-group-interface))))
497         ))
498
499     (NoteColumn
500      . (
501         (axes . (0 1))
502         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
503         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
504         (meta . ((interfaces . (axis-group-interface note-column-interface))))
505         ))
506
507     (NoteHead
508      . (
509         (style . default)
510         (molecule-callback . ,Note_head::brew_molecule)
511         (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
512         (stem-attachment-function . ,note-head-style->attachment-coordinates)
513         (meta . ((interfaces . (rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface))))
514         ))
515
516     (Glissando
517      . (
518         (type . line)
519         (gap . 0.5)
520         (breakable . #t)
521         (X-extent-callback . #f)
522         (Y-extent-callback . #f)                         
523         (molecule-callback . ,Line_spanner::brew_molecule)
524         (meta . ((interfaces . (line-spanner-interface))))
525         ))
526
527     (VoiceFollower
528      . (
529         (type . line)
530         (gap . 0.5)
531         (breakable . #t)
532         (X-extent-callback . #f)
533         (Y-extent-callback . #f)                         
534         (molecule-callback . ,Line_spanner::brew_molecule)
535         (meta . ((interfaces . (line-spanner-interface))))
536         ))
537
538     (NoteName
539      . (
540         (molecule-callback . ,Text_item::brew_molecule)
541         (font-family . roman)
542         (meta . ((interfaces . (note-name-interface text-interface font-interface))))
543         ))
544
545     (OctavateEight
546      . (
547         (self-alignment-X . 0)
548         (text . "8")
549         (visibility-lambda . ,begin-of-line-visible)
550         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
551         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
552         (molecule-callback . ,Text_item::brew_molecule)
553         (font-shape . italic)
554         (font-family . roman)
555         (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface))))
556         ))
557
558     (PaperColumn
559      . (
560         (axes . (0))
561         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
562
563 ;               (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
564         (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface))))
565         ))
566
567     (PhrasingSlur
568      . (
569         (molecule-callback . ,Slur::brew_molecule)
570         (thickness . 1.2)               
571         (spacing-procedure . ,Spanner::set_spacing_rods)                
572         (minimum-length . 1.5)
573         (after-line-breaking-callback . ,Slur::after_line_breaking)
574         (extremity-rules . ,default-slur-extremity-rules)
575         (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
576         (de-uglify-parameters . (1.5  0.8  -2.0))
577         (Y-extent-callback . ,Slur::height)
578         (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
579                     (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
580                     (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
581                     (bezier-area-steps . 1.0)))
582         (beautiful . 0.5)
583         (y-free . 0.75)
584         (attachment . (#f . #f))
585         (attachment-offset . ((0 . 0) . (0 . 0)))
586         (slope-limit . 0.8)
587         (meta . ((interfaces . (slur-interface))))
588         ))
589
590     (NonMusicalPaperColumn
591      . (
592         (axes . (0))
593         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
594
595         ;; debugging stuff: print column number.
596 ;       (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
597
598
599         (meta .  ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface))))
600         ))
601
602     (PercentRepeat
603      . (
604         (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
605         (molecule-callback . ,Multi_measure_rest::percent)
606         (slope . 1.0)
607         (thickness . 0.48)
608         (minimum-width . 12.5) ; staffspace
609         (font-family . music)
610         (meta . ((interfaces . (multi-measure-rest-interface  font-interface percent-repeat-interface))))
611         ))
612
613     (PianoPedalBracket   ;; an example of a text spanner
614      . (
615         (molecule-callback . ,Text_spanner::brew_molecule)
616         (font-family . roman)
617         (type . line)
618         (if-text-padding . 1.0)
619         (width-correct . 0)
620         (outer . #t)
621         (direction . -1)
622         (edge-width . (0.5 . 0.5))
623         (edge-height . (1.0 . 1.0))
624         (shorten-pair . (0.0 . 0.0))
625         (thickness .  1.0)
626         (meta . ((interfaces . (text-spanner-interface piano-pedal-interface))))
627         ))
628
629     (RepeatSlash
630      . (
631         (molecule-callback . , Percent_repeat_item_interface::beat_slash)
632         (thickness . 0.48)
633         (slope . 1.7)
634         (meta . ((interfaces . (percent-repeat-interface))))
635         ))
636     (Rest
637      . (
638         (after-line-breaking-callback . ,Rest::after_line_breaking)
639         (X-extent-callback . ,Rest::extent_callback)
640         (Y-extent-callback . ,Rest::extent_callback)            
641         (molecule-callback . ,Rest::brew_molecule)
642         (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
643         (minimum-beam-collision-distance . 1.5)
644         (meta . (
645                  (interfaces . (font-interface
646                                 rhythmic-head-interface
647                                 staff-symbol-referencer-interface
648                                 rest-interface))
649                 ))))
650
651     (RestCollision
652      . (
653         (minimum-distance . 0.75)
654         (meta . ((interfaces . (rest-collision-interface))))
655         ))
656
657     (Script
658      . (
659         ;; don't set direction here: it breaks staccato.
660         (molecule-callback . ,Script_interface::brew_molecule)
661
662         ;; This value is sensitive: if too large, staccato dots will move a
663         ;; space a away.
664         (padding . 0.25) 
665         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
666         (before-line-breaking-callback . ,Script_interface::before_line_breaking)
667         (font-family . music)
668         (meta . ((interfaces . (script-interface side-position-interface font-interface))))
669         ))
670
671     (ScriptColumn
672      . (
673         (before-line-breaking-callback . ,Script_column::before_line_breaking)
674         (meta . ((interfaces . (script-column-interface))))
675         ))
676
677     (Slur
678      . (
679         (molecule-callback . ,Slur::brew_molecule)
680         (thickness . 1.2)               
681         (spacing-procedure . ,Spanner::set_spacing_rods)                
682         (minimum-length . 1.5)
683         (after-line-breaking-callback . ,Slur::after_line_breaking)
684         (extremity-rules . ,default-slur-extremity-rules)
685         (extremity-offset-alist . ,default-slur-extremity-offset-alist)
686         (de-uglify-parameters . (1.5  0.8  -2.0))
687         (Y-extent-callback . ,Slur::height)
688         (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
689                     (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
690                     (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
691                     (bezier-area-steps . 1.0)))
692         (beautiful . 0.5)
693         (y-free . 0.75)
694         (attachment . (#f . #f))
695         (attachment-offset . ((0 . 0) . (0 . 0)))
696         (slope-limit . 0.8)
697         (meta . ((interfaces . (slur-interface))))
698         ))
699
700     (SpacingSpanner
701      . (
702         (spacing-procedure .  ,Spacing_spanner::set_springs)
703         (grace-space-factor . 0.6)
704         (shortest-duration-space . 2.0)
705         (spacing-increment . 1.2)
706         (meta . ((interfaces . (spacing-spanner-interface))))
707         ))
708
709     (SpanBar
710      . (
711         (break-align-symbol . staff-bar)
712         (bar-size-procedure . ,Span_bar::get_bar_size) 
713         (molecule-callback . ,Span_bar::brew_molecule)
714         (visibility-lambda . ,begin-of-line-invisible)
715         (X-extent-callback . ,Span_bar::width_callback)
716         (Y-extent-callback . ())
717         (breakable . #t)
718         (glyph . "|")
719         (before-line-breaking-callback . ,Span_bar::before_line_breaking)
720         ;; ugh duplication! 
721
722         ;;
723         ;; Ross. page 151 lists other values, we opt for a leaner look
724         ;; 
725         (kern . 3.0)
726         (thin-kern . 3.0)
727         (hair-thickness . 1.6)
728         (thick-thickness . 6.0)
729         (meta . ((interfaces . (span-bar-interface bar-line-interface))))
730         ))
731
732     (StanzaNumber
733      . (
734         (breakable . #t)
735         (molecule-callback . ,Text_item::brew_molecule)         
736         (break-align-symbol . clef)
737         (visibility-lambda . ,begin-of-line-visible)
738         (font-family . roman)
739         (meta . ((interfaces . (break-aligned-interface text-interface font-interface))))               
740         ))
741
742     (StaffSpacing
743      . (
744         (breakable . #t)
745         (stem-spacing-correction . 0.4)
746         (meta . ((interfaces . (staff-spacing-interface))))
747         ))
748     (NoteSpacing
749      . (
750         (stem-spacing-correction . 0.5)
751         (meta . ((interfaces . (note-spacing-interface))))
752         ))
753
754     (StaffSymbol
755      . (
756         (molecule-callback . ,Staff_symbol::brew_molecule)
757         (line-count . 5)
758         (ragged-right . #f)
759         (layer . 0)
760         (meta . ((interfaces . (staff-symbol-interface))))
761         ))
762
763     (SostenutoPedal
764      . (
765         (molecule-callback . ,Text_item::brew_molecule)
766         (direction . 1)
767         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
768         (no-spacing-rods . #t)
769         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
770         (pedal-type . mixed)
771         (font-family . roman)
772         (font-shape . italic)
773         (self-alignment-X . 0)
774         (meta . ((interfaces . (text-interface  self-alignment-interface font-interface))))
775         ))
776
777     (SostenutoPedalLineSpanner 
778      . (
779         (axes . (1))
780         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
781
782         (padding . 1.2)
783         (minimum-space . 1.0)
784         (direction . -1)
785         (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
786         ))
787         
788     (Stem
789      . (
790         (before-line-breaking-callback . ,Stem::before_line_breaking)
791         (molecule-callback . ,Stem::brew_molecule)
792         (thickness . 1.3)
793         (beamed-lengths . (0.0 2.5 2.0 1.5))
794         (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
795
796         ;;  Stems in unnatural (forced) direction should be shortened,
797         ;;  according to [Roush & Gourlay].  Their suggestion to knock off
798         ;;  a whole staffspace seems a bit drastical: we'll do half.
799
800         (lengths . (3.5 3.5 3.5 4.5 5.0))
801         (stem-shorten . (1.0 0.5))
802                                         ; if stem is on middle line, choose this direction.
803         (neutral-direction . -1)
804         (X-offset-callbacks . (,Stem::off_callback))
805         (X-extent-callback . ,Stem::dim_callback)       
806         (Y-extent-callback . ,Stem::height)
807         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
808         (adjust-if-on-staffline . #t)
809         (font-family . music)      
810         (meta . ((interfaces . (stem-interface  font-interface))))
811         ))
812
813     (StemTremolo
814      . (
815         (molecule-callback . ,Stem_tremolo::brew_molecule)
816         (Y-extent-callback . ,Stem_tremolo::height)
817         (X-extent-callback . #f)
818
819         (beam-width . 2.0) ; staff-space
820         (beam-thickness . 0.48) ; staff-space
821         (meta . ((interfaces . (stem-tremolo-interface))))
822         ))
823
824     (SeparationItem
825      . (
826         (meta . ((interfaces . (separation-item-interface))))
827         ))
828
829     (SeparatingGroupSpanner
830      . (
831         (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
832         (meta . ((interfaces . (separation-spanner-interface))))
833         ))
834
835     (SustainPedal
836      . (
837         (no-spacing-rods . #t)
838         (molecule-callback . ,Sustain_pedal::brew_molecule)
839         (self-alignment-X . 0)
840         (direction . 1)
841         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
842         (pedal-type . text)
843         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
844         (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface))))
845         ))
846
847     (SustainPedalLineSpanner 
848      . (
849         (axes . (1))
850         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
851         
852         (padding . 1.2)
853         (minimum-space . 1.0)
854         (direction . -1)
855         (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
856         ))
857
858     (System
859      . (
860         (axes . (0 1))
861         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
862         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
863         (meta . ((interfaces . (system-interface axis-group-interface))))
864         ))
865
866     (SystemStartBrace
867      . (
868         (glyph . "brace")
869         (molecule-callback . ,System_start_delimiter::brew_molecule)
870         (collapse-height . 5.0)
871         (font-family . braces)
872         (Y-extent-callback . #f)
873         (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
874         ))
875
876     (SystemStartBracket
877      . (
878         (Y-extent-callback . #f)
879         (molecule-callback . ,System_start_delimiter::brew_molecule)
880         (glyph . "bracket")
881         (arch-height . 1.5)
882         (arch-angle . 50.0)
883         (arch-thick . 0.25)
884         (arch-width . 1.5)
885         (bracket-collapse-height . 1)
886         (thickness . 0.25)
887         (meta . ((interfaces . (system-start-delimiter-interface))))
888         ))
889
890     (SystemStartBar
891      . (
892         (Y-extent-callback . #f)
893         (molecule-callback . ,System_start_delimiter::brew_molecule)
894         (glyph . "bar-line")
895         (thickness . 1.6)
896         (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
897         (meta . ((interfaces . (system-start-delimiter-interface))))
898         ))
899
900     (TextScript
901      . (
902         (molecule-callback . ,Text_item::brew_molecule)
903         (no-spacing-rods . #t)
904         (direction . -1)
905         (padding . 0.5)
906         ;; todo: add X self alignment?
907         (baseline-skip . 2)
908         (font-family . roman)
909         (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface))))
910         ))
911
912     (TextSpanner
913      . (
914         (molecule-callback . ,Text_spanner::brew_molecule)
915         (font-family . roman)
916         (type . line)
917
918         ;; urg, only for (de)cresc. text spanners
919         (if-text-padding . 1.0)
920         (width-correct . -1)
921
922         (direction . 1)
923         (meta . ((interfaces . (text-spanner-interface  font-interface))))              
924         ))
925
926     (Tie
927      . (
928         (molecule-callback . ,Tie::brew_molecule)
929         (spacing-procedure . ,Spanner::set_spacing_rods)
930         (staffline-clearance . 0.35)
931         (details . ((ratio . 0.333) (height-limit . 1.0)))
932         (thickness . 1.2)
933         (x-gap . 0.2)
934         (y-offset . 0.6)
935         (minimum-length  . 2.5)
936         (meta . ((interfaces . (tie-interface))))
937         ))
938
939     (TieColumn
940      . (
941         (after-line-breaking-callback . ,Tie_column::after_line_breaking)
942         (X-extent-callback . ())
943         (Yoo-extent-callback . ())      
944         (meta . ((interfaces . (tie-column-interface))))
945         ))
946
947     (TimeSignature
948      . (
949         (molecule-callback . ,Time_signature::brew_molecule)
950         (break-align-symbol . time-signature)
951         (visibility-lambda . ,all-visible)
952         (space-alist . (
953                         (first-note . (extra-space . 2.0))
954                         (staff-bar .  (minimum-space . 2.0))
955                         ))
956         (breakable . #t)
957         (style . C)
958         (font-family . number)
959         (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface))))
960         ))
961
962     (TupletBracket
963      . (
964         (gap . 2.0)
965         (padding . 0.9)
966         (thickness . 1.6)
967         (edge-width . (0.0 . 0.0))
968         (edge-height . (0.7 . 0.7))
969         (shorten-pair . (0.0 . 0.0))
970         (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
971         (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
972         (molecule-callback . ,Tuplet_bracket::brew_molecule)
973         (font-family . roman)
974         (font-shape . italic)
975
976         (font-relative-size . -1)
977         (meta .  ((interfaces . (text-interface tuplet-bracket-interface font-interface))))
978         ))
979
980     (UnaCordaPedal
981      . (
982         (molecule-callback . ,Text_item::brew_molecule)
983         (font-family . roman)
984         (font-shape . italic)
985         (no-spacing-rods . #t)
986         (self-alignment-X . 0)
987         (direction . 1)
988         (pedal-type . text)
989         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
990         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
991         (meta . ((interfaces . (text-interface self-alignment-interface font-interface))))
992         ))
993
994     (UnaCordaPedalLineSpanner 
995      . (
996         (axes . (1))
997         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
998         (padding . 1.2)
999         (minimum-space . 1.0)
1000         (direction . -1)
1001         (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
1002         ))
1003
1004     (VoltaBracket
1005      . (
1006         (molecule-callback . ,Volta_bracket_interface::brew_molecule)
1007         (direction . 1)
1008         (padding . 1)
1009         (font-style . volta)
1010         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1011         (thickness . 1.6)  ;  stafflinethickness
1012         (height . 2.0) ; staffspace;
1013         (minimum-space . 5)
1014         (font-family . number)
1015         (font-relative-size . -2)
1016         (meta . ((interfaces . (volta-bracket-interface text-interface side-position-interface font-interface))))
1017         ))
1018     
1019     (VerticalAlignment
1020      . (
1021         (axes . (1))
1022         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1023         (stacking-dir . -1)
1024         (meta . ((interfaces . (align-interface axis-group-interface))))
1025         ))
1026
1027     (VerticalAxisGroup
1028      . (
1029         (axes . (1))
1030         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
1031         
1032         (meta . ((interfaces . (axis-group-interface))))
1033         ))
1034    )
1035  )
1036
1037
1038
1039
1040 (define (completize-grob-entry x)
1041   "transplant assoc key into 'name entry of 'meta of X
1042 "
1043
1044   (let* ((name-sym  (car x))
1045          (grob-entry (cdr x))
1046          (metaentry (cdr (assoc 'meta grob-entry)))
1047          (ifaces-entry
1048           (cdr (assoc 'interfaces metaentry)))
1049
1050         )
1051     (set! metaentry (assoc-set! metaentry 'name name-sym))
1052     (set! metaentry (assoc-set! metaentry 'interfaces
1053                                 (cons 'grob-interface ifaces-entry)))
1054     (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1055     (cons name-sym grob-entry)))
1056
1057 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1058
1059
1060
1061                                         ;  (display  (map pair? all-grob-descriptions))
1062
1063
1064 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1065
1066 (map (lambda (x)
1067                                         ; (display (car x)) (newline)
1068
1069        (set-object-property! (car x) 'translation-type? list?))
1070      all-grob-descriptions)
1071