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