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