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