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