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