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