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