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