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