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