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