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