]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
* lily/beam.cc: use length-fraction too.
[lilypond.git] / scm / define-grobs.scm
1 ;;;; define-grobs.scm --
2 ;;;;
3 ;;;;  source file of the GNU LilyPond music typesetter
4 ;;;;
5 ;;;; (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
7
8 ;;;; distances are given in linethickness (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
16 ;;; todo:: reorder sensibly.
17
18 (define-public all-grob-descriptions
19   `(
20     (Accidental
21      . (
22         (avoid-slur . inside)
23         (cautionary-style . parentheses)
24         (callbacks . ((stencil . ,Accidental_interface::print)
25                       (after-line-breaking . ,Accidental_interface::after_line_breaking)))
26         
27         (meta . ((class . Item)
28                  (interfaces . (accidental-interface
29                                 font-interface))))))
30     
31     (AccidentalSuggestion
32      . (
33
34         (callbacks . ((stencil . ,Accidental_interface::print)))
35         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
36                                ,Self_alignment_interface::aligned_on_self))
37         (self-alignment-X . ,CENTER)
38         (cautionary . #t)
39         (cautionary-style . smaller)
40         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
41         (cautionary-style . parentheses)
42         (direction . ,UP)
43         (staff-padding . 0.25)
44         (script-priority . 0)
45         (meta . ((class . Item)
46                  (interfaces . (side-position-interface
47                                 script-interface
48                                 accidental-interface
49                                 accidental-suggestion-interface
50                                 self-alignment-interface
51                                 font-interface))))))
52     (AccidentalPlacement
53      . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
54         (left-padding . 0.2)
55         (callbacks . ((positioning-done . ,Accidental_placement::calc_positioning_done)
56                       ))
57         ;; this is quite small, but it is very ugly to have
58         ;; accs closer to the previous note than to the next one.
59         (right-padding . 0.15)
60         (meta . ((class . Item)
61                  (interfaces . (accidental-placement-interface))))))
62     (Ambitus
63      . (
64         (axes . (0 1))
65         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
66         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
67         (space-alist . (
68                         (clef . (extra-space . 0.5))
69                         (key-signature . (extra-space . 0.0))
70                         (staff-bar . (extra-space . 0.0))
71                         (time-signature . (extra-space . 0.0))
72                         (first-note . (fixed-space . 0.0))))
73         (breakable . #t)
74         (break-align-symbol . ambitus)
75         (break-visibility . ,begin-of-line-visible)
76         (meta . ((class . Item)
77                  (interfaces . (axis-group-interface
78                                 break-aligned-interface
79                                 ambitus-interface))))))
80
81     (AmbitusLine
82      . (
83         (callbacks . (  (stencil . ,Ambitus::print)))
84         (join-heads . #t)
85         (thickness . 2)
86         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
87
88         (meta . ((class . Item)
89                  (interfaces . (ambitus-interface
90                                 staff-symbol-referencer-interface
91                                 font-interface))))))
92     (AmbitusAccidental
93      . (
94         (font-family . music)
95         (padding . 0.5)
96         (X-offset-callbacks . (,Side_position_interface::aligned_side))
97         (direction . -1)
98         (cautionary-style . parentheses)
99         (callbacks . ((stencil . ,Accidental_interface::print)
100                       (after-line-breaking . ,Accidental_interface::after_line_breaking)
101                       ))
102         (meta . ((class . Item)
103                  (interfaces . (item-interface
104                                 accidental-interface
105                                 break-aligned-interface
106                                 side-position-interface
107                                 font-interface))))))
108
109     (AmbitusNoteHead
110      . (
111         (duration-log . 2)
112         (callbacks . ((stencil . ,Note_head::print)
113                       (glyph-name . ,note-head::calc-glyph-name)
114                       ))
115         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
116         (meta . ((class . Item)
117                  (interfaces . (font-interface
118                                 note-head-interface
119                                 ambitus-interface
120                                 staff-symbol-referencer-interface
121                                 rhythmic-head-interface
122                                 ledgered-interface))))))
123
124     (Arpeggio
125      . (
126         (X-extent-callback . ,Arpeggio::width_callback)
127         (callbacks . (  (stencil . ,Arpeggio::print)))
128         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
129         (X-offset-callbacks . (,Side_position_interface::aligned_side))
130         (direction . -1)
131         (padding . 0.5)
132         (staff-position . 0.0)
133         (meta . ((class . Item)
134                  (interfaces . (arpeggio-interface
135                                 staff-symbol-referencer-interface
136                                 side-position-interface
137                                 font-interface))))))
138
139     (BarLine
140      . (
141         (break-align-symbol . staff-bar)
142         (glyph . "|")
143         (layer . 0)
144         (break-visibility . ,all-visible)
145         (breakable . #t)
146         (callbacks . ((stencil . ,Bar_line::print)
147                       (glyph-name . ,bar-line::calc-glyph-name)
148                       (bar-size .  ,Bar_line::calc_bar_size)
149                       ))
150         (space-alist . (
151                         (time-signature . (extra-space . 0.75))
152                         (custos . (minimum-space . 2.0))
153                         (clef . (minimum-space . 1.0))
154                         (key-signature . (extra-space . 1.0))
155                         (key-cancellation . (extra-space . 1.0))
156                         (first-note . (fixed-space . 1.3))
157                         (next-note . (semi-fixed-space . 1.3))
158                         (right-edge . (extra-space . 0.0))))
159
160         ;;
161         ;; Ross. page 151 lists other values, we opt for a leaner look
162         ;;
163         ;; TODO:
164         ;; kern should scale with linethickness too.
165         (kern . 3.0)
166         (thin-kern . 3.0)
167         (hair-thickness . 1.9)
168         (thick-thickness . 6.0)
169         (meta . ((class . Item)
170                  (interfaces . (bar-line-interface
171                                 break-aligned-interface
172                                 font-interface))))))
173
174     (BarNumber
175      . (
176         (callbacks . ((stencil . ,Text_interface::print)))
177         (breakable . #t)
178         (break-visibility . ,begin-of-line-visible)
179         (padding . 1.0)
180         (direction . 1)
181         (font-family . roman)
182         (font-size . -2)
183         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
184         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
185         (self-alignment-X . 1)
186
187         (meta .
188               ((class . Item)
189                (interfaces . (side-position-interface
190                               text-interface
191                               self-alignment-interface
192                               font-interface
193                               break-aligned-interface))))
194         ))
195
196     (BassFigure
197      . (
198         (callbacks . ((stencil . ,Text_interface::print)))
199         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
200         (direction . 1)
201         (font-family . number)
202
203         ;; We must do this, other BFs in
204         ;; layout16 become too small.
205         (font-size . -4)
206         (kern . 0.2)
207         (meta . ((class . Item)
208                  (interfaces . (text-interface
209                                 rhythmic-grob-interface
210                                 bass-figure-interface
211                                 self-alignment-interface
212                                 font-interface))))))
213
214     (NewBassFigure
215      . (
216         (callbacks . (  (stencil . ,Text_interface::print)))
217         (meta . ((class . Item)
218                  (interfaces . (text-interface
219                                 rhythmic-grob-interface
220                                 bass-figure-interface
221                                 font-interface))))))
222     (BassFigureBracket
223      . ((callbacks . ((stencil . ,Enclosing_bracket::print)))
224         (edge-height . (0.2 . 0.2))
225         (meta . ((class . Item)
226                  (interfaces . (enclosing-bracket-interface)) ))
227         ))
228     (BassFigureContinuation
229      . (
230         (callbacks . (  (stencil . ,Figured_bass_continuation::print)))
231         (Y-offset-callbacks . (,Figured_bass_continuation::center_on_figures))
232         (meta . ((class . Spanner)
233                  (interfaces . (figured-bass-continuation-interface))
234                  ))))
235     (BassFigureLine
236      . (
237         (axes . (,Y))
238         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
239         (meta . ((class . Spanner)
240                  (interfaces . (axis-group-interface
241                                 ))))))
242
243     (BassFigureAlignment
244      . (
245         (axes . (,Y))
246         (threshold . (2 . 1000))
247         (callbacks . ((positioning-done . ,Align_interface::calc_positioning_done)
248                       ))
249         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
250         (stacking-dir . -1)
251         (meta . ((class . Spanner)
252                  (interfaces . (align-interface
253                                 axis-group-interface))))))
254     
255     (Beam
256      . (
257         ;; todo: clean this up a bit: the list is getting
258         ;; rather long.
259         (gap . 0.8)
260         (position-callbacks . (,Beam::least_squares
261                                ,Beam::check_concave
262                                ,Beam::slope_damping
263                                ,Beam::shift_region_to_valid
264                                ,Beam::quanting))
265         (callbacks . ((positions . ,Beam::calc_positions)
266                       (direction . ,Beam::calc_direction)
267                       (stencil . ,Beam::print)
268                       ))
269
270         ;; TODO: should be in SLT.
271         (thickness . 0.48) ; in staff-space
272         (neutral-direction . -1)
273
274         ;; Whe have some unreferenced problems here.
275         ;;
276         ;; If we shorten beamed stems less than normal stems (1 staffspace),
277         ;; or high order less than 8th beams, patterns like
278         ;;     c''4 [c''8 c''] c''4 [c''16 c]
279         ;; are ugly (different stem lengths).
280         ;;
281         ;; But if we shorten 16th beams as much as 8th beams, a single
282         ;; forced 16th beam looks *very* short.
283
284         ;; We choose to shorten 8th beams the same as single stems,
285         ;; and high order beams less than 8th beams, so that all
286         ;; isolated shortened beams look nice and a bit shortened,
287         ;; sadly possibly breaking patterns with high order beams.
288         (beamed-stem-shorten . (1.0 0.5 0.25))
289         (damping . 1)
290         (auto-knee-gap . 5.5)
291
292         ;; only for debugging.
293         (font-family . roman)
294         (meta . ((class . Spanner)
295                  (interfaces . (staff-symbol-referencer-interface
296                                 beam-interface))))))
297
298     (BreakAlignment
299      . (
300         (breakable . #t)
301         (stacking-dir . 1)
302         (callbacks . ((positioning-done . ,Break_align_interface::calc_positioning_done)
303                       ))
304         (break-align-orders . ;; end of line
305                             #((instrument-name
306                                left-edge
307                                ambitus
308                                breathing-sign
309                                clef
310                                staff-bar
311                                key-cancellation
312                                key-signature
313                                time-signature
314                                custos)
315
316                               ;; unbroken
317                               (instrument-name
318                                left-edge
319                                ambitus
320                                breathing-sign
321                                clef
322                                staff-bar
323                                key-cancellation
324                                key-signature
325                                staff
326                                time-signature custos)
327                               
328                               ;; begin of line
329                               (instrument-name
330                                left-edge
331                                ambitus
332                                breathing-sign
333                                clef
334                                key-cancellation
335                                key-signature
336                                staff-bar
337                                time-signature
338                                custos)))
339         (axes . (0))
340         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
341         (meta . ((class . Item)
342                  (interfaces . (break-alignment-interface
343                                 axis-group-interface))))))
344
345     (BreakAlignGroup
346      . (
347         (axes . (0))
348         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
349         (meta . ((class . Item)
350                  (interfaces . (break-aligned-interface
351                                 axis-group-interface))))))
352
353     (BreathingSign
354      . (
355         (break-align-symbol . breathing-sign)
356         (breakable . #t)
357         (space-alist . (
358                         (ambitus . (extra-space . 2.0))
359                         (custos . (minimum-space . 1.0))
360                         (key-signature . (minimum-space . 1.5))
361                         (staff-bar . (minimum-space . 1.5))
362                         (clef . (minimum-space . 2.0))
363                         (first-note . (fixed-space . 1.0)) ;huh?
364                         (right-edge . (extra-space . 0.1))))
365         (callbacks . ((stencil . ,Text_interface::print)))
366         (text . ,(make-musicglyph-markup "scripts.rcomma"))
367         (Y-offset-callbacks . (,Breathing_sign::offset_callback))
368         (break-visibility . ,begin-of-line-invisible)
369         (meta . ((class . Item)
370                  (interfaces . (break-aligned-interface
371                                 breathing-sign-interface
372                                 text-interface
373                                 font-interface))))))
374
375     (Clef
376      . (
377         (callbacks . ((stencil . ,Clef::print)
378                       (glyph-name . ,Clef::calc_glyph_name)
379                       ))
380         (breakable . #t)
381         (font-family . music)
382         (break-align-symbol . clef)
383         (break-visibility . ,begin-of-line-visible)
384         (space-alist . ((ambitus . (extra-space . 2.0))
385                         (staff-bar . (extra-space . 0.7))
386                         (key-cancellation . (minimum-space . 4.0))
387                         (key-signature . (minimum-space . 4.0))
388                         (time-signature . (minimum-space . 4.2))
389                         (first-note . (minimum-fixed-space . 5.0))
390                         (next-note . (extra-space . 0.5))
391                         (right-edge . (extra-space . 0.5))))
392         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
393         (meta . ((class . Item)
394                  (interfaces . (clef-interface
395                                 staff-symbol-referencer-interface
396                                 font-interface
397                                 break-aligned-interface))))))
398
399     (ClusterSpannerBeacon
400      . (
401         (Y-extent-callback . ,Cluster_beacon::height)
402         (meta . ((class . Item)
403                  (interfaces . (cluster-beacon-interface))))))
404
405     (ClusterSpanner
406      . (
407         (callbacks . ((springs-and-rods . ,Spanner::set_spacing_rods)
408                       (stencil . ,Cluster::print)))
409         
410         (minimum-length . 0.0)
411         (padding . 0.25)
412         (style . ramp)
413         (meta . ((class . Spanner)
414                  (interfaces . (cluster-interface))))))
415
416     (ChordName
417      . (
418         (callbacks . ((stencil . ,Text_interface::print)
419                       (after-line-breaking . ,Chord_name::after_line_breaking)
420                       ))
421         (word-space . 0.0)
422         (font-family . sans)
423         (font-size . 1.5)
424         (meta . ((class . Item)
425                  (interfaces . (font-interface
426                                 rhythmic-grob-interface
427                                 text-interface
428                                 chord-name-interface
429                                 item-interface))))))
430
431     (CombineTextScript
432      . (
433         (callbacks . ((stencil . ,Text_interface::print)))
434         (no-spacing-rods . #t)
435         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
436         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
437         (direction . 1)
438         (padding . 0.5)
439         (staff-padding . 0.5)
440         (script-priority . 200)
441         ;; todo: add X self alignment?
442         (baseline-skip . 2)
443         (font-series . bold)
444         (meta . ((class . Item)
445                  (interfaces . (text-script-interface
446                                 text-interface
447                                 side-position-interface
448                                 font-interface))))))
449
450     (Custos
451      . (
452         (break-align-symbol . custos)
453         (breakable . #t)
454         (callbacks . ((stencil . ,Custos::print)))
455         (break-visibility . ,end-of-line-visible)
456         (style . vaticana)
457         (neutral-direction . -1)
458         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
459         (space-alist . (
460                         (first-note . (minimum-fixed-space . 0.0))
461                         (right-edge . (extra-space . 0.1))))
462         (meta . ((class . Item)
463                  (interfaces
464                   . (custos-interface
465                      staff-symbol-referencer-interface
466                      font-interface
467                      break-aligned-interface))))))
468
469     (DotColumn
470      . (
471         (axes . (0))
472         (direction . ,RIGHT)
473         (callbacks . ((positioning-done . ,Dot_column::calc_positioning_done) 
474                       ))
475         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
476         (X-offset-callbacks . (,Dot_column::side_position))
477         (meta . ((class . Item)
478                  (interfaces . (dot-column-interface
479                                 axis-group-interface))))))
480
481     (Dots
482      . (
483         (callbacks . ((stencil . ,Dots::print)))
484         (dot-count . 1)
485         (meta . ((class . Item)
486                  (interfaces . (font-interface
487                                 staff-symbol-referencer-interface
488                                 dots-interface))))))
489
490     (DoublePercentRepeat
491      . (
492         (callbacks . ((stencil . ,Percent_repeat_item_interface::double_percent)))
493         (breakable . #t)
494         (slope . 1.0)
495         (font-encoding . fetaMusic)
496         (width . 2.0)
497         (thickness . 0.48)
498         (break-align-symbol . staff-bar)
499         (break-visibility . ,begin-of-line-invisible)
500         (meta . ((class . Item)
501                  (interfaces . (font-interface
502                                 break-aligned-interface
503                                 percent-repeat-interface))))))
504
505     (DoublePercentRepeatCounter
506      . (
507         (callbacks . ((stencil . ,Text_interface::print)))
508         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
509                                ,Self_alignment_interface::centered_on_other_axis_parent))
510         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
511         (font-encoding . fetaNumber)
512         (self-alignment-X . 0)
513         (font-size . -2) 
514         (direction . 1)
515         (padding . 0.2)
516         (staff-padding . 0.25)
517         (meta . ((class . Item)
518                  (interfaces . (side-position-interface
519                                 self-alignment-interface
520                                 percent-repeat-interface
521                                 font-interface
522                                 text-interface))))))
523     (DynamicLineSpanner
524      . (
525         (axes . (1))
526         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
527         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
528         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
529         (staff-padding . 0.1)
530         (padding . 0.6)
531         (avoid-slur . outside)
532         (slur-padding . 0.3)
533         (minimum-space . 1.2)
534         (direction . -1)
535
536         (meta . ((class . Spanner)
537                  (interfaces . (axis-group-interface
538                                 dynamic-interface
539                                 dynamic-line-spanner-interface
540                                 side-position-interface))))))
541
542     (DynamicText
543      . (
544         
545         ;; todo.
546         (callbacks . ((stencil . ,Text_interface::print)
547                       (direction . ,Script_interface::calc_direction)))
548         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
549         (self-alignment-X . 0)
550         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
551         (self-alignment-Y . 0)
552         (font-series . bold)
553         (font-encoding . fetaDynamic)
554         (font-shape . italic)
555         (no-spacing-rods . #t)
556         (script-priority . 100)
557         (meta . ((class . Item)
558                  (interfaces . (font-interface
559                                 text-interface
560                                 self-alignment-interface
561                                 dynamic-interface
562                                 script-interface))))))
563
564     (DynamicTextSpanner
565      . (
566         (callbacks . ((stencil . ,Dynamic_text_spanner::print)))
567         ;; rather ugh with NCSB
568         ;; (font-series . bold)
569         (font-shape . italic)
570         (style . dashed-line)
571
572         ;; need to blend with dynamic texts.
573         (font-size . 1)
574         (bound-padding . 0.75)
575         (dash-fraction . 0.2)
576         (dash-period . 3.0)
577         (meta . ((class . Spanner)
578                  (interfaces . (font-interface
579                                 text-interface
580                                 dynamic-interface
581                                 dynamic-text-spanner-interface
582                                 spanner-interface))))))
583
584     (Fingering
585      . (
586
587         ;; sync with TextScript (?)
588
589         (padding . 0.5)
590         (avoid-slur . around)
591         (slur-padding . 0.2)
592         (staff-padding . 0.5)
593         (self-alignment-X . 0)
594         (self-alignment-Y . 0)
595         (script-priority . 100)
596         (callbacks . ((stencil . ,Text_interface::print)
597                       (direction . ,Script_interface::calc_direction)))
598         (font-encoding . fetaNumber)
599         (font-size . -5)                ; don't overlap when next to heads.
600         (meta . ((class . Item)
601                  (interfaces . (finger-interface
602                                 font-interface
603                                 text-script-interface
604                                 text-interface
605                                 side-position-interface
606                                 self-alignment-interface
607                                 item-interface))))))
608     (Glissando
609      . (
610         (style . line)
611         (gap . 0.5)
612         (zigzag-width . 0.75)
613         (breakable . #t)
614         (X-extent-callback . #f)
615         (Y-extent-callback . #f)
616         (callbacks . ((stencil . ,Line_spanner::print)
617                       (after-line-breaking . ,Line_spanner::after_line_breaking)
618                       ))
619         
620         (meta . ((class . Spanner)
621                  (interfaces . (line-interface
622                                 line-spanner-interface))))))
623
624     (GridPoint
625      . (
626         (X-extent . (0 . 0))
627         (Y-extent . (0 . 0))
628         (meta . ((class . Item)
629                  (interfaces . (grid-point-interface))))))
630
631     (GridLine
632      . (
633         (callbacks . (stencil . ,Grid_line_interface::print))
634         (X-extent-callback  . ,Grid_line_interface::width_callback)
635         (self-alignment-X . ,CENTER)
636         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
637                                ,Self_alignment_interface::centered_on_parent))
638         (layer . 0)
639         (meta . ((class . Item)
640                  (interfaces . (self-alignment-interface
641                                 grid-line-interface))))))
642
643     (Hairpin
644      . (
645         
646         (callbacks . ((stencil . ,Hairpin::print)
647                       (springs-and-rods . ,Spanner::set_spacing_rods)
648                       (after-line-breaking . ,Hairpin::after_line_breaking)))
649         (thickness . 1.0)
650         (height . 0.6666)
651         (minimum-length . 2.0)
652         (bound-padding . 1.0)
653         (self-alignment-Y . 0)
654         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
655         (meta . ((class . Spanner)
656                  (interfaces . (hairpin-interface
657                                 line-interface
658                                 self-alignment-interface
659                                 dynamic-interface
660                                 spanner-interface))))))
661
662     (HorizontalBracket
663      . (
664         (thickness . 1.0)
665         (callbacks . ((stencil . ,Horizontal_bracket::print)))
666         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
667         (padding . 0.2)
668         (staff-padding . 0.2)
669         (direction . -1)
670         (bracket-flare . (0.5 . 0.5))
671         (meta . ((class . Spanner)
672                  (interfaces . (horizontal-bracket-interface
673                                 side-position-interface
674                                 line-interface
675                                 spanner-interface))))))
676     (InstrumentName
677      . (
678         (breakable . #t)
679         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
680                                ,Side_position_interface::aligned_on_support_refpoints))
681         ;; This direction is for aligned_on_support_refpoints
682         ;; (?) --hwn
683         (direction . 0)
684         (space-alist . (
685                         (left-edge . (extra-space . 1.0))))
686
687         (self-alignment-Y . 0)
688         (callbacks . ((stencil . ,Text_interface::print)))
689         (break-align-symbol . instrument-name)
690         (break-visibility . ,begin-of-line-visible)
691         (baseline-skip . 2)
692         (meta . ((class . Item)
693                  (interfaces . (font-interface
694                                 self-alignment-interface
695                                 side-position-interface
696                                 text-interface
697                                 break-aligned-interface))))))
698
699     (KeyCancellation
700      . (
701         (callbacks . ((stencil . ,Key_signature_interface::print)))
702         (space-alist . (
703                         (time-signature . (extra-space . 1.25))
704                         (staff-bar . (extra-space . 0.6))
705                         (key-signature . (extra-space . 0.5))
706                         (right-edge . (extra-space . 0.5))
707                         (first-note . (fixed-space . 2.5))))
708         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
709         (break-align-symbol . key-cancellation)
710         (break-visibility . ,begin-of-line-invisible)
711         (breakable . #t)
712
713         (meta . ((class . Item)
714                  (interfaces . (key-signature-interface
715                                 font-interface
716                                 break-aligned-interface))))))
717     (KeySignature
718      . (
719         (callbacks . ((stencil . ,Key_signature_interface::print)))
720         (space-alist . (
721                         (time-signature . (extra-space . 1.25))
722                         (staff-bar . (extra-space . 1.1))
723                         (right-edge . (extra-space . 0.5))
724                         (first-note . (fixed-space . 2.5))))
725         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
726         (break-align-symbol . key-signature)
727         (break-visibility . ,begin-of-line-visible)
728         (breakable . #t)
729
730         (meta . ((class . Item)
731                  (interfaces . (key-signature-interface
732                                 font-interface
733                                 break-aligned-interface))))))
734     (LaissezVibrerTie
735      . (
736         (callbacks . ((stencil  . ,Tie::print)
737                       (control-points . ,Laissez_vibrer_tie::calc_control_points)
738                       (direction . ,Laissez_vibrer_tie::calc_direction)
739                       ))
740         (details . ((ratio . 0.333)
741                     (height-limit . 1.0)))
742         (thickness . 1.0)
743         (meta . ((class . Item)
744                  (interfaces . (laissez-vibrer-tie-interface))
745                  ))
746         ))
747     
748     (LaissezVibrerTieColumn
749      . (
750         (X-extent-callback . #f)
751         (Y-extent-callback . #f)
752         (callbacks . ((positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
753                       ))
754         (meta . ((class . Item)
755                  (interfaces . (laissez-vibrer-tie-column-interface))
756                  ))
757         ))
758     
759     (LedgerLineSpanner
760      . (
761         (callbacks . ((springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
762                       
763                       (stencil . ,Ledger_line_spanner::print)))
764         (X-extent-callback . #f)
765         (Y-extent-callback . #f)
766         (minimum-length-fraction . 0.25)
767         (length-fraction . 0.25)
768         (layer . 0)
769         (meta . ((class . Spanner)
770                  (interfaces . (ledger-line-interface))))))
771
772     (LeftEdge
773      . (
774         (break-align-symbol . left-edge)
775         (X-extent . (0 . 0))
776         (breakable . #t)
777         (break-visibility . ,center-invisible)
778         (space-alist . (
779                         (custos . (extra-space . 0.0))
780                         (ambitus . (extra-space . 2.0))
781                         (time-signature . (extra-space . 1.0))
782                         (staff-bar . (extra-space . 0.0))
783                         (breathing-sign . (minimum-space . 0.0))
784                         (clef . (extra-space . 0.8))
785                         (first-note . (fixed-space . 2.0))
786                         (right-edge . (extra-space . 0.0))
787                         (key-signature . (extra-space . 0.0))
788                         (key-cancellation . (extra-space . 0.0))
789                         ))
790         (meta . ((class . Item)
791                  (interfaces . (break-aligned-interface))))))
792
793     (LigatureBracket
794      . (
795         (ligature-primitive-callback . ,Note_head::print)
796         
797         ;; ugh.  A ligature bracket is totally different from
798         ;; a tuplet bracket.
799         (callbacks . ((direction  . ,Tuplet_bracket::calc_direction)
800                       (positions . ,Tuplet_bracket::calc_positions)
801                       (stencil . ,Tuplet_bracket::print)
802                       ))
803         (direction . 1)
804         (gap . 0.0)
805         (padding . 2.0)
806         (thickness . 1.6)
807         (edge-height . (0.7 . 0.7))
808         (shorten-pair . (-0.2 . -0.2))
809         (meta . ((class . Spanner)
810                  (interfaces . (tuplet-bracket-interface
811                                 line-interface))))))
812
813     (LyricHyphen
814      . (
815         (thickness . 1.3)
816         (height . 0.42)
817         (dash-period . 10.0)
818         (length . 0.66)
819         (minimum-length . 0.3)
820         (padding . 0.07)
821                                         ;       (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
822         (callbacks . ((stencil . ,Hyphen_spanner::print)))
823         (Y-extent . (0 . 0))
824         (meta . ((class . Spanner)
825                  (interfaces . (lyric-interface
826                                 lyric-hyphen-interface
827                                 spanner-interface))))))
828
829     (LyricExtender
830      . (
831         (callbacks . ((stencil . ,Lyric_extender::print)))
832         (thickness . 0.8) ; linethickness
833         (minimum-length . 1.5)
834         (Y-extent . (0 . 0))
835         (meta . ((class . Spanner)
836                  (interfaces . (lyric-interface
837                                 lyric-extender-interface))))))
838
839     (LyricText
840      . ((callbacks . ((stencil . ,Text_interface::print)))
841         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
842         (self-alignment-X . 0)
843         (word-space . 0.6)
844         (font-series . bold-narrow)
845         (font-size . 1.0)
846         (meta . ((class . Item)
847                  (interfaces . (rhythmic-grob-interface
848                                 lyric-syllable-interface
849                                 self-alignment-interface
850                                 text-interface
851                                 font-interface))))))
852
853     (MensuralLigature
854      . (
855         (thickness . 1.4)
856         (flexa-width . 2.0)
857         (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
858         (callbacks . ((stencil . ,Mensural_ligature::print)))
859         (meta . ((class . Spanner)
860                  (interfaces . (mensural-ligature-interface
861                                 font-interface))))))
862
863     (MetronomeMark
864      . (
865         (callbacks . ((stencil . ,Text_interface::print)))
866         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
867         (direction . 1)
868         (padding . 0.8)
869         (meta . ((class . Item)
870                  (interfaces . (text-interface
871                                 side-position-interface
872                                 font-interface
873                                 metronome-mark-interface))))))
874     (MeasureGrouping
875      . (
876         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
877         (callbacks . (stencil . ,Measure_grouping::print))
878         (padding . 2)
879         (direction . 1)
880         (thickness . 1)
881         (height . 2.0)
882         (staff-padding . 3)
883         (meta . ((class . Spanner)
884                  (interfaces . (side-position-interface
885                                 measure-grouping-interface))))))
886     (MultiMeasureRest
887      . (
888         (callbacks . ((stencil . ,Multi_measure_rest::print)))
889         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
890         (staff-position . 0)
891         (expand-limit . 10)
892         (thick-thickness . 6.6)
893         (hair-thickness . 2.0)
894         (padding . 1)
895         (meta . ((class . Spanner)
896                  (interfaces . (multi-measure-rest-interface
897                                 multi-measure-interface
898                                 rest-interface
899                                 font-interface
900                                 staff-symbol-referencer-interface))))))
901
902     (MultiMeasureRestNumber
903      . (
904         (callbacks . ((springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
905                       (stencil . ,Text_interface::print)))
906         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
907                                ,Self_alignment_interface::centered_on_other_axis_parent))
908         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
909         (self-alignment-X . 0)
910         (direction . 1)
911         (padding . 0.4)
912         (staff-padding . 0.4)
913         (font-encoding . fetaNumber)
914         (meta . ((class . Spanner)
915                  (interfaces . (side-position-interface
916                                 multi-measure-interface
917                                 self-alignment-interface
918                                 font-interface
919                                 text-interface))))))
920     
921     (MultiMeasureRestText
922      . (
923         (callbacks . ((stencil . ,Text_interface::print)))
924         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
925                                ,Self_alignment_interface::centered_on_other_axis_parent))
926         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
927         (self-alignment-X . 0)
928         (direction . 1)
929         (padding . 0.2)
930         (staff-padding . 0.25)
931         (meta . ((class . Spanner)
932                  (interfaces . (side-position-interface
933                                 multi-measure-interface
934                                 self-alignment-interface
935                                 font-interface
936                                 text-interface))))))
937
938     (NoteCollision
939      . (
940         (axes . (0 1))
941         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
942         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
943         (callbacks . ((positioning-done . ,Note_collision_interface::calc_positioning_done)
944                       ))
945         (meta . ((class . Item)
946                  (interfaces . (note-collision-interface
947                                 axis-group-interface))))))
948
949     (NoteColumn
950      . (
951         (axes . (0 1))
952         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
953         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
954         (meta . ((class . Item)
955                  (interfaces . (axis-group-interface
956                                 note-column-interface))))))
957
958     (NoteHead
959      . (
960         (callbacks . ((stencil . ,Note_head::print)
961                       (stem-attachment . ,Note_head::calc_stem_attachment)
962                       (glyph-name . ,note-head::calc-glyph-name) 
963                       ))
964
965         ;; WTF is this? 
966         (ligature-primitive-callback . ,Note_head::print)
967         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
968         (X-offset-callbacks . (,Note_head::stem_x_shift))
969         (meta . ((class . Item)
970                  (interfaces . (rhythmic-grob-interface
971                                 rhythmic-head-interface
972                                 font-interface
973                                 note-head-interface
974                                 ledgered-interface
975                                 staff-symbol-referencer-interface))))))
976
977     (NoteSpacing
978      . (
979         (stem-spacing-correction . 0.5)
980         (same-direction-correction . 0.25)
981         ;; Changed this from 0.75.
982         ;; If you ever change this back, please document! --hwn
983         (knee-spacing-correction . 1.0)
984
985         (meta . ((class . Item)
986                  (interfaces . (spacing-interface
987                                 note-spacing-interface))))))
988
989     (NoteName
990      . (
991         (callbacks . ((stencil . ,Text_interface::print)))
992         (meta . ((class . Item)
993                  (interfaces . (note-name-interface
994                                 text-interface
995                                 font-interface))))))
996
997     (OctavateEight
998      . (
999         (self-alignment-X . 0)
1000         (break-visibility . ,begin-of-line-visible)
1001         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
1002                                ,Self_alignment_interface::aligned_on_self))
1003         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1004         (callbacks . ((stencil . ,Text_interface::print)))
1005
1006         ;; no Y dimensions, because of lyrics under tenor clef.
1007         (Y-extent . (0 . 0))
1008         (font-shape . italic)
1009         (padding . 0.6)
1010         (staff-padding . 0.2)
1011         (font-size . -4)
1012         (meta . ((class . Item)
1013                  (interfaces . (text-interface
1014                                 self-alignment-interface
1015                                 side-position-interface
1016                                 font-interface))))))
1017
1018     (OttavaBracket
1019      . (
1020         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1021         (callbacks . ((stencil . ,Ottava_bracket::print)))
1022         (font-shape . italic)
1023         (shorten-pair . (0.0 . -0.6))
1024         (staff-padding . 1.0)
1025         (padding . 0.5)
1026         (minimum-length . 1.0)
1027         (dash-fraction . 0.3)
1028         (edge-height . (0 . 1.2))
1029         (direction . 1)
1030         (meta . ((class . Spanner)
1031                  (interfaces . (ottava-bracket-interface
1032                                 horizontal-bracket-interface
1033                                 line-interface
1034                                 side-position-interface
1035                                 font-interface
1036                                 text-interface))))))
1037
1038     (PaperColumn
1039      . (
1040         (axes . (0))
1041         (callbacks . ((before-line-breaking . ,Paper_column::before_line_breaking)
1042                       ;; (stencil . ,Paper_column::print)
1043                       ))
1044         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1045
1046         ;; debugging
1047         ;;                       (font-size . -6) (font-name . "sans") (Y-extent-callback . #f)
1048         (meta . ((class . Paper_column)
1049                  (interfaces . (paper-column-interface
1050                                 axis-group-interface
1051                                 spaceable-grob-interface))))))
1052
1053     (PhrasingSlur
1054      . ((slur-details . ,default-slur-details)
1055         (callbacks . ((control-points . ,Slur::calc_control_points)
1056                       (direction . ,Slur::calc_direction)
1057                       (springs-and-rods . ,Spanner::set_spacing_rods)
1058                       (stencil . ,Slur::print)                
1059                       ))
1060         
1061         (thickness . 1.1)
1062         (minimum-length . 1.5)
1063         (Y-extent-callback . ,Slur::height)
1064         (height-limit . 2.0)
1065         (ratio . 0.333)
1066         (meta . ((class . Spanner)
1067                  (interfaces . (slur-interface))))))
1068
1069     (NonMusicalPaperColumn
1070      . (
1071         (axes . (0))
1072         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1073         (callbacks . ((before-line-breaking . ,Paper_column::before_line_breaking)
1074                       ;;                      (stencil . ,Paper_column::print)
1075                       ))
1076         (breakable . #t)
1077
1078         ;; debugging stuff: print column number.
1079         ;;               (font-size . -6) (font-name . "sans")  (Y-extent-callback . #f)
1080
1081         (meta . ((class . Paper_column)
1082                  (interfaces . (paper-column-interface
1083                                 axis-group-interface
1084                                 spaceable-grob-interface))))))
1085
1086     (PercentRepeat
1087      . (
1088         (callbacks . ((springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
1089                       (stencil . ,Multi_measure_rest::percent)))
1090         (slope . 1.0)
1091         (thickness . 0.48)
1092         (font-encoding . fetaMusic)
1093         (meta . ((class . Spanner)
1094                  (interfaces . (multi-measure-rest-interface
1095                                 font-interface
1096                                 percent-repeat-interface))))))
1097     (PercentRepeatCounter
1098      . ((callbacks . ((stencil . ,Text_interface::print)))
1099         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
1100                                ,Self_alignment_interface::centered_on_other_axis_parent))
1101         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1102         (self-alignment-X . 0)
1103         (direction . 1)
1104         (padding . 0.2)
1105         (staff-padding . 0.25)
1106         (font-size . -2) 
1107         (font-encoding . fetaNumber)
1108         (meta . ((class . Spanner)
1109                  (interfaces . (side-position-interface
1110                                 self-alignment-interface
1111                                 percent-repeat-interface
1112                                 font-interface
1113                                 text-interface))))))
1114
1115     ;; an example of a text spanner
1116     (PianoPedalBracket
1117      . (
1118         (callbacks . ((stencil . ,Piano_pedal_bracket::print)))
1119         (style . line)
1120         (bound-padding . 1.0)
1121         (direction . -1)
1122         (bracket-flare . (0.5 . 0.5))
1123         (edge-height . (1.0 . 1.0))
1124         (shorten-pair . (0.0 . 0.0))
1125         (thickness .  1.0)
1126         (meta . ((class . Spanner)
1127                  (interfaces . (line-interface
1128                                 piano-pedal-interface
1129                                 piano-pedal-bracket-interface))))))
1130
1131     (RehearsalMark
1132      . (
1133         (callbacks . ((stencil . ,Text_interface::print)))
1134         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1135         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1136         (callbacks . ((after-line-breaking . ,shift-right-at-line-begin)))
1137         (self-alignment-X . 0)
1138         (direction . 1)
1139         (breakable . #t)
1140         (font-size . 2)
1141         (baseline-skip . 2)
1142         (break-visibility . ,end-of-line-invisible)
1143         (padding . 0.8)
1144         (meta . ((class . Item)
1145                  (interfaces . (text-interface
1146                                 side-position-interface
1147                                 font-interface
1148                                 mark-interface
1149                                 self-alignment-interface))))))
1150
1151     (RemoveEmptyVerticalGroup
1152      . (
1153         (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
1154         (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
1155         (axes . (1))
1156         (meta . ((class . Spanner)
1157                  (interfaces . (axis-group-interface
1158                                 vertically-spaceable-interface
1159                                 hara-kiri-group-interface
1160                                 spanner-interface))))))
1161
1162     (RepeatSlash
1163      . (
1164         (callbacks . ((stencil . ,Percent_repeat_item_interface::beat_slash)))
1165         (thickness . 0.48)
1166         (slope . 1.7)
1167         (meta . ((class . Item)
1168                  (interfaces . (percent-repeat-interface))))))
1169     (Rest
1170      . (
1171         (X-extent-callback . ,Rest::extent_callback)
1172         (Y-extent-callback . ,Rest::extent_callback)
1173         (callbacks . ((stencil . ,Rest::print)))
1174         (Y-offset-callbacks . (
1175                                ,Staff_symbol_referencer::callback
1176                                ,Rest::polyphonic_offset_callback
1177                                ,Rest::y_offset_callback
1178                                ))
1179         (minimum-distance . 0.25)
1180         (meta . ((class . Item)
1181                  (interfaces . (font-interface
1182                                 rhythmic-head-interface
1183                                 rhythmic-grob-interface
1184                                 staff-symbol-referencer-interface
1185                                 rest-interface))))))
1186
1187     (RestCollision
1188      . (
1189         (minimum-distance . 0.75)
1190         (callbacks .  ((positioning-done . ,Rest_collision::calc_positioning_done)
1191                        ))
1192         (meta . ((class . Item)
1193                  (interfaces . (rest-collision-interface))))))
1194
1195     (Script
1196      . (
1197         ;; don't set direction here: it breaks staccato.
1198
1199         ;; This value is sensitive: if too large, staccato dots will move a
1200         ;; space a away.
1201         (padding . 0.20)
1202         (staff-padding . 0.25)
1203         ;; (script-priority . 0) priorities for scripts, see script.scm
1204         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
1205         (callbacks . ((stencil . ,Script_interface::print)
1206                       (direction . ,Script_interface::calc_direction)))
1207         (font-encoding . fetaMusic)
1208         (meta . ((class . Item)
1209                  (interfaces . (script-interface
1210                                 side-position-interface
1211                                 font-interface))))))
1212
1213     (ScriptColumn
1214      . (
1215         (callbacks . ((before-line-breaking . ,Script_column::before_line_breaking)))
1216         (meta . ((class . Item)
1217                  (interfaces . (script-column-interface))))))
1218
1219     (SeparationItem
1220      . (
1221         (X-extent-callback . #f)
1222         (Y-extent-callback . #f)
1223         (meta . ((class . Item)
1224                  (interfaces . (spacing-interface
1225                                 separation-item-interface))))))
1226
1227     (SeparatingGroupSpanner
1228      . (
1229         (callbacks . ((springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1230                       ))
1231         (meta . ((class . Spanner)
1232                  (interfaces . (only-prebreak-interface
1233                                 spacing-interface
1234                                 separation-spanner-interface))))))
1235
1236     (Slur
1237      . ((slur-details . ,default-slur-details)
1238         (callbacks . ((control-points . ,Slur::calc_control_points)
1239                       (direction . ,Slur::calc_direction)
1240                       (springs-and-rods . ,Spanner::set_spacing_rods)
1241                       (stencil . ,Slur::print)
1242                       ))
1243         (thickness . 1.0)
1244         (minimum-length . 1.5)
1245         (Y-extent-callback . ,Slur::height)
1246                                         ; Slur::height)
1247         (height-limit . 2.0)
1248         (ratio . 0.25)
1249         (meta . ((class . Spanner)
1250                  (interfaces . (slur-interface))))))
1251
1252     (SpacingSpanner
1253      . (
1254         (callbacks . ((springs-and-rods . ,Spacing_spanner::set_springs)))
1255         (grace-space-factor . 0.6)
1256         (shortest-duration-space . 2.0)
1257         (spacing-increment . 1.2)
1258         (base-shortest-duration . ,(ly:make-moment 3 16))
1259         (meta . ((class . Spanner)
1260                  (interfaces . (spacing-interface
1261                                 spacing-spanner-interface))))))
1262
1263     (SpanBar
1264      . (
1265         (break-align-symbol . staff-bar)
1266         (X-extent-callback . ,Span_bar::width_callback)
1267         (Y-extent-callback . ())
1268         (layer . 0)
1269         (breakable . #t)
1270         (callbacks . ((stencil . ,Span_bar::print)
1271                       (bar-size . ,Span_bar::calc_bar_size)
1272                       (glyph-name . ,Span_bar::calc_glyph_name)
1273                       (before-line-breaking . ,Span_bar::before_line_breaking)))
1274         ;; ugh duplication!
1275
1276         ;;
1277         ;; Ross. page 151 lists other values, we opt for a leaner look
1278         ;;
1279         (kern . 3.0)
1280         (thin-kern . 3.0)
1281         (hair-thickness . 1.6)
1282         (thick-thickness . 6.0)
1283         (meta . ((class . Item)
1284                  (interfaces . (span-bar-interface
1285                                 font-interface
1286                                 bar-line-interface))))))
1287
1288     (StanzaNumber
1289      . ((callbacks . ((stencil . ,Text_interface::print)))
1290         (font-series . bold)
1291         (padding . 1.0)
1292         (X-offset-callbacks . (,Side_position_interface::aligned_side))
1293         (direction . ,LEFT)
1294         (meta . ((class . Item)
1295                  (interfaces . (side-position-interface
1296                                 stanza-number-interface
1297                                 text-interface
1298                                 font-interface))))))
1299
1300     (StringNumber
1301      . (
1302         (callbacks . ((stencil . ,print-circled-text-callback)))
1303         (padding . 0.5)
1304         (staff-padding . 0.5)
1305         (self-alignment-X . 0)
1306         (self-alignment-Y . 0)
1307         (script-priority . 100)
1308         (font-encoding . fetaNumber)
1309         (font-size . -5)                ; don't overlap when next to heads.
1310         (meta . ((class . Item)
1311                  (interfaces . (string-number-interface
1312                                 font-interface
1313                                 text-script-interface
1314                                 text-interface
1315                                 side-position-interface
1316                                 self-alignment-interface
1317                                 item-interface))))))
1318
1319     (StaffSpacing
1320      . (
1321         (breakable . #t)
1322         (stem-spacing-correction . 0.4)
1323         (meta . ((class . Item)
1324                  (interfaces . (spacing-interface
1325                                 staff-spacing-interface))))))
1326
1327     (SostenutoPedal
1328      . (
1329         (callbacks . ((stencil . ,Text_interface::print)))
1330         (direction . 1)
1331         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1332         (no-spacing-rods . #t)
1333         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1334         (font-shape . italic)
1335         (self-alignment-X . 0)
1336         (meta . ((class . Item)
1337                  (interfaces . (text-interface
1338                                 self-alignment-interface
1339                                 font-interface))))))
1340
1341     (SostenutoPedalLineSpanner
1342      . (
1343         (axes . (1))
1344         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1345         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1346
1347         (padding . 1.2)
1348         (minimum-space . 1.0)
1349         (direction . -1)
1350         (meta . ((class . Spanner)
1351                  (interfaces . (piano-pedal-interface
1352                                 axis-group-interface
1353                                 side-position-interface))))))
1354
1355     (StaffSymbol
1356      . (
1357         (callbacks . ((stencil . ,Staff_symbol::print)))
1358         (line-count . 5)
1359         (ledger-line-thickness . (1.0 . 0.1))
1360         (layer . 0)
1361         (meta . ((class . Spanner)
1362                  (interfaces . (staff-symbol-interface))))))
1363
1364     (Stem
1365      . (
1366         ;; this list is rather long. Trim --hwn
1367         (callbacks . ((direction . ,Stem::calc_direction)
1368                       (stem-end-position . ,Stem::calc_stem_end_position)
1369                       (stem-info . ,Stem::calc_stem_info)
1370                       (positioning-done . ,Stem::calc_positioning_done)
1371                       (stencil . ,Stem::print)
1372                       (length . ,Stem::calc_length)
1373                       ))
1374         (thickness . 1.3)
1375
1376         (details
1377          . (
1378             ;; 3.5 (or 3 measured from note head) is standard length
1379             ;; 32nd, 64th flagged stems should be longer
1380             (lengths . (3.5 3.5 3.5 4.5 5.0))
1381
1382             ;; FIXME.  3.5 yields too long beams (according to Ross and
1383             ;; looking at Baerenreiter examples) for a number of common
1384             ;; boundary cases.  Subtracting half a beam thickness fixes
1385             ;; this, but the bug may well be somewhere else.
1386
1387             ;; FIXME this should come from 'lengths
1388             (beamed-lengths . (3.26 3.5 3.6))
1389
1390             ;; The 'normal' minima
1391             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1392                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1393
1394             ;; The 'extreme case' minima
1395             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1396
1397             ;; Stems in unnatural (forced) direction should be shortened by
1398             ;; one staff space, according to [Roush & Gourlay].
1399             ;; Flagged stems we shorten only half a staff space.
1400             (stem-shorten . (1.0 0.5))
1401
1402             ))
1403         
1404
1405         ;; default stem direction for note on middle line
1406         (neutral-direction . -1)
1407
1408         ;; We use the normal minima as minimum for the ideal lengths,
1409         ;; and the extreme minima as abolute minimum length.
1410
1411         (X-offset-callbacks . (,Stem::offset_callback))
1412         (X-extent-callback . ,Stem::width_callback)
1413         (Y-extent-callback . ,Stem::height)
1414         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1415         (meta . ((class . Item)
1416                  (interfaces . (stem-interface
1417                                 font-interface))))))
1418
1419     (StemTremolo
1420      . (
1421         (callbacks . ((stencil . ,Stem_tremolo::print)))
1422         (Y-extent-callback . ,Stem_tremolo::height)
1423         (X-extent-callback . #f)
1424
1425         (beam-width . 1.6) ; staff-space
1426         (beam-thickness . 0.48) ; staff-space
1427         (meta . ((class . Item)
1428                  (interfaces . (stem-tremolo-interface))))))
1429
1430     (SustainPedal
1431      . (
1432         (no-spacing-rods . #t)
1433         (callbacks . ((stencil . ,Sustain_pedal::print)))
1434         (self-alignment-X . 0)
1435         (direction . 1)
1436         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1437         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1438         (meta . ((class . Item)
1439                  (interfaces . (piano-pedal-interface
1440                                 text-spanner-interface
1441                                 text-interface
1442                                 self-alignment-interface
1443                                 font-interface))))))
1444
1445     (SustainPedalLineSpanner
1446      . (
1447         (axes . (1))
1448         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1449         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1450
1451         (padding . 1.2)
1452         (staff-padding . 1.2)
1453         (minimum-space . 1.0)
1454         (direction . -1)
1455         (meta . ((class . Spanner)
1456                  (interfaces . (piano-pedal-interface
1457                                 axis-group-interface
1458                                 side-position-interface))))))
1459
1460     (System
1461      . (
1462         (axes . (0 1))
1463         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1464         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1465         (meta . ((class . System)
1466                  (interfaces . (system-interface
1467                                 axis-group-interface))))))
1468
1469     (SystemStartBrace
1470      . (
1471         (glyph . "brace")
1472         (callbacks . ((stencil . ,System_start_delimiter::print)))
1473         (collapse-height . 5.0)
1474         (font-encoding . fetaBraces)
1475         (Y-extent-callback . #f)
1476         (meta . ((class . Spanner)
1477                  (interfaces . (system-start-delimiter-interface
1478                                 font-interface))))))
1479
1480     (SystemStartBracket
1481      . (
1482         (Y-extent-callback . #f)
1483         (X-offset-callbacks . (,(lambda (g a) -0.8)))
1484         (callbacks . ((stencil . ,System_start_delimiter::print)))
1485         (glyph . "bracket")
1486         (collapse-height . 5.0)
1487         (thickness . 0.45)
1488         (meta . ((class . Spanner)
1489                  (interfaces . (font-interface
1490                                 system-start-delimiter-interface))))))
1491
1492     (SystemStartBar
1493      . (
1494         (Y-extent-callback . #f)
1495         (glyph . "bar-line")
1496         (thickness . 1.6)
1497         (callbacks . ((stencil . ,System_start_delimiter::print)
1498                       ))
1499         (meta . ((class . Spanner)
1500                  (interfaces . (system-start-delimiter-interface))))))
1501
1502     (TabNoteHead
1503      . (
1504         (callbacks . ((stencil . ,Text_interface::print)))
1505         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1506         (font-size . -2)
1507         (stem-attachment . (1.0 . 1.35))
1508         (font-series . bold)
1509         (meta . ((class . Item)
1510                  (interfaces
1511                   . (rhythmic-head-interface
1512                      font-interface
1513                      note-head-interface
1514                      staff-symbol-referencer-interface
1515                      text-interface))))))
1516
1517     (TextScript
1518      . (
1519         (no-spacing-rods . #t)
1520         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1521         (direction . -1)
1522
1523         ;; sync with Fingering ?
1524         (padding . 0.5)
1525         (staff-padding . 0.5)
1526         (callbacks . ((stencil . ,Text_interface::print)
1527                       (direction . ,Script_interface::calc_direction)))
1528         (avoid-slur . around)
1529         (slur-padding . 0.5)
1530         (script-priority . 200)
1531         ;; todo: add X self alignment?
1532         (meta . ((class . Item)
1533                  (interfaces . (text-script-interface
1534                                 text-interface
1535                                 side-position-interface
1536                                 font-interface))))))
1537
1538     (TextSpanner
1539      . (
1540         (callbacks .((stencil . ,Text_spanner::print)))
1541         (font-shape . italic)
1542         (style . dashed-line)
1543         (staff-padding . 0.8)
1544         (dash-fraction . 0.2)
1545         (dash-period . 3.0)
1546         (direction . 1)
1547         (meta . ((class . Spanner)
1548                  (interfaces . (text-spanner-interface
1549                                 side-position-interface
1550                                 font-interface))))))
1551
1552     (Tie
1553      . (
1554         (callbacks . ((control-points . ,Tie::calc_control_points)
1555                       (direction . ,Tie::calc_direction)
1556                       (stencil . ,Tie::print)
1557                       ))
1558         (details . ((ratio . 0.333)
1559                     (height-limit . 1.0)
1560                     (between-length-limit . 1.0)))
1561         (thickness . 1.0)
1562         (meta . ((class . Spanner)
1563                  (interfaces . (tie-interface))))
1564         ))
1565
1566     (TieColumn
1567      . (
1568         (callbacks . ((positioning-done . ,Tie_column::calc_positioning_done)
1569                       (before-line-breaking . ,Tie_column::before_line_breaking)
1570                       ))
1571         (X-extent-callback . #f)
1572         (Y-extent-callback . #f)
1573         
1574         (meta . ((class . Spanner)
1575                  (interfaces . (tie-column-interface))))))
1576
1577     (TimeSignature
1578      . (
1579         (callbacks . ((stencil . ,Time_signature::print)))
1580         (break-align-symbol . time-signature)
1581         (break-visibility . ,all-visible)
1582         (space-alist . (
1583                         (first-note . (fixed-space . 2.0))
1584                         (right-edge . (extra-space . 0.5))
1585                         (staff-bar . (minimum-space . 2.0))))
1586         (breakable . #t)
1587         (style . C)
1588         (meta . ((class . Item)
1589                  (interfaces . (time-signature-interface
1590                                 break-aligned-interface
1591                                 font-interface))))))
1592
1593     (TrillSpanner
1594      . (
1595         (callbacks . ((stencil . ,Dynamic_text_spanner::print)))
1596         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1597                             ""))
1598         (style . trill)
1599         (staff-padding . 1.0)
1600         (padding . 0.5)
1601         (direction . 1)
1602         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1603         (meta . ((class . Spanner)
1604                  (interfaces . (text-spanner-interface
1605                                 side-position-interface
1606                                 font-interface))))))
1607
1608     (TrillPitchAccidental
1609      . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1610         (padding . 0.2)
1611         (direction . ,LEFT)
1612         (font-size . -4)
1613         (callbacks . ((stencil . ,Accidental_interface::print)))
1614         (meta . ((class . Item)
1615                  (interfaces . (item-interface
1616                                 accidental-interface
1617                                 side-position-interface
1618                                 font-interface))))))
1619
1620     (TrillPitchGroup
1621      . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1622         (axes . (,X))
1623         (font-size . -4)
1624         (callbacks . ((stencil . ,parenthesize-elements)))
1625         (direction . ,RIGHT)
1626         (padding . 0.3)
1627         (meta . ((class . Item)
1628                  (interfaces . (side-position-interface
1629                                 note-head-interface
1630                                 rhythmic-head-interface
1631                                 font-interface
1632                                 accidental-interface
1633                                 axis-group-interface))))))
1634
1635     (TrillPitchHead
1636      . ((callbacks . ((stencil . ,Note_head::print)))
1637         (duration-log . 2)
1638         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1639         (font-size . -4)
1640         (meta . ((class . Item)
1641                  (interfaces . (item-interface
1642                                 rhythmic-head-interface
1643                                 font-interface
1644                                 pitched-trill-interface
1645                                 ledgered-interface
1646                                 staff-symbol-referencer-interface))))))
1647
1648     (TupletBracket
1649      . (
1650         (padding . 1.1)
1651         (thickness . 1.6)
1652         (edge-height . (0.7 . 0.7))
1653         (shorten-pair . (-0.2 . -0.2))
1654         (callbacks . ((direction  . ,Tuplet_bracket::calc_direction)
1655                       (positions . ,Tuplet_bracket::calc_positions)
1656                       (stencil . ,Tuplet_bracket::print)
1657                       ))
1658         (font-shape . italic)
1659
1660         (font-size . -2)
1661         (meta . ((class . Spanner)
1662                  (interfaces . (text-interface
1663                                 line-interface
1664                                 tuplet-bracket-interface
1665                                 font-interface))))))
1666
1667     (UnaCordaPedal
1668      . (
1669         (callbacks . ((stencil . ,Text_interface::print)))
1670         (font-shape . italic)
1671         (no-spacing-rods . #t)
1672         (self-alignment-X . 0)
1673         (direction . 1)
1674         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1675         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1676         (meta . ((class . Item)
1677                  (interfaces . (text-interface
1678                                 self-alignment-interface
1679                                 font-interface))))))
1680
1681     (UnaCordaPedalLineSpanner
1682      . (
1683         (axes . (1))
1684         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1685         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1686         (padding . 1.2)
1687         (staff-padding . 1.2)
1688         (minimum-space . 1.0)
1689         (direction . -1)
1690         (meta . ((class . Spanner)
1691                  (interfaces . (piano-pedal-interface
1692                                 axis-group-interface
1693                                 side-position-interface))))))
1694
1695     (VaticanaLigature
1696      . (
1697         (thickness . 0.6)
1698         (flexa-width . 2.0)
1699         (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1700         (callbacks . ((stencil . ,Vaticana_ligature::print)))
1701         (meta . ((class . Spanner)
1702                  (interfaces . (vaticana-ligature-interface
1703                                 font-interface))))))
1704
1705     (VerticalAlignment
1706      . (
1707         (axes . (1))
1708         (callbacks . ((positioning-done . ,Align_interface::calc_positioning_done)
1709                       (after-line-breaking . ,Align_interface::stretch_after_break)
1710                       ))
1711         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1712         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1713         (stacking-dir . -1)
1714         (meta . ((class . Spanner)
1715                  (interfaces . (align-interface
1716                                 axis-group-interface))))))
1717
1718     (VerticalAxisGroup
1719      . (
1720         (axes . (1))
1721         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1722         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1723
1724         (meta . ((class . Spanner)
1725                  (interfaces . (axis-group-interface
1726                                 vertically-spaceable-interface))))))
1727
1728     (VocalName
1729      . (
1730         (breakable . #t)
1731         (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
1732         (direction . 0)
1733         (space-alist . ((left-edge . (extra-space . 1.0))))
1734         (break-align-symbol . instrument-name)
1735         (callbacks . ((stencil . ,Text_interface::print)))
1736         (break-align-symbol . clef)
1737         (break-visibility . ,begin-of-line-visible)
1738         (baseline-skip . 2)
1739         (meta . ((class . Item)
1740                  (interfaces . (font-interface
1741                                 self-alignment-interface
1742                                 side-position-interface
1743                                 text-interface
1744                                 break-aligned-interface))))))
1745
1746     (VoltaBracket
1747      . (
1748         (callbacks . ((stencil . ,Volta_bracket_interface::print)
1749                       (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)))
1750         (direction . ,UP)
1751         (padding . 1)
1752         (font-encoding . fetaNumber)
1753         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1754         (thickness . 1.6)  ;;  linethickness
1755         (edge-height . (2.0 . 2.0)) ;; staffspace;
1756         (minimum-space . 5)
1757         (font-size . -4)
1758         (meta . ((class . Spanner)
1759                  (interfaces . (volta-bracket-interface
1760                                 horizontal-bracket-interface                            
1761                                 line-interface
1762                                 text-interface
1763                                 side-position-interface
1764                                 font-interface))))))
1765
1766     
1767     (VoiceFollower
1768      . (
1769         (style . line)
1770         (gap . 0.5)
1771         (breakable . #t)
1772         (X-extent-callback . #f)
1773         (Y-extent-callback . #f)
1774         
1775         (callbacks . ((stencil . ,Line_spanner::print)
1776                       (after-line-breaking . ,Line_spanner::after_line_breaking)))
1777         (meta . ((class . Spanner)
1778                  (interfaces . (line-spanner-interface
1779                                 line-interface))))))))
1780
1781 (define (completize-grob-entry x)
1782   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1783 "
1784   ;;  (display (car x))
1785   ;;  (newline)
1786   (let* ((name-sym  (car x))
1787          (grob-entry (cdr x))
1788          (meta-entry (cdr (assoc 'meta grob-entry)))
1789          (class (cdr (assoc 'class meta-entry)))
1790          (ifaces-entry
1791           (cdr (assoc 'interfaces meta-entry))))
1792
1793     (cond
1794      ((eq? 'Item class)
1795       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1796      ((eq? 'Spanner class)
1797       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1798      ((eq? 'Paper_column class)
1799       (set! ifaces-entry (cons 'item-interface
1800                                (cons 'paper-column-interface ifaces-entry))))
1801      ((eq? 'System class)
1802       (set! ifaces-entry (cons 'system-interface
1803                                (cons 'spanner-interface ifaces-entry))))
1804      (else
1805       (ly:warning "Unknown class ~a" class)))
1806     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1807
1808     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1809     (set! meta-entry (assoc-set! meta-entry 'interfaces
1810                                  ifaces-entry))
1811     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1812     (cons name-sym grob-entry)))
1813
1814 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1815
1816 ;;  (display (map pair? all-grob-descriptions))
1817
1818 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1819
1820 (map (lambda (x)
1821        ;; (display (car x)) (newline)
1822
1823        (set-object-property! (car x) 'translation-type? list?)
1824        (set-object-property! (car x) 'is-grob? #t))
1825      all-grob-descriptions)
1826
1827 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1828