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