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