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