]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Fix #907.
[lilypond.git] / scm / define-grobs.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; LilyPond is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 ;;;; distances are given in line-thickness (thicknesses) and
20 ;;;; staff-space (distances)
21
22 ;;;; WARNING: the meta field should be the last one.
23 ;;;; WARNING: don't use anonymous functions for initialization.
24
25 ;; TODO: junk the meta field in favor of something more compact?
26
27 (define-public all-grob-descriptions
28   `(
29     (Accidental
30      . (
31         (alteration . ,accidental-interface::calc-alteration)
32         (avoid-slur . inside)
33         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
34         (stencil . ,ly:accidental-interface::print)
35         (X-extent . ,ly:accidental-interface::width)
36         (Y-extent . ,ly:accidental-interface::height)
37         (meta . ((class . Item)
38                  (interfaces . (accidental-interface
39                                 font-interface))))))
40
41     (AccidentalCautionary
42      . (
43         (alteration . ,accidental-interface::calc-alteration)
44         (avoid-slur . inside)
45         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
46         (parenthesized . #t)
47         (stencil . ,ly:accidental-interface::print)
48         (Y-extent . ,ly:accidental-interface::height)
49         (meta . ((class . Item)
50                  (interfaces . (accidental-interface
51                                 font-interface))))))
52
53     (AccidentalPlacement
54      . (
55         (direction .  ,LEFT)
56         (left-padding . 0.2)
57         (positioning-done . ,ly:accidental-placement::calc-positioning-done)
58
59         ;; this is quite small, but it is very ugly to have
60         ;; accs closer to the previous note than to the next one.
61         (right-padding . 0.15)
62
63         ;; for horizontally stacked scripts.
64         (script-priority .  -100)
65
66         (X-extent . ,ly:axis-group-interface::width)
67         (meta . ((class . Item)
68                  (interfaces . (accidental-placement-interface))))))
69
70     (AccidentalSuggestion
71      . (
72         (alteration . ,accidental-interface::calc-alteration)
73         (direction . ,UP)
74         (font-size . -2)
75         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
76         (outside-staff-priority . 0)
77         (script-priority . 0)
78         (self-alignment-X . ,CENTER)
79         (side-axis . ,Y)
80         (staff-padding . 0.25)
81         (stencil . ,ly:accidental-interface::print)
82         (X-extent . ,ly:accidental-interface::width)
83         (X-offset . ,(ly:make-simple-closure
84                       `(,+
85                         ,(ly:make-simple-closure
86                           (list ly:self-alignment-interface::centered-on-x-parent))
87                         ,(ly:make-simple-closure
88                           (list ly:self-alignment-interface::x-aligned-on-self)))))
89         (Y-extent . ,ly:accidental-interface::height)
90         (Y-offset . ,ly:side-position-interface::y-aligned-side)
91         (meta . ((class . Item)
92                  (interfaces . (accidental-interface
93                                 accidental-suggestion-interface
94                                 font-interface
95                                 script-interface
96                                 self-alignment-interface
97                                 side-position-interface))))))
98
99     (Ambitus
100      . (
101         (axes . (,X ,Y))
102         (break-align-symbol . ambitus)
103         (break-visibility . ,begin-of-line-visible)
104         (non-musical . #t)
105         (space-alist . (
106                         (clef . (extra-space . 0.5))
107                         (key-signature . (extra-space . 0.0))
108                         (staff-bar . (extra-space . 0.0))
109                         (time-signature . (extra-space . 0.0))
110                         (first-note . (fixed-space . 0.0))))
111         (X-extent . ,ly:axis-group-interface::width)
112         (Y-extent . ,ly:axis-group-interface::height)
113         (meta . ((class . Item)
114                  (interfaces . (ambitus-interface
115                                 axis-group-interface
116                                 break-aligned-interface))))))
117
118     (AmbitusAccidental
119      . (
120         (direction . ,LEFT)
121         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
122         (padding . 0.5)
123         (side-axis . ,X)
124         (stencil . ,ly:accidental-interface::print)
125         (X-offset . ,ly:side-position-interface::x-aligned-side)
126         (Y-extent . ,ly:accidental-interface::height)
127         (meta . ((class . Item)
128                  (interfaces . (accidental-interface
129                                 break-aligned-interface
130                                 font-interface
131                                 side-position-interface))))))
132
133     (AmbitusLine
134      . (
135         (gap . 0.35)
136         (stencil . ,ambitus::print)
137         (thickness . 2)
138         (X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
139         (meta . ((class . Item)
140                  (interfaces . (ambitus-interface
141                                 font-interface))))))
142
143     (AmbitusNoteHead
144      . (
145         (duration-log . 2)
146         (glyph-name . ,note-head::calc-glyph-name)
147         (stencil . ,ly:note-head::print)
148         (Y-offset . ,ly:staff-symbol-referencer::callback)
149         (meta . ((class . Item)
150                  (interfaces . (ambitus-interface
151                                 font-interface
152                                 ledgered-interface
153                                 note-head-interface
154                                 rhythmic-head-interface
155                                 staff-symbol-referencer-interface))))))
156
157     (Arpeggio
158      . (
159         (direction . ,LEFT)
160         (padding . 0.5)
161         (positions . ,ly:arpeggio::calc-positions)
162         (script-priority . 0)
163         (side-axis . ,X)
164         (staff-position . 0.0)
165         (stencil . ,ly:arpeggio::print)
166         (X-extent . ,ly:arpeggio::width)
167         (X-offset . ,ly:side-position-interface::x-aligned-side)
168         (Y-extent . ,ly:arpeggio::height)
169         (Y-offset . ,ly:staff-symbol-referencer::callback)
170         (meta . ((class . Item)
171                  (interfaces . (arpeggio-interface
172                                 font-interface
173                                 side-position-interface
174                                 staff-symbol-referencer-interface))))))
175
176     (BalloonTextItem
177      . (
178         (stencil . ,ly:balloon-interface::print)
179         (text . ,(grob::calc-property-by-copy 'text))
180         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
181         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
182         (meta . ((class . Item)
183                  (interfaces . (balloon-interface
184                                 font-interface
185                                 text-interface))))))
186
187     (BarLine
188      . (
189         (allow-span-bar . #t)
190         (bar-extent . ,ly:bar-line::calc-bar-extent)
191         (bar-size .  ,ly:bar-line::calc-bar-size)
192         (break-align-anchor . ,ly:bar-line::calc-anchor)
193         (break-align-symbol . staff-bar)
194         (break-visibility . ,bar-line::calc-break-visibility)
195         (gap . 0.4)
196         (glyph . "|")
197         (glyph-name . ,bar-line::calc-glyph-name)
198
199         ;;
200         ;; Ross. page 151 lists other values, we opt for a leaner look
201         ;;
202         ;; TODO:
203         ;; kern should scale with line-thickness too.
204         (kern . 3.0)
205         (thin-kern . 3.0)
206         (hair-thickness . 1.9)
207         (thick-thickness . 6.0)
208
209         (layer . 0)
210         (non-musical . #t)
211         (space-alist . (
212                         (time-signature . (extra-space . 0.75))
213                         (custos . (minimum-space . 2.0))
214                         (clef . (minimum-space . 1.0))
215                         (key-signature . (extra-space . 1.0))
216                         (key-cancellation . (extra-space . 1.0))
217                         (first-note . (fixed-space . 1.3))
218                         (next-note . (semi-fixed-space . 0.9))
219                         (right-edge . (extra-space . 0.0))))
220         (stencil . ,ly:bar-line::print)
221         (meta . ((class . Item)
222                  (interfaces . (bar-line-interface
223                                 break-aligned-interface
224                                 font-interface))))))
225
226     (BarNumber
227      . (
228         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
229         ;; want the bar number before the clef at line start.
230         (break-align-symbols . (left-edge staff-bar))
231
232         (break-visibility . ,begin-of-line-visible)
233         (direction . ,UP)
234         (font-family . roman)
235         (font-size . -2)
236         (non-musical . #t)
237         (outside-staff-priority . 100)
238         (padding . 1.0)
239         (self-alignment-X . ,RIGHT)
240         (side-axis . ,Y)
241         (stencil . ,ly:text-interface::print)
242         (X-offset . ,(ly:make-simple-closure
243                       `(,+
244                         ,(ly:make-simple-closure
245                           (list ly:break-alignable-interface::self-align-callback))
246                         ,(ly:make-simple-closure
247                           (list ly:self-alignment-interface::x-aligned-on-self)))))
248         (Y-offset . ,ly:side-position-interface::y-aligned-side)
249         (meta .
250               ((class . Item)
251                (interfaces . (break-alignable-interface
252                               font-interface
253                               self-alignment-interface
254                               side-position-interface
255                               text-interface))))))
256
257     (BassFigure
258      . (
259         (stencil . ,ly:text-interface::print)
260         (meta . ((class . Item)
261                  (interfaces . (bass-figure-interface
262                                 font-interface
263                                 rhythmic-grob-interface
264                                 text-interface))))))
265
266     (BassFigureAlignment
267      . (
268         (axes . (,Y))
269         (padding . 0.2)
270         (positioning-done . ,ly:align-interface::align-to-minimum-distances)
271         (stacking-dir . ,DOWN)
272         (Y-extent . ,ly:axis-group-interface::height)
273         (meta . ((class . Spanner)
274                  (interfaces . (align-interface
275                                 axis-group-interface
276                                 bass-figure-alignment-interface))))))
277
278     (BassFigureAlignmentPositioning
279      . (
280         (axes . (,Y))
281         (direction . ,UP)
282         (padding . 0.5)
283         (side-axis . ,Y)
284         (staff-padding . 1.0)
285         (Y-extent . ,ly:axis-group-interface::height)
286         (Y-offset . ,ly:side-position-interface::y-aligned-side)
287         (meta . ((class . Spanner)
288                  (interfaces . (axis-group-interface
289                                 side-position-interface))))))
290
291     (BassFigureBracket
292      . (
293         (edge-height . (0.2 . 0.2))
294         (stencil . ,ly:enclosing-bracket::print)
295         (X-extent . ,ly:enclosing-bracket::width)
296         (meta . ((class . Item)
297                  (interfaces . (enclosing-bracket-interface))))))
298
299     (BassFigureContinuation
300      . (
301         (stencil . ,ly:figured-bass-continuation::print)
302         (Y-offset . ,ly:figured-bass-continuation::center-on-figures)
303         (meta . ((class . Spanner)
304                  (interfaces . (figured-bass-continuation-interface))))))
305
306     (BassFigureLine
307      . (
308         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
309         (axes . (,Y))
310         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
311         (Y-extent . ,ly:axis-group-interface::height)
312         (meta . ((class . Spanner)
313                  (interfaces . (axis-group-interface))))))
314
315
316     (Beam
317      . (
318         ;; todo: clean this up a bit: the list is getting
319         ;; rather long.
320
321         (auto-knee-gap . 5.5)
322         (beam-thickness . 0.48) ; in staff-space
323
324         ;; We have some unreferenced problems here.
325         ;;
326         ;; If we shorten beamed stems less than normal stems (1 staff-space),
327         ;; or high order less than 8th beams, patterns like
328         ;;     c''4 [c''8 c''] c''4 [c''16 c]
329         ;; are ugly (different stem lengths).
330         ;;
331         ;; But if we shorten 16th beams as much as 8th beams, a single
332         ;; forced 16th beam looks *very* short.
333
334         ;; We choose to shorten 8th beams the same as single stems,
335         ;; and high order beams less than 8th beams, so that all
336         ;; isolated shortened beams look nice and a bit shortened,
337         ;; sadly possibly breaking patterns with high order beams.
338         (beamed-stem-shorten . (1.0 0.5 0.25))
339
340         (beaming . ,ly:beam::calc-beaming)
341         (clip-edges . #t)
342         (concaveness . ,ly:beam::calc-concaveness)
343         (cross-staff . ,ly:beam::calc-cross-staff)
344         (damping . 1)
345         (details
346          .(
347            (secondary-beam-demerit . 10)
348            (stem-length-demerit-factor . 5)
349            (region-size . 2)
350            (beam-eps . 0.001)
351            (stem-length-limit-penalty . 5000)
352            (damping-direction-penalty . 800)
353            (hint-direction-penalty . 20)
354            (musical-direction-factor . 400)
355            (ideal-slope-factor . 10)
356            (round-to-zero-slope . 0.02)))
357         (direction . ,ly:beam::calc-direction)
358
359         ;; only for debugging.
360         (font-family . roman)
361
362         (gap . 0.8)
363         (neutral-direction . ,DOWN)
364         (positions .  ,(ly:make-simple-closure
365                         (ly:make-simple-closure
366                          (list chain-grob-member-functions
367                            `(,cons 0 0)
368                            ly:beam::calc-least-squares-positions
369                            ly:beam::slope-damping
370                            ly:beam::shift-region-to-valid
371                            ly:beam::quanting
372                            ))))
373
374         ;; this is a hack to set stem lengths, if positions is set.
375         (quantized-positions . ,ly:beam::set-stem-lengths)
376
377         (shorten . ,ly:beam::calc-stem-shorten)
378         (stencil . ,ly:beam::print)
379
380         (meta . ((class . Spanner)
381                  (object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems)))
382                  (interfaces . (beam-interface
383                                 font-interface
384                                 staff-symbol-referencer-interface
385                                 unbreakable-spanner-interface))))))
386
387     (BendAfter
388      . (
389         (minimum-length . 0.5)
390         (stencil . ,bend::print)
391         (thickness . 2.0)
392         (meta . ((class . Spanner)
393                  (interfaces . (bend-after-interface
394                                 spanner-interface))))))
395
396     (BreakAlignGroup
397      . (
398         (axes . (,X))
399         (break-align-anchor . ,ly:break-aligned-interface::calc-average-anchor)
400         (break-visibility . ,ly:break-aligned-interface::calc-break-visibility)
401         (X-extent . ,ly:axis-group-interface::width)
402         (meta . ((class . Item)
403                  (interfaces . (axis-group-interface
404                                 break-aligned-interface))))))
405
406     (BreakAlignment
407      . (
408         (axes . (,X))
409         (break-align-orders . ;; end of line
410                             #((
411                                left-edge
412                                ambitus
413                                breathing-sign
414                                clef
415                                staff-bar
416                                key-cancellation
417                                key-signature
418                                time-signature
419                                custos)
420
421                               ;; unbroken
422                               (
423                                left-edge
424                                ambitus
425                                breathing-sign
426                                clef
427                                staff-bar
428                                key-cancellation
429                                key-signature
430                                time-signature
431                                custos)
432
433                               ;; begin of line
434                               (
435                                left-edge
436                                ambitus
437                                breathing-sign
438                                clef
439                                key-cancellation
440                                key-signature
441                                staff-bar
442                                time-signature
443                                custos)))
444         (non-musical . #t)
445         (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
446         (stacking-dir . 1)
447         (X-extent . ,ly:axis-group-interface::width)
448         (meta . ((class . Item)
449                  (interfaces . (axis-group-interface
450                                 break-alignment-interface))))))
451
452     (BreathingSign
453      . (
454         (break-align-symbol . breathing-sign)
455         (break-visibility . ,begin-of-line-invisible)
456         (non-musical . #t)
457         (space-alist . (
458                         (ambitus . (extra-space . 2.0))
459                         (custos . (minimum-space . 1.0))
460                         (key-signature . (minimum-space . 1.5))
461                         (time-signature . (minimum-space . 1.5))
462                         (staff-bar . (minimum-space . 1.5))
463                         (clef . (minimum-space . 2.0))
464                         (first-note . (fixed-space . 1.0)) ;huh?
465                         (right-edge . (extra-space . 0.1))))
466         (stencil . ,ly:text-interface::print)
467         (text . ,(make-musicglyph-markup "scripts.rcomma"))
468         (Y-offset . ,ly:breathing-sign::offset-callback)
469         (meta . ((class . Item)
470                  (interfaces . (break-aligned-interface
471                                 breathing-sign-interface
472                                 font-interface
473                                 text-interface))))))
474
475     (ChordName
476      . (
477         (after-line-breaking . ,ly:chord-name::after-line-breaking)
478         (font-family . sans)
479         (font-size . 1.5)
480         (stencil . ,ly:text-interface::print)
481         (word-space . 0.0)
482         (meta . ((class . Item)
483                  (interfaces . (chord-name-interface
484                                 font-interface
485                                 rhythmic-grob-interface
486                                 text-interface))))))
487
488     (Clef
489      . (
490         (avoid-slur . inside)
491         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
492         (break-align-symbol . clef)
493         (break-visibility . ,begin-of-line-visible)
494         (glyph-name . ,ly:clef::calc-glyph-name)
495         (non-musical . #t)
496         (space-alist . ((ambitus . (extra-space . 2.0))
497                         (staff-bar . (extra-space . 0.7))
498                         (key-cancellation . (minimum-space . 3.5))
499                         (key-signature . (minimum-space . 3.5))
500                         (time-signature . (minimum-space . 4.2))
501                         (first-note . (minimum-fixed-space . 5.0))
502                         (next-note . (extra-space . 0.5))
503                         (right-edge . (extra-space . 0.5))))
504         (stencil . ,ly:clef::print)
505         (Y-offset . ,ly:staff-symbol-referencer::callback)
506         (meta . ((class . Item)
507                  (interfaces . (break-aligned-interface
508                                 clef-interface
509                                 font-interface
510                                 staff-symbol-referencer-interface))))))
511
512     (ClusterSpanner
513      . (
514         (cross-staff . ,ly:cluster::calc-cross-staff)
515         (minimum-length . 0.0)
516         (padding . 0.25)
517         (springs-and-rods . ,ly:spanner::set-spacing-rods)
518         (stencil . ,ly:cluster::print)
519         (style . ramp)
520         (meta . ((class . Spanner)
521                  (interfaces . (cluster-interface))))))
522
523     (ClusterSpannerBeacon
524      . (
525         (Y-extent . ,ly:cluster-beacon::height)
526         (meta . ((class . Item)
527                  (interfaces . (cluster-beacon-interface
528                                 rhythmic-grob-interface))))))
529
530     (CombineTextScript
531      . (
532         (avoid-slur . outside)
533         (baseline-skip . 2)
534         (direction . ,UP)
535         (extra-spacing-width . (+inf.0 . -inf.0))
536         (font-series . bold)
537         (padding . 0.5)
538         (script-priority . 200)
539         (side-axis . ,Y)
540         (staff-padding . 0.5)
541         ;; todo: add X self alignment?
542         (stencil . ,ly:text-interface::print)
543         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
544         (Y-offset . ,ly:side-position-interface::y-aligned-side)
545         (meta . ((class . Item)
546                  (interfaces . (font-interface
547                                 side-position-interface
548                                 text-interface
549                                 text-script-interface))))))
550
551     (Custos
552      . (
553         (break-align-symbol . custos)
554         (break-visibility . ,end-of-line-visible)
555         (neutral-direction . ,DOWN)
556         (non-musical . #t)
557         (space-alist . (
558                         (first-note . (minimum-fixed-space . 0.0))
559                         (right-edge . (extra-space . 0.1))))
560         (stencil . ,ly:custos::print)
561         (style . vaticana)
562         (Y-offset . ,ly:staff-symbol-referencer::callback)
563         (meta . ((class . Item)
564                  (interfaces  . (break-aligned-interface
565                                  custos-interface
566                                  font-interface
567                                  staff-symbol-referencer-interface))))))
568
569     (DotColumn
570      . (
571         (axes . (,X))
572         (direction . ,RIGHT)
573         (positioning-done . ,ly:dot-column::calc-positioning-done)
574         (X-extent . ,ly:axis-group-interface::width)
575         (meta . ((class . Item)
576                  (interfaces . (axis-group-interface
577                                 dot-column-interface))))))
578
579     (Dots
580      . (
581         (dot-count . ,dots::calc-dot-count)
582         (staff-position . ,dots::calc-staff-position)
583         (stencil . ,ly:dots::print)
584         (meta . ((class . Item)
585                  (interfaces . (dots-interface
586                                 font-interface
587                                 staff-symbol-referencer-interface))))))
588
589     (DoublePercentRepeat
590      . (
591         (break-align-symbol . staff-bar)
592         (break-visibility . ,begin-of-line-invisible)
593         (dot-negative-kern . 0.75)
594         (font-encoding . fetaMusic)
595         (non-musical . #t)
596         (slash-negative-kern . 1.6)
597         (slope . 1.0)
598         (stencil . ,ly:percent-repeat-item-interface::double-percent)
599         (thickness . 0.48)
600         (width . 2.0)
601         (meta . ((class . Item)
602                  (interfaces . (break-aligned-interface
603                                 font-interface
604                                 percent-repeat-interface
605                                 percent-repeat-item-interface))))))
606
607     (DoublePercentRepeatCounter
608      . (
609         (direction . ,UP)
610         (font-encoding . fetaNumber)
611         (font-size . -2)
612         (padding . 0.2)
613         (self-alignment-X . ,CENTER)
614         (side-axis . ,Y)
615         (staff-padding . 0.25)
616         (stencil . ,ly:text-interface::print)
617         (X-offset . ,(ly:make-simple-closure
618                       `(,+
619                         ,(ly:make-simple-closure
620                           (list ly:self-alignment-interface::centered-on-y-parent))
621                         ,(ly:make-simple-closure
622                           (list ly:self-alignment-interface::x-aligned-on-self)))))
623         (Y-offset . ,ly:side-position-interface::y-aligned-side)
624         (meta . ((class . Item)
625                  (interfaces . (font-interface
626                                 percent-repeat-interface
627                                 percent-repeat-item-interface
628                                 self-alignment-interface
629                                 side-position-interface
630                                 text-interface))))))
631
632     (DynamicLineSpanner
633      . (
634         (axes . (,Y))
635         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
636         (direction . ,DOWN)
637         (minimum-space . 1.2)
638         (outside-staff-priority . 250)
639         (padding . 0.6)
640         (side-axis . ,Y)
641         (slur-padding . 0.3)
642         (staff-padding . 0.1)
643         (X-extent . ,ly:axis-group-interface::width)
644         (Y-extent . ,ly:axis-group-interface::height)
645         (Y-offset . ,ly:side-position-interface::y-aligned-side)
646         (meta . ((class . Spanner)
647                  (interfaces . (axis-group-interface
648                                 dynamic-interface
649                                 dynamic-line-spanner-interface
650                                 side-position-interface))))))
651
652     (DynamicText
653      . (
654
655         ;; todo.
656
657         (direction . ,ly:script-interface::calc-direction)
658         (extra-spacing-width . (+inf.0 . -inf.0))
659         (font-encoding . fetaDynamic)
660         (font-series . bold)
661         (font-shape . italic)
662         (outside-staff-priority . 250)
663         (positioning-done . ,ly:script-interface::calc-positioning-done)
664         (self-alignment-X . ,CENTER)
665         (self-alignment-Y . ,CENTER)
666         (stencil . ,ly:text-interface::print)
667         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
668         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
669         (meta . ((class . Item)
670                  (interfaces . (dynamic-interface
671                                 font-interface
672                                 script-interface
673                                 self-alignment-interface
674                                 text-interface))))))
675
676     (DynamicTextSpanner
677      . (
678         (bound-details . ((right . ((attach-dir .  ,LEFT)
679                                     (Y . 0)
680                                     (padding . 0.75)
681                                     ))
682                           (right-broken . ((attach-dir .  ,RIGHT)
683                                     (padding . 0.0)
684                                     ))
685
686                           (left . ((attach-dir .  ,LEFT)
687                                    (Y . 0)
688                                    (stencil-offset . (0 . -0.5))
689                                    (padding . 0.5)
690                                    ))
691                           (left-broken . ((attach-dir .  ,RIGHT)
692                                    ))
693                           ))
694         (dash-fraction . 0.2)
695         (dash-period . 3.0)
696
697         ;; rather ugh with NCSB
698         ;; (font-series . bold)
699         (font-shape . italic)
700
701         ;; need to blend with dynamic texts.
702         (font-size . 1)
703
704         (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
705
706         ;; make sure the spanner doesn't get too close to notes
707         (minimum-Y-extent . (-1 . 1))
708
709         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
710         (stencil . ,ly:line-spanner::print)
711         (style . dashed-line)
712         (meta . ((class . Spanner)
713                  (interfaces . (dynamic-interface
714                                 dynamic-text-spanner-interface
715                                 font-interface
716                                 line-interface
717                                 line-spanner-interface
718                                 spanner-interface
719                                 text-interface))))))
720
721
722     (Fingering
723      . (
724
725         ;; sync with TextScript (?)
726
727         (avoid-slur . around)
728         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
729         (direction . ,ly:script-interface::calc-direction)
730         (font-encoding . fetaNumber)
731         (font-size . -5)                ; don't overlap when next to heads.
732         (padding . 0.5)
733         (positioning-done . ,ly:script-interface::calc-positioning-done)
734         (script-priority . 100)
735         (self-alignment-X . ,CENTER)
736         (self-alignment-Y . ,CENTER)
737         (slur-padding . 0.2)
738         (staff-padding . 0.5)
739         (stencil . ,ly:text-interface::print)
740         (text . ,fingering::calc-text)
741         (meta . ((class . Item)
742                  (interfaces . (finger-interface
743                                 font-interface
744                                 self-alignment-interface
745                                 side-position-interface
746                                 text-interface
747                                 text-script-interface))))))
748
749     (FretBoard
750      . (
751         (after-line-breaking . ,ly:chord-name::after-line-breaking)
752         (fret-diagram-details . ((finger-code . below-string)))
753         (stencil . ,fret-board::calc-stencil)
754         (meta . ((class . Item)
755                  (interfaces . (chord-name-interface
756                                 font-interface
757                                 fret-diagram-interface
758                                 rhythmic-grob-interface))))))
759
760
761     (Glissando
762      . (
763         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
764         (bound-details . ((right . ((attach-dir .  ,CENTER)
765                                     (padding . 1.5)
766                                       ))
767                           (left . ((attach-dir .  ,CENTER)
768                                    (padding . 1.5)
769                                       ))
770                           ))
771         (gap . 0.5)
772         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
773         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
774         (stencil . ,ly:line-spanner::print)
775         (style . line)
776         (X-extent . #f)
777         (Y-extent . #f)
778         (zigzag-width . 0.75)
779         (meta . ((class . Spanner)
780                  (interfaces . (line-interface
781                                 line-spanner-interface
782                                 unbreakable-spanner-interface))))))
783
784     (GraceSpacing
785      . (
786         (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
787         (shortest-duration-space . 1.6)
788         (spacing-increment . 0.8)
789         (meta . ((class . Spanner)
790                  (interfaces . (grace-spacing-interface
791                                 spacing-options-interface
792                                 spanner-interface))))))
793
794     (GridLine
795      . (
796         (layer . 0)
797         (self-alignment-X . ,CENTER)
798         (stencil . ,ly:grid-line-interface::print)
799         (X-extent  . ,ly:grid-line-interface::width)
800         (X-offset . ,(ly:make-simple-closure
801                       `(,+
802                         ,(ly:make-simple-closure
803                           (list ly:self-alignment-interface::centered-on-x-parent))
804                         ,(ly:make-simple-closure
805                           (list ly:self-alignment-interface::x-aligned-on-self)))))
806         (meta . ((class . Item)
807                  (interfaces . (grid-line-interface
808                                 self-alignment-interface))))))
809
810     (GridPoint
811      . (
812         (X-extent . (0 . 0))
813         (Y-extent . (0 . 0))
814         (meta . ((class . Item)
815                  (interfaces . (grid-point-interface))))))
816
817
818     (Hairpin
819      . (
820         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
821         (bound-padding . 1.0)
822         (circled-tip . #f)
823         (grow-direction . ,hairpin::calc-grow-direction)
824         (height . 0.6666)
825         (minimum-length . 2.0)
826         (self-alignment-Y . ,CENTER)
827         (springs-and-rods . ,ly:spanner::set-spacing-rods)
828         (stencil . ,ly:hairpin::print)
829         (thickness . 1.0)
830         (to-barline . #t)
831         (Y-extent . ,ly:hairpin::height)
832         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
833         (meta . ((class . Spanner)
834                  (interfaces . (dynamic-interface
835                                 hairpin-interface
836                                 line-interface
837                                 self-alignment-interface
838                                 spanner-interface))))))
839
840     (HarmonicParenthesesItem
841      . (
842         (padding . 0)
843         (stencil . ,parentheses-item::print)
844         (stencils . ,parentheses-item::calc-angled-bracket-stencils)
845         (meta . ((class . Item)
846                  (interfaces . (font-interface
847                                 parentheses-interface))))))
848
849     (HorizontalBracket
850      . (
851         (bracket-flare . (0.5 . 0.5))
852         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
853         (direction . ,DOWN)
854         (padding . 0.2)
855         (side-axis . ,Y)
856         (staff-padding . 0.2)
857         (stencil . ,ly:horizontal-bracket::print)
858         (thickness . 1.0)
859         (Y-offset . ,ly:side-position-interface::y-aligned-side)
860         (meta . ((class . Spanner)
861                  (interfaces . (horizontal-bracket-interface
862                                 line-interface
863                                 side-position-interface
864                                 spanner-interface))))))
865
866
867     (InstrumentName
868      . (
869         (direction . ,LEFT)
870         (padding . 0.3)
871         (self-alignment-X . ,CENTER)
872         (self-alignment-Y . ,CENTER)
873         (stencil . ,system-start-text::print)
874         (X-offset . ,system-start-text::calc-x-offset)
875         (Y-offset . ,system-start-text::calc-y-offset)
876         (meta . ((class . Spanner)
877                  (interfaces . (font-interface
878                                 self-alignment-interface
879                                 side-position-interface
880                                 system-start-text-interface))))))
881
882     (InstrumentSwitch
883      . (
884         (direction . ,UP)
885         (extra-spacing-width . (+inf.0 . -inf.0))
886         (outside-staff-priority . 500)
887         (padding . 0.5)
888         (self-alignment-X . ,LEFT)
889         (side-axis . ,Y)
890         (staff-padding . 0.5)
891         (stencil . ,ly:text-interface::print)
892         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
893         (Y-offset . ,ly:side-position-interface::y-aligned-side)
894         (meta . ((class . Item)
895                  (interfaces . (font-interface
896                                 self-alignment-interface
897                                 side-position-interface
898                                 text-interface))))))
899
900
901     (KeyCancellation
902      . (
903         (break-align-symbol . key-cancellation)
904         (break-visibility . ,begin-of-line-invisible)
905         (glyph-name-alist . ,cancellation-glyph-name-alist)
906         (non-musical . #t)
907         (space-alist . (
908                         (time-signature . (extra-space . 1.25))
909                         (staff-bar . (extra-space . 0.6))
910                         (key-signature . (extra-space . 0.5))
911                         (right-edge . (extra-space . 0.5))
912                         (first-note . (fixed-space . 2.5))))
913         (stencil . ,ly:key-signature-interface::print)
914         (Y-offset . ,ly:staff-symbol-referencer::callback)
915         (meta . ((class . Item)
916                  (interfaces . (break-aligned-interface
917                                 font-interface
918                                 key-cancellation-interface
919                                 key-signature-interface
920                                 staff-symbol-referencer-interface))))))
921
922     (KeySignature
923      . (
924         (avoid-slur . inside)
925         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
926         (break-align-symbol . key-signature)
927         (break-visibility . ,begin-of-line-visible)
928         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
929         (non-musical . #t)
930         (space-alist . (
931                         (time-signature . (extra-space . 1.15))
932                         (staff-bar . (extra-space . 1.1))
933                         (right-edge . (extra-space . 0.5))
934                         (first-note . (fixed-space . 2.5))))
935         (stencil . ,ly:key-signature-interface::print)
936         (Y-offset . ,ly:staff-symbol-referencer::callback)
937         (meta . ((class . Item)
938                  (interfaces . (break-aligned-interface
939                                 font-interface
940                                 key-signature-interface
941                                 staff-symbol-referencer-interface))))))
942
943
944    (LaissezVibrerTie
945      . (
946         (control-points . ,ly:semi-tie::calc-control-points)
947         (details . ((ratio . 0.333)
948                     (height-limit . 1.0)))
949         (direction . ,ly:tie::calc-direction)
950         (head-direction . ,LEFT)
951         (stencil  . ,ly:tie::print)
952         (thickness . 1.0)
953         (meta . ((class . Item)
954                  (interfaces . (semi-tie-interface))))))
955
956     (LaissezVibrerTieColumn
957      . (
958         (head-direction . ,LEFT)
959         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
960         (X-extent . #f)
961         (Y-extent . #f)
962         (meta . ((class . Item)
963                  (interfaces . (semi-tie-column-interface))))))
964
965     (LedgerLineSpanner
966      . (
967         (layer . 0)
968         (length-fraction . 0.25)
969         (minimum-length-fraction . 0.25)
970         (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
971         (stencil . ,ly:ledger-line-spanner::print)
972         (X-extent . #f)
973         (Y-extent . #f)
974         (meta . ((class . Spanner)
975                  (interfaces . (ledger-line-spanner-interface))))))
976
977     (LeftEdge
978      . (
979         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
980         (break-align-symbol . left-edge)
981         (break-visibility . ,center-invisible)
982         (non-musical . #t)
983         (space-alist . (
984                         (custos . (extra-space . 0.0))
985                         (ambitus . (extra-space . 2.0))
986                         (time-signature . (extra-space . 1.0))
987                         (staff-bar . (extra-space . 0.0))
988                         (breathing-sign . (minimum-space . 0.0))
989                         (clef . (extra-space . 0.8))
990                         (first-note . (fixed-space . 2.0))
991                         (right-edge . (extra-space . 0.0))
992                         (key-signature . (extra-space . 0.8))
993                         (key-cancellation . (extra-space . 0.0))
994                         ))
995         (X-extent . (0 . 0))
996         (meta . ((class . Item)
997                  (interfaces . (break-aligned-interface))))))
998
999     (LigatureBracket
1000      . (
1001         ;; ugh.  A ligature bracket is totally different from
1002         ;; a tuplet bracket.
1003
1004         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1005         (control-points . ,ly:tuplet-bracket::calc-control-points)
1006         (direction . ,UP)
1007         (edge-height . (0.7 . 0.7))
1008         (padding . 2.0)
1009         (positions . ,ly:tuplet-bracket::calc-positions)
1010         (shorten-pair . (-0.2 . -0.2))
1011         (staff-padding . 0.25)
1012         (stencil . ,ly:tuplet-bracket::print)
1013         (thickness . 1.6)
1014         (meta . ((class . Spanner)
1015                  (interfaces . (line-interface
1016                                 tuplet-bracket-interface))))))
1017
1018     (LyricExtender
1019      . (
1020         (minimum-length . 1.5)
1021         (stencil . ,ly:lyric-extender::print)
1022         (thickness . 0.8) ; line-thickness
1023         (Y-extent . (0 . 0))
1024         (meta . ((class . Spanner)
1025                  (interfaces . (lyric-extender-interface
1026                                 lyric-interface))))))
1027
1028     (LyricHyphen
1029      . (
1030         (dash-period . 10.0)
1031         (height . 0.42)
1032         (length . 0.66)
1033         (minimum-distance . 0.1)
1034         (minimum-length . 0.3)
1035         (padding . 0.07)
1036         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1037         (stencil . ,ly:lyric-hyphen::print)
1038         (thickness . 1.3)
1039         (Y-extent . (0 . 0))
1040         (meta . ((class . Spanner)
1041                  (interfaces . (font-interface
1042                                 lyric-hyphen-interface
1043                                 lyric-interface
1044                                 spanner-interface))))))
1045
1046     (LyricSpace
1047      . (
1048         (minimum-distance . 0.45)
1049         (padding . 0.0)
1050         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1051         (X-extent . #f)
1052         (Y-extent . #f)
1053         (meta . ((class . Spanner)
1054                  (interfaces . (lyric-hyphen-interface
1055                                 spanner-interface))))))
1056
1057     (LyricText
1058      . (
1059         (extra-spacing-width . (0.0 . 0.0))
1060         (font-series . bold-narrow)
1061         (font-size . 1.0)
1062         (self-alignment-X . ,CENTER)
1063         (stencil . ,lyric-text::print)
1064         (text . ,(grob::calc-property-by-copy 'text))
1065         (word-space . 0.6)
1066         (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1067         (meta . ((class . Item)
1068                  (interfaces . (font-interface
1069                                 lyric-syllable-interface
1070                                 rhythmic-grob-interface
1071                                 self-alignment-interface
1072                                 text-interface))))))
1073
1074
1075     (MeasureGrouping
1076      . (
1077         (direction . ,UP)
1078         (height . 2.0)
1079         (padding . 2)
1080         (side-axis . ,Y)
1081         (staff-padding . 3)
1082         (stencil . ,ly:measure-grouping::print)
1083         (thickness . 1)
1084         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1085         (meta . ((class . Spanner)
1086                  (interfaces . (measure-grouping-interface
1087                                 side-position-interface))))))
1088
1089     (MelodyItem
1090      . (
1091         (neutral-direction . ,DOWN)
1092         (meta . ((class . Item)
1093                  (interfaces . (melody-spanner-interface))))))
1094
1095     (MensuralLigature
1096      . (
1097         (flexa-width . 2.0)
1098         (stencil . ,ly:mensural-ligature::print)
1099         (thickness . 1.4)
1100         (meta . ((class . Spanner)
1101                  (interfaces . (font-interface
1102                                 mensural-ligature-interface))))))
1103
1104     (MetronomeMark
1105      . (
1106         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1107         (direction . ,UP)
1108         (extra-spacing-width . (+inf.0 . -inf.0))
1109         (outside-staff-priority . 1000)
1110         (padding . 0.8)
1111         (side-axis . ,Y)
1112         (stencil . ,ly:text-interface::print)
1113         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1114         (meta . ((class . Item)
1115                  (interfaces . (font-interface
1116                                 metronome-mark-interface
1117                                 side-position-interface
1118                                 text-interface))))))
1119
1120     (MultiMeasureRest
1121      . (
1122         (expand-limit . 10)
1123         (hair-thickness . 2.0)
1124         (padding . 1)
1125         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1126         (staff-position . 0)
1127         (stencil . ,ly:multi-measure-rest::print)
1128         (thick-thickness . 6.6)
1129         (Y-offset . ,ly:staff-symbol-referencer::callback)
1130         (meta . ((class . Spanner)
1131                  (interfaces . (font-interface
1132                                 multi-measure-interface
1133                                 multi-measure-rest-interface
1134                                 rest-interface
1135                                 staff-symbol-referencer-interface))))))
1136
1137     (MultiMeasureRestNumber
1138      . (
1139         (bound-padding  . 2.0)
1140         (direction . ,UP)
1141         (font-encoding . fetaNumber)
1142         (padding . 0.4)
1143         (self-alignment-X . ,CENTER)
1144         (side-axis . ,Y)
1145         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1146         (staff-padding . 0.4)
1147         (stencil . ,ly:text-interface::print)
1148         (X-offset . ,(ly:make-simple-closure
1149                       `(,+
1150                         ,(ly:make-simple-closure
1151                           (list ly:self-alignment-interface::x-aligned-on-self))
1152                         ,(ly:make-simple-closure
1153                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1154         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1155         (meta . ((class . Spanner)
1156                  (interfaces . (font-interface
1157                                 multi-measure-interface
1158                                 self-alignment-interface
1159                                 side-position-interface
1160                                 text-interface))))))
1161
1162     (MultiMeasureRestText
1163      . (
1164         (direction . ,UP)
1165         (outside-staff-priority . 450)
1166         (padding . 0.2)
1167         (self-alignment-X . ,CENTER)
1168         (staff-padding . 0.25)
1169         (stencil . ,ly:text-interface::print)
1170         (X-offset . ,(ly:make-simple-closure
1171                       `(,+
1172                         ,(ly:make-simple-closure
1173                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1174                         ,(ly:make-simple-closure
1175                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1176         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1177         (meta . ((class . Spanner)
1178                  (interfaces . (font-interface
1179                                 multi-measure-interface
1180                                 self-alignment-interface
1181                                 side-position-interface
1182                                 text-interface))))))
1183
1184
1185     (NonMusicalPaperColumn
1186      . (
1187         (allow-loose-spacing . #t)
1188         (axes . (,X))
1189         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1190         (full-measure-extra-space . 1.0)
1191         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1192         ;;                    (stencil . ,ly:paper-column::print)
1193
1194         (line-break-permission . allow)
1195         (non-musical . #t)
1196         (page-break-permission . allow)
1197
1198         ;; debugging stuff: print column number.
1199         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1200
1201         (X-extent . ,ly:axis-group-interface::width)
1202         (meta . ((class . Paper_column)
1203                  (interfaces . (axis-group-interface
1204                                 font-interface
1205                                 paper-column-interface
1206                                 separation-item-interface
1207                                 spaceable-grob-interface))))))
1208
1209     (NoteCollision
1210      . (
1211         (axes . (,X ,Y))
1212         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1213         (prefer-dotted-right . #t)
1214         (X-extent . ,ly:axis-group-interface::width)
1215         (Y-extent . ,ly:axis-group-interface::height)
1216         (meta . ((class . Item)
1217                  (interfaces . (axis-group-interface
1218                                 note-collision-interface))))))
1219
1220     (NoteColumn
1221      . (
1222         (axes . (,X ,Y))
1223         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1224         (X-extent . ,ly:axis-group-interface::width)
1225         (Y-extent . ,ly:axis-group-interface::height)
1226         (meta . ((class . Item)
1227                  (interfaces . (axis-group-interface
1228                                 note-column-interface
1229                                 separation-item-interface))))))
1230
1231     (NoteHead
1232      . (
1233         (duration-log . ,note-head::calc-duration-log)
1234         (glyph-name . ,note-head::calc-glyph-name)
1235         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1236         (stencil . ,ly:note-head::print)
1237         (X-offset . ,ly:note-head::stem-x-shift)
1238         (Y-offset . ,ly:staff-symbol-referencer::callback)
1239         (meta . ((class . Item)
1240                  (interfaces . (font-interface
1241                                 gregorian-ligature-interface
1242                                 ledgered-interface
1243                                 mensural-ligature-interface
1244                                 note-head-interface
1245                                 rhythmic-grob-interface
1246                                 rhythmic-head-interface
1247                                 staff-symbol-referencer-interface
1248                                 vaticana-ligature-interface))))))
1249
1250     (NoteName
1251      . (
1252         (stencil . ,ly:text-interface::print)
1253         (meta . ((class . Item)
1254                  (interfaces . (font-interface
1255                                 note-name-interface
1256                                 text-interface))))))
1257
1258     (NoteSpacing
1259      . (
1260         ;; Changed this from 0.75.
1261         ;; If you ever change this back, please document! --hwn
1262         (knee-spacing-correction . 1.0)
1263         (same-direction-correction . 0.25)
1264         (space-to-barline . #t)
1265         (stem-spacing-correction . 0.5)
1266         (meta . ((class . Item)
1267                  (interfaces . (note-spacing-interface
1268                                 spacing-interface))))))
1269
1270
1271     (OctavateEight
1272      . (
1273         (break-visibility . ,begin-of-line-visible)
1274         (font-shape . italic)
1275         (font-size . -4)
1276         (self-alignment-X . ,CENTER)
1277         (staff-padding . 0.2)
1278         (stencil . ,ly:text-interface::print)
1279         (X-offset . ,(ly:make-simple-closure
1280                       `(,+
1281                         ,(ly:make-simple-closure
1282                           (list ly:self-alignment-interface::x-aligned-on-self))
1283                         ,(ly:make-simple-closure
1284                           (list ly:self-alignment-interface::centered-on-x-parent)))))
1285         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1286         (meta . ((class . Item)
1287                  (interfaces . (font-interface
1288                                 self-alignment-interface
1289                                 side-position-interface
1290                                 text-interface))))))
1291
1292     (OttavaBracket
1293      . (
1294         (dash-fraction . 0.3)
1295         (direction . ,UP)
1296         (edge-height . (0 . 1.2))
1297         (font-shape . italic)
1298         (minimum-length . 1.0)
1299         (outside-staff-priority . 400)
1300         (padding . 0.5)
1301         (shorten-pair . (0.0 . -0.6))
1302         (staff-padding . 1.0)
1303         (stencil . ,ly:ottava-bracket::print)
1304         (style . dashed-line)
1305         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1306         (meta . ((class . Spanner)
1307                  (interfaces . (font-interface
1308                                 horizontal-bracket-interface
1309                                 line-interface
1310                                 ottava-bracket-interface
1311                                 side-position-interface
1312                                 text-interface))))))
1313
1314
1315     (PaperColumn
1316      . (
1317         (allow-loose-spacing . #t)
1318         (axes . (,X))
1319         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1320         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1321         ;; (stencil . ,ly:paper-column::print)
1322         (X-extent . ,ly:axis-group-interface::width)
1323
1324         ;; debugging
1325         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1326         (meta . ((class . Paper_column)
1327                  (interfaces . (axis-group-interface
1328                                 font-interface
1329                                 paper-column-interface
1330                                 separation-item-interface
1331                                 spaceable-grob-interface))))))
1332
1333     (ParenthesesItem
1334      . (
1335         (font-size . -6)
1336         (padding . 0.2)
1337         (stencil . ,parentheses-item::print)
1338         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1339         (meta . ((class . Item)
1340                  (interfaces . (font-interface
1341                                 parentheses-interface))))))
1342
1343     (PercentRepeat
1344      . (
1345         (dot-negative-kern . 0.75)
1346         (font-encoding . fetaMusic)
1347         (slope . 1.0)
1348         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1349         (stencil . ,ly:multi-measure-rest::percent)
1350         (thickness . 0.48)
1351         (meta . ((class . Spanner)
1352                  (interfaces . (font-interface
1353                                 multi-measure-rest-interface
1354                                 percent-repeat-interface))))))
1355
1356     (PercentRepeatCounter
1357      . (
1358         (direction . ,UP)
1359         (font-encoding . fetaNumber)
1360         (font-size . -2)
1361         (padding . 0.2)
1362         (self-alignment-X . ,CENTER)
1363         (staff-padding . 0.25)
1364         (stencil . ,ly:text-interface::print)
1365         (X-offset . ,(ly:make-simple-closure
1366                       `(,+
1367                         ,(ly:make-simple-closure
1368                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1369                         ,(ly:make-simple-closure
1370                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1371         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1372         (meta . ((class . Spanner)
1373                  (interfaces . (font-interface
1374                                 percent-repeat-interface
1375                                 self-alignment-interface
1376                                 side-position-interface
1377                                 text-interface))))))
1378
1379     (PhrasingSlur
1380      . (
1381         (control-points . ,ly:slur::calc-control-points)
1382         (cross-staff . ,ly:slur::calc-cross-staff)
1383         (details . ,default-slur-details)
1384         (direction . ,ly:slur::calc-direction)
1385         (height-limit . 2.0)
1386         (minimum-length . 1.5)
1387         (ratio . 0.333)
1388         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1389         (stencil . ,ly:slur::print)
1390         (thickness . 1.1)
1391         (Y-extent . ,ly:slur::height)
1392         (meta . ((class . Spanner)
1393                  (interfaces . (slur-interface))))))
1394
1395     ;; an example of a text spanner
1396     (PianoPedalBracket
1397      . (
1398         (bound-padding . 1.0)
1399         (bracket-flare . (0.5 . 0.5))
1400         (direction . ,DOWN)
1401         (edge-height . (1.0 . 1.0))
1402         (shorten-pair . (0.0 . 0.0))
1403         (stencil . ,ly:piano-pedal-bracket::print)
1404         (style . line)
1405         (thickness .  1.0)
1406         (meta . ((class . Spanner)
1407                  (interfaces . (line-interface
1408                                 piano-pedal-bracket-interface
1409                                 piano-pedal-interface))))))
1410
1411
1412     (RehearsalMark
1413      . (
1414         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1415         (baseline-skip . 2)
1416         (break-align-symbols . (staff-bar clef))
1417         (break-visibility . ,end-of-line-invisible)
1418         (direction . ,UP)
1419         (extra-spacing-width . (+inf.0 . -inf.0))
1420         (font-size . 2)
1421         (non-musical . #t)
1422         (outside-staff-priority . 1500)
1423         (padding . 0.8)
1424         (self-alignment-X . ,CENTER)
1425         (stencil . ,ly:text-interface::print)
1426         (X-offset . ,(ly:make-simple-closure
1427                       `(,+
1428                         ,(ly:make-simple-closure
1429                           (list ly:break-alignable-interface::self-align-callback))
1430                         ,(ly:make-simple-closure
1431                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1432         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1433         (meta . ((class . Item)
1434                  (interfaces . (break-alignable-interface
1435                                 font-interface
1436                                 mark-interface
1437                                 self-alignment-interface
1438                                 side-position-interface
1439                                 text-interface))))))
1440
1441     (RepeatSlash
1442      . (
1443         (slope . 1.7)
1444         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1445         (thickness . 0.48)
1446         (meta . ((class . Item)
1447                  (interfaces . (percent-repeat-interface
1448                                 percent-repeat-item-interface
1449                                 rhythmic-grob-interface))))))
1450
1451     (RepeatTie
1452      . (
1453         (control-points . ,ly:semi-tie::calc-control-points)
1454         (details . ((ratio . 0.333)
1455                     (height-limit . 1.0)))
1456         (direction . ,ly:tie::calc-direction)
1457         (head-direction . ,RIGHT)
1458         (stencil  . ,ly:tie::print)
1459         (thickness . 1.0)
1460         (meta . ((class . Item)
1461                  (interfaces . (semi-tie-interface))))))
1462
1463     (RepeatTieColumn
1464      . (
1465         (direction . ,ly:tie::calc-direction)
1466         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1467         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1468         (X-extent . #f)
1469         (Y-extent . #f)
1470         (meta . ((class . Item)
1471                  (interfaces . (semi-tie-column-interface))))))
1472
1473     (Rest
1474      . (
1475         (cross-staff . ,ly:rest::calc-cross-staff)
1476         (duration-log . ,stem::calc-duration-log)
1477         (minimum-distance . 0.25)
1478         (stencil . ,ly:rest::print)
1479         (X-extent . ,ly:rest::width)
1480         (Y-extent . ,ly:rest::height)
1481         (Y-offset . ,ly:rest::y-offset-callback)
1482         (meta . ((class . Item)
1483                  (interfaces . (font-interface
1484                                 rest-interface
1485                                 rhythmic-grob-interface
1486                                 rhythmic-head-interface
1487                                 staff-symbol-referencer-interface))))))
1488
1489     (RestCollision
1490      . (
1491         (minimum-distance . 0.75)
1492         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1493         (meta . ((class . Item)
1494                  (interfaces . (rest-collision-interface))))))
1495
1496
1497     (Script
1498      . (
1499         (cross-staff . ,ly:script-interface::calc-cross-staff)
1500         (direction . ,ly:script-interface::calc-direction)
1501         (font-encoding . fetaMusic)
1502         (positioning-done . ,ly:script-interface::calc-positioning-done)
1503         (side-axis . ,Y)
1504
1505         ;; padding set in script definitions.
1506         (staff-padding . 0.25)
1507
1508         (stencil . ,ly:script-interface::print)
1509         (X-offset . ,script-interface::calc-x-offset)
1510         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1511         (meta . ((class . Item)
1512                  (interfaces . (font-interface
1513                                 script-interface
1514                                 side-position-interface))))))
1515
1516     (ScriptColumn
1517      . (
1518         (before-line-breaking . ,ly:script-column::before-line-breaking)
1519         (meta . ((class . Item)
1520                  (interfaces . (script-column-interface))))))
1521
1522     (ScriptRow
1523      . (
1524         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1525         (meta . ((class . Item)
1526                  (interfaces . (script-column-interface))))))
1527
1528     (SeparationItem
1529      . (
1530         (avoid-slur . inside)
1531         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1532         (stencil . ,ly:separation-item::print)
1533         (X-extent . ,ly:axis-group-interface::width)
1534         (Y-extent . ,ly:axis-group-interface::height)
1535         (meta . ((class . Item)
1536                  (interfaces . (separation-item-interface))))))
1537
1538     (Slur
1539      . (
1540         (avoid-slur . inside)
1541         (control-points . ,ly:slur::calc-control-points)
1542         (cross-staff . ,ly:slur::calc-cross-staff)
1543         (details . ,default-slur-details)
1544         (direction . ,ly:slur::calc-direction)
1545         (height-limit . 2.0)
1546         (line-thickness . 0.8)
1547         (minimum-length . 1.5)
1548         (ratio . 0.25)
1549         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1550         (stencil . ,ly:slur::print)
1551         (thickness . 1.2)
1552         (Y-extent . ,ly:slur::height)
1553         (meta . ((class . Spanner)
1554                  (interfaces . (slur-interface))))))
1555
1556     (SostenutoPedal
1557      . (
1558         (direction . ,RIGHT)
1559         (extra-spacing-width . (+inf.0 . -inf.0))
1560         (font-shape . italic)
1561         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1562         (self-alignment-X . ,CENTER)
1563         (stencil . ,ly:text-interface::print)
1564         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1565         (meta . ((class . Item)
1566                  (interfaces . (font-interface
1567                                 piano-pedal-script-interface
1568                                 self-alignment-interface
1569                                 text-interface))))))
1570
1571     (SostenutoPedalLineSpanner
1572      . (
1573         (axes . (,Y))
1574         (direction . ,DOWN)
1575         (minimum-space . 1.0)
1576         (outside-staff-priority . 1000)
1577         (padding . 1.2)
1578         (side-axis . ,Y)
1579         (staff-padding . 1.0)
1580         (X-extent . ,ly:axis-group-interface::width)
1581         (Y-extent . ,ly:axis-group-interface::height)
1582         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1583         (meta . ((class . Spanner)
1584                  (interfaces . (axis-group-interface
1585                                 piano-pedal-interface
1586                                 side-position-interface))))))
1587
1588     (SpacingSpanner
1589      . (
1590         (average-spacing-wishes . #t)
1591         (base-shortest-duration . ,(ly:make-moment 3 16))
1592         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1593         (shortest-duration-space . 2.0)
1594         (spacing-increment . 1.2)
1595         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1596         (meta . ((class . Spanner)
1597                  (interfaces . (spacing-options-interface
1598                                 spacing-spanner-interface))))))
1599
1600     (SpanBar
1601      . (
1602         (allow-span-bar . #t)
1603         (bar-extent . ,ly:axis-group-interface::height)
1604         (bar-size . ,ly:span-bar::calc-bar-size)
1605         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1606         (break-align-symbol . staff-bar)
1607         (cross-staff . #t)
1608         (glyph-name . ,ly:span-bar::calc-glyph-name)
1609
1610         ;; ugh duplication! (these 4 properties were copied from Barline)
1611         ;;
1612         ;; Ross. page 151 lists other values, we opt for a leaner look
1613         ;;
1614         (kern . 3.0)
1615         (thin-kern . 3.0)
1616         (hair-thickness . 1.6)
1617         (thick-thickness . 6.0)
1618
1619         (layer . 0)
1620         (non-musical . #t)
1621         (stencil . ,ly:span-bar::print)
1622         (X-extent . ,ly:span-bar::width)
1623         (Y-extent . ,ly:axis-group-interface::height)
1624         (meta . ((class . Item)
1625                  (interfaces . (bar-line-interface
1626                                 font-interface
1627                                 span-bar-interface))))))
1628
1629     (StaffGrouper
1630      . (
1631         (between-staff-spacing . ((space . 9)
1632                                   (minimum-distance . 7)
1633                                   (padding . 1)))
1634         (after-last-staff-spacing . ((space . 10.5)
1635                                      (minimum-distance . 8)
1636                                      (padding . 1)))
1637         (meta . ((class . Spanner)
1638                  (interfaces . (staff-grouper-interface))))))
1639
1640     (StaffSpacing
1641      . (
1642         (non-musical . #t)
1643         (stem-spacing-correction . 0.4)
1644         (meta . ((class . Item)
1645                  (interfaces . (spacing-interface
1646                                 staff-spacing-interface))))))
1647
1648     (StaffSymbol
1649      . (
1650         (layer . 0)
1651         (ledger-line-thickness . (1.0 . 0.1))
1652         (line-count . 5)
1653         (stencil . ,ly:staff-symbol::print)
1654         (Y-extent . ,ly:staff-symbol::height)
1655         (meta . ((class . Spanner)
1656                  (interfaces . (staff-symbol-interface))))))
1657
1658     (StanzaNumber
1659      . (
1660         (direction . ,LEFT)
1661         (font-series . bold)
1662         (padding . 1.0)
1663         (side-axis . ,X)
1664         (stencil . ,ly:text-interface::print)
1665         (X-offset . ,ly:side-position-interface::x-aligned-side)
1666         (meta . ((class . Item)
1667                  (interfaces . (font-interface
1668                                 side-position-interface
1669                                 stanza-number-interface
1670                                 text-interface))))))
1671
1672     (Stem
1673      . (
1674         (beamlet-default-length . (1.1 . 1.1))
1675         (beamlet-max-length-proportion . (0.75 . 0.75))
1676         (cross-staff . ,ly:stem::calc-cross-staff)
1677         (default-direction . ,ly:stem::calc-default-direction)
1678         (details
1679          . (
1680             ;; 3.5 (or 3 measured from note head) is standard length
1681             ;; 32nd, 64th, 128th flagged stems should be longer
1682             (lengths . (3.5 3.5 3.5 4.5 5.0 6.0))
1683
1684             ;; FIXME.  3.5 yields too long beams (according to Ross and
1685             ;; looking at Baerenreiter examples) for a number of common
1686             ;; boundary cases.  Subtracting half a beam thickness fixes
1687             ;; this, but the bug may well be somewhere else.
1688
1689             ;; FIXME this should come from 'lengths
1690             (beamed-lengths . (3.26 3.5 3.6))
1691
1692             ;; The 'normal' minima
1693             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1694                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1695
1696             ;; The 'extreme case' minima
1697             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1698
1699             ;; Stems in unnatural (forced) direction should be shortened by
1700             ;; one staff space, according to [Roush & Gourlay].
1701             ;; Flagged stems we shorten only half a staff space.
1702             (stem-shorten . (1.0 0.5))
1703
1704             ))
1705
1706         ;; We use the normal minima as minimum for the ideal lengths,
1707         ;; and the extreme minima as abolute minimum length.
1708
1709         (direction . ,ly:stem::calc-direction)
1710         (duration-log . ,stem::calc-duration-log)
1711         (flag . ,ly:stem::calc-flag)
1712         (length . ,ly:stem::calc-length)
1713         (neutral-direction . ,DOWN)
1714         (positioning-done . ,ly:stem::calc-positioning-done)
1715         (stem-end-position . ,ly:stem::calc-stem-end-position)
1716         (stem-info . ,ly:stem::calc-stem-info)
1717         (stencil . ,ly:stem::print)
1718         (thickness . 1.3)
1719         (X-extent . ,ly:stem::width)
1720         (X-offset . ,ly:stem::offset-callback)
1721         (Y-extent . ,ly:stem::height)
1722         (Y-offset . ,ly:staff-symbol-referencer::callback)
1723         (meta . ((class . Item)
1724                  (interfaces . (font-interface
1725                                 stem-interface))))))
1726
1727     (StemTremolo
1728      . (
1729         (beam-thickness . 0.48) ; staff-space
1730         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1731         (slope . ,ly:stem-tremolo::calc-slope)
1732         (stencil . ,ly:stem-tremolo::print)
1733         (style . ,ly:stem-tremolo::calc-style)
1734         (X-extent . ,ly:stem-tremolo::width)
1735         (Y-extent . ,ly:stem-tremolo::height)
1736         (meta . ((class . Item)
1737                  (interfaces . (stem-tremolo-interface))))))
1738
1739     (StringNumber
1740      . (
1741         (avoid-slur . around)
1742         (font-encoding . fetaNumber)
1743         (font-size . -5)                ; don't overlap when next to heads.
1744         (padding . 0.5)
1745         (script-priority . 100)
1746         (self-alignment-X . ,CENTER)
1747         (self-alignment-Y . ,CENTER)
1748         (staff-padding . 0.5)
1749         (stencil . ,print-circled-text-callback)
1750         (text . ,string-number::calc-text)
1751         (meta . ((class . Item)
1752                  (interfaces . (font-interface
1753                                 self-alignment-interface
1754                                 side-position-interface
1755                                 string-number-interface
1756                                 text-interface
1757                                 text-script-interface))))))
1758
1759     (StrokeFinger
1760      . (
1761         (digit-names . #("p" "i" "m" "a" "x"))
1762         (font-shape . italic)
1763         (font-size . -4)                ; don't overlap when next to heads.
1764         (padding . 0.5)
1765         (script-priority . 100)
1766         (self-alignment-X . ,CENTER)
1767         (self-alignment-Y . ,CENTER)
1768         (staff-padding . 0.5)
1769         (stencil . ,ly:text-interface::print)
1770         (text . ,stroke-finger::calc-text)
1771         (meta . ((class . Item)
1772                  (interfaces . (font-interface
1773                                 self-alignment-interface
1774                                 side-position-interface
1775                                 stroke-finger-interface
1776                                 text-interface
1777                                 text-script-interface))))))
1778
1779     (SustainPedal
1780      . (
1781         (direction . ,RIGHT)
1782         (extra-spacing-width . (+inf.0 . -inf.0))
1783         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1784         (self-alignment-X . ,CENTER)
1785         (stencil . ,ly:sustain-pedal::print)
1786         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1787         (meta . ((class . Item)
1788                  (interfaces . (font-interface
1789                                 piano-pedal-interface
1790                                 piano-pedal-script-interface
1791                                 self-alignment-interface
1792                                 text-interface))))))
1793
1794     (SustainPedalLineSpanner
1795      . (
1796         (axes . (,Y))
1797         (direction . ,DOWN)
1798         (minimum-space . 1.0)
1799         (outside-staff-priority . 1000)
1800         (padding . 1.2)
1801         (side-axis . ,Y)
1802         (staff-padding . 1.2)
1803         (X-extent . ,ly:axis-group-interface::width)
1804         (Y-extent . ,ly:axis-group-interface::height)
1805         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1806         (meta . ((class . Spanner)
1807                  (interfaces . (axis-group-interface
1808                                 piano-pedal-interface
1809                                 side-position-interface))))))
1810
1811     (System
1812      . (
1813         (axes . (,X ,Y))
1814         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
1815         (X-extent . ,ly:axis-group-interface::width)
1816         (Y-extent . ,ly:axis-group-interface::height)
1817         (meta . ((class . System)
1818                  (interfaces . (axis-group-interface
1819                                 system-interface))))))
1820
1821     (SystemStartBar
1822      . (
1823         (collapse-height . 5.0)
1824         (direction . ,LEFT)
1825
1826         ;; ugh--hardcoded.
1827         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
1828         (stencil . ,ly:system-start-delimiter::print)
1829         (style . bar-line)
1830         (thickness . 1.6)
1831         (X-offset . ,ly:side-position-interface::x-aligned-side)
1832         (Y-extent . #f)
1833         (meta . ((class . Spanner)
1834                  (interfaces . (side-position-interface
1835                                 system-start-delimiter-interface))))))
1836
1837     (SystemStartBrace
1838      . (
1839         (collapse-height . 5.0)
1840         (direction . ,LEFT)
1841         (font-encoding . fetaBraces)
1842         (padding . 0.3)
1843         (stencil . ,ly:system-start-delimiter::print)
1844         (style . brace)
1845         (X-offset . ,ly:side-position-interface::x-aligned-side)
1846         (Y-extent . #f)
1847         (meta . ((class . Spanner)
1848                  (interfaces . (font-interface
1849                                 side-position-interface
1850                                 system-start-delimiter-interface))))))
1851
1852     (SystemStartBracket
1853      . (
1854         (collapse-height . 5.0)
1855         (direction . ,LEFT)
1856         (padding . 0.8)
1857         (stencil . ,ly:system-start-delimiter::print)
1858         (style . bracket)
1859         (thickness . 0.45)
1860         (X-offset . ,ly:side-position-interface::x-aligned-side)
1861         (Y-extent . #f)
1862         (meta . ((class . Spanner)
1863                  (interfaces . (font-interface
1864                                 side-position-interface
1865                                 system-start-delimiter-interface))))))
1866
1867     (SystemStartSquare
1868      . (
1869         (direction . ,LEFT)
1870         (stencil . ,ly:system-start-delimiter::print)
1871         (style . line-bracket)
1872         (thickness . 1.0)
1873         (X-offset . ,ly:side-position-interface::x-aligned-side)
1874         (Y-extent . #f)
1875         (meta . ((class . Spanner)
1876                  (interfaces . (font-interface
1877                                 side-position-interface
1878                                 system-start-delimiter-interface))))))
1879
1880
1881     (TabNoteHead
1882      . (
1883         (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible)
1884                                         (parenthesize . #t)))
1885                     (repeat-tied-properties . ((note-head-visible . #t)
1886                                                (parenthesize . #t)))))
1887         (direction . ,CENTER)
1888         (duration-log . ,note-head::calc-duration-log)
1889         (font-series . bold)
1890         (font-size . -2)
1891         (stem-attachment . (0.0 . 1.35))
1892         (stencil . ,ly:text-interface::print)
1893         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1894         (Y-offset . ,ly:staff-symbol-referencer::callback)
1895         (meta . ((class . Item)
1896                  (interfaces  . (font-interface
1897                                  note-head-interface
1898                                  rhythmic-grob-interface
1899                                  rhythmic-head-interface
1900                                  staff-symbol-referencer-interface
1901                                  tab-note-head-interface
1902                                  text-interface))))))
1903
1904     (TextScript
1905      . (
1906         (avoid-slur . around)
1907         (cross-staff . ,ly:script-interface::calc-cross-staff)
1908         (direction . ,DOWN)
1909         (direction . ,ly:script-interface::calc-direction)
1910         (extra-spacing-width . (+inf.0 . -inf.0))
1911         (outside-staff-priority . 450)
1912
1913         ;; sync with Fingering ?
1914         (padding . 0.5)
1915
1916         (positioning-done . ,ly:script-interface::calc-positioning-done)
1917         (script-priority . 200)
1918         (side-axis . ,Y)
1919         (slur-padding . 0.5)
1920         (staff-padding . 0.5)
1921         (stencil . ,ly:text-interface::print)
1922         ;; todo: add X self alignment?
1923         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1924         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1925         (meta . ((class . Item)
1926                  (interfaces . (font-interface
1927                                 instrument-specific-markup-interface
1928                                 self-alignment-interface
1929                                 side-position-interface
1930                                 text-interface
1931                                 text-script-interface))))))
1932
1933     (TextSpanner
1934      . (
1935         (bound-details . ((left . ((Y . 0)
1936                                    (padding . 0.25)
1937                                    (attach-dir . ,LEFT)
1938                                    ))
1939                           (right . ((Y . 0)
1940                                     (padding . 0.25)
1941                                     ))
1942                           ))
1943         (dash-fraction . 0.2)
1944         (dash-period . 3.0)
1945         (direction . ,UP)
1946         (font-shape . italic)
1947         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1948         (outside-staff-priority . 350)
1949         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1950         (side-axis . ,Y)
1951         (staff-padding . 0.8)
1952         (stencil . ,ly:line-spanner::print)
1953         (style . dashed-line)
1954         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1955
1956         (meta . ((class . Spanner)
1957                  (interfaces . (font-interface
1958                                 line-interface
1959                                 line-spanner-interface
1960                                 side-position-interface))))))
1961
1962     (Tie
1963      . (
1964         (avoid-slur . inside)
1965         (control-points . ,ly:tie::calc-control-points)
1966         (details . (
1967                     ;; for a full list, see tie-details.cc
1968                     (ratio . 0.333)
1969                     (center-staff-line-clearance . 0.6)
1970                     (tip-staff-line-clearance . 0.45)
1971                     (note-head-gap . 0.2)
1972                     (stem-gap . 0.35)
1973                     (height-limit . 1.0)
1974                     (horizontal-distance-penalty-factor . 10)
1975                     (same-dir-as-stem-penalty . 8)
1976                     (min-length-penalty-factor . 26)
1977                     (tie-tie-collision-distance . 0.45)
1978                     (tie-tie-collision-penalty . 25.0)
1979                     (intra-space-threshold . 1.25)
1980                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
1981                     (outer-tie-length-symmetry-penalty-factor . 10)
1982                     (vertical-distance-penalty-factor . 7)
1983                     (outer-tie-vertical-gap . 0.25)
1984                     (multi-tie-region-size . 3)
1985                     (single-tie-region-size . 4)
1986                     (between-length-limit . 1.0)))
1987
1988         (direction . ,ly:tie::calc-direction)
1989         (font-size . -6)
1990         (line-thickness . 0.8)
1991         (neutral-direction . ,UP)
1992         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1993         (stencil . ,ly:tie::print)
1994         (thickness . 1.2)
1995         (meta . ((class . Spanner)
1996                  (interfaces . (tie-interface))))))
1997
1998     (TieColumn
1999      . (
2000         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2001         (positioning-done . ,ly:tie-column::calc-positioning-done)
2002         (X-extent . #f)
2003         (Y-extent . #f)
2004         (meta . ((class . Spanner)
2005                  (interfaces . (tie-column-interface))))))
2006
2007     (TimeSignature
2008      . (
2009         (avoid-slur . inside)
2010         (break-align-anchor
2011          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2012         (break-align-symbol . time-signature)
2013         (break-visibility . ,all-visible)
2014         (extra-spacing-height . (-1.0 . 1.0))
2015         (non-musical . #t)
2016         (space-alist . (
2017                         (first-note . (fixed-space . 2.0))
2018                         (right-edge . (extra-space . 0.5))
2019                         (staff-bar . (minimum-space . 2.0))))
2020         (stencil . ,ly:time-signature::print)
2021         (style . C)
2022         (meta . ((class . Item)
2023                  (interfaces . (break-aligned-interface
2024                                 font-interface
2025                                 time-signature-interface))))))
2026
2027     (TrillPitchAccidental
2028      . (
2029         (direction . ,LEFT)
2030         (font-size . -4)
2031         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2032         (padding . 0.2)
2033         (side-axis . ,X)
2034         (stencil . ,ly:accidental-interface::print)
2035         (X-offset . ,ly:side-position-interface::x-aligned-side)
2036         (Y-extent . ,ly:accidental-interface::height)
2037         (meta . ((class . Item)
2038                  (interfaces . (accidental-interface
2039                                 font-interface
2040                                 side-position-interface
2041                                 trill-pitch-accidental-interface))))))
2042
2043     (TrillPitchGroup
2044      . (
2045         (axes . (,X))
2046         (direction . ,RIGHT)
2047         (font-size . -4)
2048         (padding . 0.3)
2049         (side-axis . ,X)
2050         (stencil . ,parenthesize-elements)
2051         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2052         (X-offset . ,ly:side-position-interface::x-aligned-side)
2053         (meta . ((class . Item)
2054                  (interfaces . (axis-group-interface
2055                                 font-interface
2056                                 note-head-interface
2057                                 parentheses-interface
2058                                 side-position-interface))))))
2059
2060     (TrillPitchHead
2061      . (
2062         (duration-log . 2)
2063         (font-size . -4)
2064         (stencil . ,ly:note-head::print)
2065         (Y-offset . ,ly:staff-symbol-referencer::callback)
2066         (meta . ((class . Item)
2067                  (interfaces . (font-interface
2068                                 ledgered-interface
2069                                 pitched-trill-interface
2070                                 rhythmic-head-interface
2071                                 staff-symbol-referencer-interface))))))
2072
2073     (TrillSpanner
2074      . (
2075         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2076         (bound-details . ((left . ((text . ,(make-translate-scaled-markup
2077                                              '(0.0 . -1.0)
2078                                              (make-musicglyph-markup "scripts.trill")))
2079                                    (Y . 0)
2080                                    (stencil-offset . (-0.5 . 0))
2081                                    (padding . 1.5)
2082                                    (attach-dir . ,CENTER)
2083                                    ;; this isn't CENTER because the trill glyph's origin
2084                                    ;; is not centered in its extent; to have the trill
2085                                    ;; spanner aligned the same as a trill, we need a slight offset
2086                                    (anchor-alignment . 0.15)
2087                                    ))
2088                           (left-broken . ((end-on-note . #t)))
2089                           (right . ((Y . 0)))
2090                           ))
2091         (direction . ,UP)
2092         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2093         (outside-staff-priority . 50)
2094         (padding . 0.5)
2095         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2096         (side-axis . ,Y)
2097         (staff-padding . 1.0)
2098         (stencil . ,ly:line-spanner::print)
2099         (style . trill)
2100         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2101         (meta . ((class . Spanner)
2102                  (interfaces . (font-interface
2103                                 line-interface
2104                                 line-spanner-interface
2105                                 side-position-interface
2106                                 trill-spanner-interface))))))
2107
2108     (TupletBracket
2109      . (
2110         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2111         (control-points . ,ly:tuplet-bracket::calc-control-points)
2112         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2113         (direction  . ,ly:tuplet-bracket::calc-direction)
2114         (edge-height . (0.7 . 0.7))
2115         (full-length-to-extent . #t)
2116         (padding . 1.1)
2117         (positions . ,ly:tuplet-bracket::calc-positions)
2118         (shorten-pair . (-0.2 . -0.2))
2119         (staff-padding . 0.25)
2120         (stencil . ,ly:tuplet-bracket::print)
2121         (thickness . 1.6)
2122
2123         (meta . ((class . Spanner)
2124                  (interfaces . (line-interface
2125                                 tuplet-bracket-interface))))))
2126
2127     (TupletNumber
2128      . (
2129         (avoid-slur . inside)
2130         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2131         (font-shape . italic)
2132         (font-size . -2)
2133         (stencil . ,ly:tuplet-number::print)
2134         (text . ,tuplet-number::calc-denominator-text)
2135         (meta . ((class . Spanner)
2136                  (interfaces . (font-interface
2137                                 text-interface
2138                                 tuplet-number-interface))))))
2139
2140
2141     (UnaCordaPedal
2142      . (
2143         (direction . ,RIGHT)
2144         (extra-spacing-width . (+inf.0 . -inf.0))
2145         (font-shape . italic)
2146         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2147         (self-alignment-X . ,CENTER)
2148         (stencil . ,ly:text-interface::print)
2149         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2150         (meta . ((class . Item)
2151                  (interfaces . (font-interface
2152                                 piano-pedal-script-interface
2153                                 self-alignment-interface
2154                                 text-interface))))))
2155
2156     (UnaCordaPedalLineSpanner
2157      . (
2158         (axes . (,Y))
2159         (direction . ,DOWN)
2160         (minimum-space . 1.0)
2161         (outside-staff-priority . 1000)
2162         (padding . 1.2)
2163         (side-axis . ,Y)
2164         (staff-padding . 1.2)
2165         (X-extent . ,ly:axis-group-interface::width)
2166         (Y-extent . ,ly:axis-group-interface::height)
2167         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2168         (meta . ((class . Spanner)
2169                  (interfaces . (axis-group-interface
2170                                 piano-pedal-interface
2171                                 side-position-interface))))))
2172
2173
2174     (VaticanaLigature
2175      . (
2176         (flexa-width . 2.0)
2177         (stencil . ,ly:vaticana-ligature::print)
2178         (thickness . 0.6)
2179         (meta . ((class . Spanner)
2180                  (interfaces . (font-interface
2181                                 vaticana-ligature-interface))))))
2182
2183     (VerticalAlignment
2184      . (
2185         (axes . (,Y))
2186         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2187         (stacking-dir . -1)
2188         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2189         (X-extent . ,ly:axis-group-interface::width)
2190         (Y-extent . ,ly:axis-group-interface::height)
2191         (meta . ((class . Spanner)
2192                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)))
2193                  (interfaces . (align-interface
2194                                 axis-group-interface))))))
2195
2196     (VerticalAxisGroup
2197      . (
2198         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2199         (axes . (,Y))
2200         (default-next-staff-spacing . ((space . 9)
2201                                        (minimum-distance . 8)
2202                                        (padding . 1)))
2203         (next-staff-spacing . ,ly:axis-group-interface::calc-next-staff-spacing)
2204         (non-affinity-spacing . ((padding . 0.5)))
2205         (stencil . ,ly:axis-group-interface::print)
2206         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2207         (X-extent . ,ly:axis-group-interface::width)
2208         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2209         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2210         (meta . ((class . Spanner)
2211                  (object-callbacks . ((X-common . ,ly:axis-group-interface::calc-x-common)))
2212                  (interfaces . (axis-group-interface
2213                                 hara-kiri-group-spanner-interface
2214                                 vertically-spaceable-interface))))))
2215
2216     (VoiceFollower
2217      . (
2218         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2219         (bound-details . ((right . ((attach-dir .  ,CENTER)
2220                                     (padding . 1.5)
2221                                       ))
2222                           (left . ((attach-dir .  ,CENTER)
2223                                    (padding . 1.5)
2224                                       ))
2225                           ))
2226         (gap . 0.5)
2227         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2228         (non-musical . #t)
2229         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2230         (stencil . ,ly:line-spanner::print)
2231         (style . line)
2232         (X-extent . #f)
2233         (Y-extent . #f)
2234         (meta . ((class . Spanner)
2235                  (interfaces . (line-interface
2236                                 line-spanner-interface))))))
2237
2238     (VoltaBracket
2239      . (
2240         (direction . ,UP)
2241         (edge-height . (2.0 . 2.0)) ;; staff-space;
2242         (font-encoding . fetaNumber)
2243         (font-size . -4)
2244         (stencil . ,ly:volta-bracket-interface::print)
2245         (thickness . 1.6)  ;;  line-thickness
2246         (word-space . 0.6)
2247         (meta . ((class . Spanner)
2248                  (interfaces . (font-interface
2249                                 horizontal-bracket-interface
2250                                 line-interface
2251                                 side-position-interface
2252                                 text-interface
2253                                 volta-bracket-interface))))))
2254
2255     (VoltaBracketSpanner
2256      . (
2257         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2258         (axes . (,Y))
2259         (direction . ,UP)
2260         (no-alignment . ,#t)
2261         (outside-staff-priority . 600)
2262         (padding . 1)
2263         (side-axis . ,Y)
2264         (X-extent . ,ly:axis-group-interface::width)
2265         (Y-extent . ,ly:axis-group-interface::height)
2266         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2267         (meta . ((class . Spanner)
2268                  (interfaces . (axis-group-interface
2269                                 side-position-interface))))))
2270
2271 ))
2272
2273 (define (completize-grob-entry x)
2274   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2275 "
2276   ;;  (display (car x))
2277   ;;  (newline)
2278   (let* ((name-sym  (car x))
2279          (grob-entry (cdr x))
2280          (meta-entry (assoc-get 'meta grob-entry))
2281          (class (assoc-get 'class meta-entry))
2282          (ifaces-entry
2283           (assoc-get 'interfaces meta-entry)))
2284
2285     (cond
2286      ((eq? 'Item class)
2287       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2288      ((eq? 'Spanner class)
2289       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2290      ((eq? 'Paper_column class)
2291       (set! ifaces-entry (cons 'item-interface
2292                                (cons 'paper-column-interface ifaces-entry))))
2293      ((eq? 'System class)
2294       (set! ifaces-entry (cons 'system-interface
2295                                (cons 'spanner-interface ifaces-entry))))
2296      (else
2297       (ly:warning "Unknown class ~a" class)))
2298
2299     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2300     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2301
2302     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2303     (set! meta-entry (assoc-set! meta-entry 'interfaces
2304                                  ifaces-entry))
2305     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2306     (cons name-sym grob-entry)))
2307
2308 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2309
2310 ;;  (display (map pair? all-grob-descriptions))
2311
2312 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2313
2314 (map (lambda (x)
2315        ;; (display (car x)) (newline)
2316
2317        (set-object-property! (car x) 'translation-type? list?)
2318        (set-object-property! (car x) 'is-grob? #t))
2319      all-grob-descriptions)
2320
2321 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2322
2323 (define pure-print-callbacks
2324   (list
2325    fret-board::calc-stencil
2326    note-head::brew-ez-stencil
2327    print-circled-text-callback
2328    lyric-text::print
2329    ly:arpeggio::print
2330    ly:arpeggio::brew-chord-bracket
2331    ly:bar-line::print
2332    ly:mensural-ligature::brew-ligature-primitive
2333    ly:note-head::print
2334    ly:dots::print
2335    ly:clef::print
2336    ly:text-interface::print
2337    ly:script-interface::print))
2338
2339 ;; ly:grob::stencil-extent is safe iff the print callback is safe too
2340 (define (pure-stencil-height grob start stop)
2341   (let ((sten (ly:grob-property-data grob 'stencil)))
2342     (if (or
2343          (ly:stencil? sten)
2344          (memq sten pure-print-callbacks))
2345         (ly:grob::stencil-height grob)
2346         '(0 . 0))))
2347
2348 (define pure-conversions-alist
2349   `(
2350     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2351     (,ly:arpeggio::height . ,ly:arpeggio::pure-height)
2352     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2353     (,ly:hairpin::height . ,ly:hairpin::pure-height)
2354     (,ly:stem::height . ,ly:stem::pure-height)
2355     (,ly:rest::height . ,ly:rest::pure-height)
2356     (,ly:grob::stencil-height . ,pure-stencil-height)
2357     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2358     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2359     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2360     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2361     (,ly:slur::height . ,ly:slur::pure-height)
2362     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)))
2363
2364 (define pure-functions
2365   (list
2366    parenthesize-elements
2367    ly:rest::y-offset-callback
2368    ly:staff-symbol-referencer::callback
2369    ly:staff-symbol::height))
2370
2371 (define-public (pure-relevant? grob)
2372   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2373     (not (eq? #f
2374               (or
2375                (pair? extent-callback)
2376                (memq extent-callback pure-functions)
2377                (and
2378                 (pair? (assq extent-callback pure-conversions-alist))
2379                 (begin
2380                   (or
2381                    (not (eq? extent-callback ly:grob::stencil-height))
2382                    (memq (ly:grob-property-data grob 'stencil) pure-print-callbacks)
2383                    (ly:stencil? (ly:grob-property-data grob 'stencil))
2384
2385                    ))))))))
2386
2387 (define-public (call-pure-function unpure args start end)
2388   (if (ly:simple-closure? unpure)
2389       (ly:eval-simple-closure (car args) unpure start end)
2390       (if (not (procedure? unpure))
2391           unpure
2392           (if (memq unpure pure-functions)
2393               (apply unpure args)
2394               (let ((pure (assq unpure pure-conversions-alist)))
2395                 (if pure
2396                     (apply (cdr pure)
2397                            (append
2398                             (list (car args) start end)
2399                             (cdr args)))))))))