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