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