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