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