]> git.donarmstrong.com Git - lilypond.git/blob - scm/grob-description.scm
*** empty log message ***
[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         (thickness . 6.6)
544         (padding . 1)
545         (meta . ((interfaces . (multi-measure-rest-interface rest-interface font-interface staff-symbol-referencer-interface spanner-interface))))
546         ))
547     
548     (MultiMeasureRestNumber
549      . (
550         (molecule-callback . ,Text_item::brew_molecule)
551         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
552                                ,Self_alignment_interface::centered_on_other_axis_parent))
553         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
554         (self-alignment-X . 0)
555         (direction . 1)
556         (padding . 2)
557         (font-family . number)
558         (meta . ((interfaces . (side-position-interface font-interface spanner-interface))))
559         ))
560
561
562     (NoteCollision
563      . (
564         (axes . (0 1))
565         ;; Ugh, should not be hard-coded. 
566         (note-width . 1.321)
567         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
568         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
569         (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
570         ))
571
572     (NoteColumn
573      . (
574         (axes . (0 1))
575         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
576         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
577         (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
578         ))
579
580     (NoteHead
581      . (
582         (style . default)
583         (molecule-callback . ,Note_head::brew_molecule)
584         (glyph-name-procedure . ,find-notehead-symbol)
585         (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
586         (stem-attachment-function . ,note-head-style->attachment-coordinates)
587         (meta . ((interfaces . (rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
588         ))
589
590     (Glissando
591      . (
592         (type . line)
593         (gap . 0.5)
594         (zigzag-width . 0.75)
595         (breakable . #t)
596         (X-extent-callback . #f)
597         (Y-extent-callback . #f)                         
598         (molecule-callback . ,Line_spanner::brew_molecule)
599         (meta . ((interfaces . (line-spanner-interface spanner-interface))))
600         ))
601
602     (VoiceFollower
603      . (
604         (type . line)
605         (gap . 0.5)
606         (breakable . #t)
607         (X-extent-callback . #f)
608         (Y-extent-callback . #f)                         
609         (molecule-callback . ,Line_spanner::brew_molecule)
610         (meta . ((interfaces . (line-spanner-interface spanner-interface))))
611         ))
612
613     (NoteName
614      . (
615         (molecule-callback . ,Text_item::brew_molecule)
616         (font-family . roman)
617         (meta . ((interfaces . (note-name-interface text-interface font-interface item-interface ))))
618         ))
619
620     (OctavateEight
621      . (
622         (self-alignment-X . 0)
623         (text . "8")
624         (break-visibility . ,begin-of-line-visible)
625         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
626         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
627         (molecule-callback . ,Text_item::brew_molecule)
628         (font-shape . italic)
629         (padding . 0.4)
630         (font-relative-size . -2)
631         (font-family . roman)
632         (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
633         ))
634
635     (PaperColumn
636      . (
637         (axes . (0))
638         (before-line-breaking-callback . ,Paper_column::before_line_breaking)
639         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
640
641 ;               (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
642         (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
643         ))
644
645     (PhrasingSlur
646      . (
647         (molecule-callback . ,Slur::brew_molecule)
648         (thickness . 1.2)               
649         (spacing-procedure . ,Spanner::set_spacing_rods)                
650         (minimum-length . 1.5)
651         (after-line-breaking-callback . ,Slur::after_line_breaking)
652         (extremity-rules . ,default-slur-extremity-rules)
653         (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
654         (de-uglify-parameters . (1.5  0.8  -2.0))
655         (Y-extent-callback . ,Slur::height)
656         (height-limit . 2.0)
657         (ratio . 0.333)
658         (beautiful . 0.5)
659         (y-free . 0.75)
660         (attachment . (#f . #f))
661         (attachment-offset . ((0 . 0) . (0 . 0)))
662         (slope-limit . 0.8)
663         (details . ((force-blowfit . 0.5)
664                     (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
665                     (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
666                     (bezier-area-steps . 1.0)))
667         (meta . ((interfaces . (slur-interface spanner-interface))))
668         ))
669
670     (NonMusicalPaperColumn
671      . (
672         (axes . (0))
673         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
674         (before-line-breaking-callback . ,Paper_column::before_line_breaking)
675         ;; debugging stuff: print column number.
676 ;       (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
677
678
679         (meta .  ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
680         ))
681
682     (PercentRepeat
683      . (
684         (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
685         (molecule-callback . ,Multi_measure_rest::percent)
686         (slope . 1.0)
687         (thickness . 0.48)
688         (minimum-width . 12.5) ; staffspace
689         (font-family . music)
690         (meta . ((interfaces . (multi-measure-rest-interface  spanner-interface font-interface percent-repeat-interface))))
691         ))
692
693     (PianoPedalBracket   ;; an example of a text spanner
694      . (
695         (molecule-callback . ,Text_spanner::brew_molecule)
696         (font-family . roman)
697         (type . line)
698         (if-text-padding . 1.0)
699         (width-correct . 0)
700         (outer . #t)
701         (direction . -1)
702         (edge-widen . (0.5 . 0.5))
703         (edge-height . (1.0 . 1.0))
704         (shorten-pair . (0.0 . 0.0))
705         (thickness .  1.0)
706         (meta . ((interfaces . (text-spanner-interface piano-pedal-interface spanner-interface))))
707         ))
708
709     (RepeatSlash
710      . (
711         (molecule-callback . , Percent_repeat_item_interface::beat_slash)
712         (thickness . 0.48)
713         (slope . 1.7)
714         (meta . ((interfaces . (percent-repeat-interface item-interface ))))
715         ))
716     (Rest
717      . (
718         (after-line-breaking-callback . ,Rest::after_line_breaking)
719         (X-extent-callback . ,Rest::extent_callback)
720         (Y-extent-callback . ,Rest::extent_callback)            
721         (molecule-callback . ,Rest::brew_molecule)
722         (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) 
723         (minimum-beam-collision-distance . 0.75)
724         (meta . (
725                  (interfaces . (font-interface
726                                 rhythmic-head-interface
727                                 staff-symbol-referencer-interface
728                                 rest-interface item-interface ))
729                 ))))
730
731     (RestCollision
732      . (
733         (minimum-distance . 0.75)
734         (meta . ((interfaces . (rest-collision-interface item-interface ))))
735         ))
736
737     (Script
738      . (
739         ;; don't set direction here: it breaks staccato.
740         (molecule-callback . ,Script_interface::brew_molecule)
741
742         ;; This value is sensitive: if too large, staccato dots will move a
743         ;; space a away.
744         (padding . 0.25)
745         ;; (script-priority . 0) priorities for scripts, see script.scm
746         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
747         (before-line-breaking-callback . ,Script_interface::before_line_breaking)
748         (font-family . music)
749         (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
750         ))
751
752     (ScriptColumn
753      . (
754         (before-line-breaking-callback . ,Script_column::before_line_breaking)
755         (meta . ((interfaces . (script-column-interface item-interface ))))
756         ))
757
758     (Slur
759      . (
760         (molecule-callback . ,Slur::brew_molecule)
761         (thickness . 1.2)               
762         (spacing-procedure . ,Spanner::set_spacing_rods)                
763         (minimum-length . 1.5)
764         (after-line-breaking-callback . ,Slur::after_line_breaking)
765         (extremity-rules . ,default-slur-extremity-rules)
766         (extremity-offset-alist . ,default-slur-extremity-offset-alist)
767         (de-uglify-parameters . (1.5  0.8  -2.0))
768         (Y-extent-callback . ,Slur::height)
769         (height-limit . 2.0)
770         (ratio . 0.333)
771         (beautiful . 0.5)
772         (y-free . 0.75)
773         (attachment . (#f . #f))
774         (attachment-offset . ((0 . 0) . (0 . 0)))
775         (slope-limit . 0.8)
776         (details . ((force-blowfit . 0.5)
777                     (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
778                     (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
779                     (bezier-area-steps . 1.0)))
780         (meta . ((interfaces . (slur-interface spanner-interface))))
781         ))
782
783     (SpacingSpanner
784      . (
785         (spacing-procedure .  ,Spacing_spanner::set_springs)
786         (grace-space-factor . 0.6)
787         (shortest-duration-space . 2.0)
788         (spacing-increment . 1.2)
789         (base-shortest-duration . ,(ly:make-moment 1 8))
790         (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
791         ))
792
793     (SpanBar
794      . (
795         (break-align-symbol . staff-bar)
796         (bar-size-procedure . ,Span_bar::get_bar_size) 
797         (molecule-callback . ,Span_bar::brew_molecule)
798         (break-visibility . ,begin-of-line-invisible)
799         (X-extent-callback . ,Span_bar::width_callback)
800         (Y-extent-callback . ())
801         (breakable . #t)
802         (glyph . "|")
803         (before-line-breaking-callback . ,Span_bar::before_line_breaking)
804         ;; ugh duplication! 
805
806         ;;
807         ;; Ross. page 151 lists other values, we opt for a leaner look
808         ;; 
809         (kern . 3.0)
810         (thin-kern . 3.0)
811         (hair-thickness . 1.6)
812         (thick-thickness . 6.0)
813         (meta . ((interfaces . (span-bar-interface font-interface
814                                                    bar-line-interface item-interface ))))
815         ))
816
817     (StanzaNumber
818      . (
819         (breakable . #t)
820         (molecule-callback . ,Text_item::brew_molecule)         
821         (break-align-symbol . clef)
822         (break-visibility . ,begin-of-line-visible)
823         (font-family . roman)
824         (meta . ((interfaces . (break-aligned-interface text-interface font-interface item-interface ))))               
825         ))
826
827     (StaffSpacing
828      . (
829         (breakable . #t)
830         (stem-spacing-correction . 0.4)
831         (knee-spacing-correction . 0.75)
832         (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
833         ))
834     (NoteSpacing
835      . (
836         (stem-spacing-correction . 0.5)
837         (knee-spacing-correction . 0.75)
838         (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
839         ))
840
841     (StaffSymbol
842      . (
843         (molecule-callback . ,Staff_symbol::brew_molecule)
844         (line-count . 5)
845         (layer . 0)
846         (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
847         ))
848
849     (SostenutoPedal
850      . (
851         (molecule-callback . ,Text_item::brew_molecule)
852         (direction . 1)
853         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
854         (no-spacing-rods . #t)
855         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
856         (pedal-type . mixed)
857         (font-family . roman)
858         (font-shape . italic)
859         (self-alignment-X . 0)
860         (meta . ((interfaces . (text-interface  self-alignment-interface font-interface item-interface))))
861         ))
862
863     (SostenutoPedalLineSpanner 
864      . (
865         (axes . (1))
866         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
867         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
868         
869
870         (padding . 1.2)
871         (minimum-space . 1.0)
872         (direction . -1)
873         (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface  spanner-interface))))
874         ))
875         
876     (Stem
877      . (
878         (before-line-breaking-callback . ,Stem::before_line_breaking)
879         (molecule-callback . ,Stem::brew_molecule)
880         (thickness . 1.3)
881
882         ;; 3.5 (or 3 measured from note head) is standar length
883         ;; 32nd, 64th flagged stems should be longer
884         (lengths . (3.5 3.5 3.5 4.5 5.0))
885         
886         ;; Stems in unnatural (forced) direction should be shortened by
887         ;; one staff space, according to [Roush & Gourlay].
888         ;; Flagged stems we shorten only half a staff space.
889         (stem-shorten . (1.0 0.5))
890
891         ;; default stem direction for note on middle line
892         (neutral-direction . -1)
893         
894         ;; [Wanske]: standard length (but no shorter than minimum).
895         ;; (beamed-lengths . (3.5))
896         
897         ;; FIXME.  3.5 yields too long beams (according to Ross and
898         ;; looking at Baerenreiter examples) for a number of common
899         ;; boundary cases.  Subtracting half a beam thickness fixes
900         ;; this, but the bug may well be somewhere else.
901         (beamed-lengths . (3.26))
902
903         ;; [Wanske] lists three sets of minimum lengths.  One
904         ;; set for the nomal case, and one set for beams with `der
905         ;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze
906         ;; hinaus (bei Gruppen mit grossem Tonumfang)' and the extreme
907         ;; case.
908
909         ;; Note that Wanske lists numbers lengths starting from top of
910         ;; head, so we must add half a staff space.
911         
912         ;; We use the normal minima as minimum for the ideal lengths,
913         ;; and the extreme minima as abolute minimum length.
914         
915         ;; The 'normal' minima
916         (beamed-minimum-free-lengths . (2.5 2.0 1.5))
917         
918         ;; The 'far outside staff' minima, not used
919         ;(beamed-far-minimum-free-lengths . (1.83))
920         
921         ;; The 'extreme case' minima
922         (beamed-extreme-minimum-free-lengths . (1.83 1.5))
923
924         (X-offset-callbacks . (,Stem::off_callback))
925         (X-extent-callback . ,Stem::dim_callback)       
926         (Y-extent-callback . ,Stem::height)
927         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
928         (adjust-if-on-staffline . #t)
929         (font-family . music)      
930         (avoid-note-head . #f)
931         (up-to-staff . #f)
932         (meta . ((interfaces . (stem-interface  font-interface item-interface ))))
933         ))
934
935     (StemTremolo
936      . (
937         (molecule-callback . ,Stem_tremolo::brew_molecule)
938         (Y-extent-callback . ,Stem_tremolo::height)
939         (X-extent-callback . #f)
940
941         (beam-width . 1.6) ; staff-space
942         (beam-thickness . 0.48) ; staff-space
943         (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
944         ))
945
946     (SeparationItem
947      . (
948         (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
949         ))
950
951     (SeparatingGroupSpanner
952      . (
953         (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
954         (meta . ((interfaces . (spacing-interface separation-spanner-interface spanner-interface))))
955         ))
956
957     (SustainPedal
958      . (
959         (no-spacing-rods . #t)
960         (molecule-callback . ,Sustain_pedal::brew_molecule)
961         (self-alignment-X . 0)
962         (direction . 1)
963         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
964         (pedal-type . text)
965         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
966         (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
967         ))
968
969     (SustainPedalLineSpanner 
970      . (
971         (axes . (1))
972         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
973         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
974         
975         (padding . 1.2)
976         (minimum-space . 1.0)
977         (direction . -1)
978         (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
979         ))
980
981     (System
982      . (
983         (axes . (0 1))
984         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
985         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
986         (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
987         ))
988
989     (SystemStartBrace
990      . (
991         (glyph . "brace")
992         (molecule-callback . ,System_start_delimiter::brew_molecule)
993         (collapse-height . 5.0)
994         (font-family . braces)
995         (Y-extent-callback . #f)
996         (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
997         ))
998
999     (SystemStartBracket
1000      . (
1001         (Y-extent-callback . #f)
1002         (molecule-callback . ,System_start_delimiter::brew_molecule)
1003         (glyph . "bracket")
1004         (arch-height . 1.5)
1005         (arch-angle . 50.0)
1006         (arch-thick . 0.25)
1007         (arch-width . 1.5)
1008         (bracket-collapse-height . 1)
1009         (thickness . 0.25)
1010         (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1011         ))
1012
1013     (SystemStartBar
1014      . (
1015         (Y-extent-callback . #f)
1016         (molecule-callback . ,System_start_delimiter::brew_molecule)
1017         (glyph . "bar-line")
1018         (thickness . 1.6)
1019         (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1020         (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1021         ))
1022
1023     (TextScript
1024      . (
1025         (molecule-callback . ,Text_item::brew_molecule)
1026         (no-spacing-rods . #t)
1027         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1028         (direction . -1)
1029         (padding . 0.5)
1030         (script-priority . 200)
1031         ;; todo: add X self alignment?
1032         (baseline-skip . 2)
1033         (font-family . roman)
1034         (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1035         ))
1036
1037     (TextSpanner
1038      . (
1039         (molecule-callback . ,Text_spanner::brew_molecule)
1040         (font-family . roman)
1041         (type . line)
1042
1043         ;; urg, only for (de)cresc. text spanners
1044         (if-text-padding . 1.0)
1045         (width-correct . -1)
1046
1047         (direction . 1)
1048         (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))             
1049         ))
1050     
1051     (TabNoteHead
1052      . (
1053         (font-family . roman)
1054         (style . default)
1055         (molecule-callback . ,tablature-molecule-callback)
1056         (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
1057         (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
1058         (stem-attachment-function . ,tablature-stem-attachment-function)
1059         (meta . ((interfaces
1060                   . (rhythmic-head-interface
1061                      font-interface
1062                      note-head-interface staff-symbol-referencer-interface
1063                      text-interface item-interface ))))
1064         ))
1065
1066
1067     (Tie
1068      . (
1069         (molecule-callback . ,Tie::brew_molecule)
1070         (spacing-procedure . ,Spanner::set_spacing_rods)
1071         (staffline-clearance . 0.35)
1072         (details . ((ratio . 0.333) (height-limit . 1.0)))
1073         (thickness . 1.2)
1074         (x-gap . -0.1)
1075         (y-offset . 0.6)
1076         (minimum-length  . 2.5)
1077         (meta . ((interfaces . (tie-interface spanner-interface))))
1078         ))
1079
1080     (TieColumn
1081      . (
1082         (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1083         (X-extent-callback . ())
1084         (Yoo-extent-callback . ())      
1085         (meta . ((interfaces . (tie-column-interface spanner-interface))))
1086         ))
1087
1088     (TimeSignature
1089      . (
1090         (molecule-callback . ,Time_signature::brew_molecule)
1091         (break-align-symbol . time-signature)
1092         (break-visibility . ,all-visible)
1093         (space-alist . (
1094                         (first-note . (extra-space . 2.0))
1095                         (right-edge . (extra-space . 0.5))
1096                         (staff-bar .  (minimum-space . 2.0))
1097                         ))
1098         (breakable . #t)
1099         (style . C)
1100         (font-family . number)
1101         (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1102         ))
1103
1104     (TupletBracket
1105      . (
1106         (gap . 2.0)
1107         (padding . 0.9)
1108         (thickness . 1.6)
1109         (edge-widen . (0.0 . 0.0))
1110         (edge-height . (0.7 . 0.7))
1111         (shorten-pair . (-0.2 . -0.2))
1112         (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1113         (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1114         (molecule-callback . ,Tuplet_bracket::brew_molecule)
1115         (font-family . roman)
1116         (font-shape . italic)
1117
1118         (font-relative-size . -1)
1119         (meta .  ((interfaces . (text-interface tuplet-bracket-interface font-interface spanner-interface))))
1120         ))
1121
1122     (UnaCordaPedal
1123      . (
1124         (molecule-callback . ,Text_item::brew_molecule)
1125         (font-family . roman)
1126         (font-shape . italic)
1127         (no-spacing-rods . #t)
1128         (self-alignment-X . 0)
1129         (direction . 1)
1130         (pedal-type . text)
1131         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1132         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1133         (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1134         ))
1135
1136     (UnaCordaPedalLineSpanner 
1137      . (
1138         (axes . (1))
1139         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
1140         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1141         
1142         (padding . 1.2)
1143         (minimum-space . 1.0)
1144         (direction . -1)
1145         (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1146         ))
1147
1148     (VoltaBracket
1149      . (
1150         (molecule-callback . ,Volta_bracket_interface::brew_molecule)
1151         (direction . 1)
1152         (padding . 1)
1153         (font-style . volta)
1154         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1155         (thickness . 1.6)  ;  stafflinethickness
1156         (height . 2.0) ; staffspace;
1157         (minimum-space . 5)
1158         (font-family . number)
1159         (font-relative-size . -2)
1160         (meta . ((interfaces . (volta-bracket-interface text-interface side-position-interface font-interface spanner-interface))))
1161         ))
1162     
1163     (VerticalAlignment
1164      . (
1165         (axes . (1))
1166         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1167         (stacking-dir . -1)
1168         (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1169         ))
1170
1171     (VerticalAxisGroup
1172      . (
1173         (axes . (1))
1174         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)      
1175         
1176         (meta . ((interfaces . (axis-group-interface spanner-interface))))
1177         ))
1178    )
1179  )
1180
1181
1182
1183
1184 (define (completize-grob-entry x)
1185   "transplant assoc key into 'name entry of 'meta of X
1186 "
1187   (let* ((name-sym  (car x))
1188          (grob-entry (cdr x))
1189          (metaentry (cdr (assoc 'meta grob-entry)))
1190          (ifaces-entry
1191           (cdr (assoc 'interfaces metaentry)))
1192
1193         )
1194     (set! metaentry (assoc-set! metaentry 'name name-sym))
1195     (set! metaentry (assoc-set! metaentry 'interfaces
1196                                 (cons 'grob-interface ifaces-entry)))
1197     (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1198     (cons name-sym grob-entry)))
1199
1200 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1201
1202
1203
1204                                         ;  (display  (map pair? all-grob-descriptions))
1205
1206
1207 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1208
1209 (map (lambda (x)
1210                                         ; (display (car x)) (newline)
1211
1212        (set-object-property! (car x) 'translation-type? list?)
1213        (set-object-property! (car x) 'is-grob? #t))
1214      all-grob-descriptions)
1215
1216
1217 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))