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