]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Doc-es: update Spacing, LilyPond-Book, Running, Introduction.
[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         (stencil . ,ly:line-spanner::print)
942         (style . line)
943         (X-extent . #f)
944         (Y-extent . #f)
945         (zigzag-width . 0.75)
946         (meta . ((class . Spanner)
947                  (interfaces . (glissando-interface
948                                 line-interface
949                                 line-spanner-interface
950                                 unbreakable-spanner-interface))))))
951
952     (GraceSpacing
953      . (
954         (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
955         (shortest-duration-space . 1.6)
956         (spacing-increment . 0.8)
957         (meta . ((class . Spanner)
958                  (interfaces . (grace-spacing-interface
959                                 spacing-options-interface
960                                 spanner-interface))))))
961
962     (GridLine
963      . (
964         (layer . 0)
965         (self-alignment-X . ,CENTER)
966         (stencil . ,ly:grid-line-interface::print)
967         (X-extent  . ,ly:grid-line-interface::width)
968         (X-offset . ,(ly:make-simple-closure
969                       `(,+
970                         ,(ly:make-simple-closure
971                           (list ly:self-alignment-interface::centered-on-x-parent))
972                         ,(ly:make-simple-closure
973                           (list ly:self-alignment-interface::x-aligned-on-self)))))
974         (meta . ((class . Item)
975                  (interfaces . (grid-line-interface
976                                 self-alignment-interface))))))
977
978     (GridPoint
979      . (
980         (X-extent . (0 . 0))
981         (Y-extent . (0 . 0))
982         (meta . ((class . Item)
983                  (interfaces . (grid-point-interface))))))
984
985
986     (Hairpin
987      . (
988         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
989         (bound-padding . 1.0)
990         (circled-tip . #f)
991         (grow-direction . ,hairpin::calc-grow-direction)
992         (height . 0.6666)
993         (minimum-length . 2.0)
994         (self-alignment-Y . ,CENTER)
995         (springs-and-rods . ,ly:spanner::set-spacing-rods)
996         (stencil . ,ly:hairpin::print)
997         (thickness . 1.0)
998         (to-barline . #t)
999         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
1000         (meta . ((class . Spanner)
1001                  (interfaces . (dynamic-interface
1002                                 hairpin-interface
1003                                 line-interface
1004                                 self-alignment-interface
1005                                 spanner-interface))))))
1006
1007     (HorizontalBracket
1008      . (
1009         (bracket-flare . (0.5 . 0.5))
1010         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1011         (direction . ,DOWN)
1012         (padding . 0.2)
1013         (side-axis . ,Y)
1014         (staff-padding . 0.2)
1015         (stencil . ,ly:horizontal-bracket::print)
1016         (thickness . 1.0)
1017         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1018         (meta . ((class . Spanner)
1019                  (interfaces . (horizontal-bracket-interface
1020                                 line-interface
1021                                 side-position-interface
1022                                 spanner-interface))))))
1023
1024
1025     (InstrumentName
1026      . (
1027         (direction . ,LEFT)
1028         (padding . 0.3)
1029         (self-alignment-X . ,CENTER)
1030         (self-alignment-Y . ,CENTER)
1031         (stencil . ,system-start-text::print)
1032         (X-offset . ,system-start-text::calc-x-offset)
1033         (Y-offset . ,system-start-text::calc-y-offset)
1034         (meta . ((class . Spanner)
1035                  (interfaces . (font-interface
1036                                 self-alignment-interface
1037                                 side-position-interface
1038                                 system-start-text-interface))))))
1039
1040     (InstrumentSwitch
1041      . (
1042         (direction . ,UP)
1043         (extra-spacing-width . (+inf.0 . -inf.0))
1044         (outside-staff-priority . 500)
1045         (padding . 0.5)
1046         (self-alignment-X . ,LEFT)
1047         (side-axis . ,Y)
1048         (staff-padding . 0.5)
1049         (stencil . ,ly:text-interface::print)
1050         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1051         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1052         (meta . ((class . Item)
1053                  (interfaces . (font-interface
1054                                 self-alignment-interface
1055                                 side-position-interface
1056                                 text-interface))))))
1057
1058
1059     (KeyCancellation
1060      . (
1061         (break-align-symbol . key-cancellation)
1062         (break-visibility . ,begin-of-line-invisible)
1063         (glyph-name-alist . ,cancellation-glyph-name-alist)
1064         (non-musical . #t)
1065         (space-alist . (
1066                         (time-signature . (extra-space . 1.25))
1067                         (staff-bar . (extra-space . 0.6))
1068                         (key-signature . (extra-space . 0.5))
1069                         (cue-clef . (extra-space . 0.5))
1070                         (right-edge . (extra-space . 0.5))
1071                         (first-note . (fixed-space . 2.5))))
1072         (stencil . ,ly:key-signature-interface::print)
1073         (extra-spacing-width . (0.0 . 0.5))
1074         (Y-offset . ,ly:staff-symbol-referencer::callback)
1075         (meta . ((class . Item)
1076                  (interfaces . (break-aligned-interface
1077                                 font-interface
1078                                 key-cancellation-interface
1079                                 key-signature-interface
1080                                 staff-symbol-referencer-interface))))))
1081
1082     (KeySignature
1083      . (
1084         (avoid-slur . inside)
1085         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1086         (break-align-symbol . key-signature)
1087         (break-visibility . ,begin-of-line-visible)
1088         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
1089         (non-musical . #t)
1090         (space-alist . (
1091                         (time-signature . (extra-space . 1.15))
1092                         (staff-bar . (extra-space . 1.1))
1093                         (cue-clef . (extra-space . 0.5))
1094                         (right-edge . (extra-space . 0.5))
1095                         (first-note . (fixed-space . 2.5))))
1096         (stencil . ,ly:key-signature-interface::print)
1097         (extra-spacing-width . (0.0 . 0.5))
1098         (Y-offset . ,ly:staff-symbol-referencer::callback)
1099         (meta . ((class . Item)
1100                  (interfaces . (break-aligned-interface
1101                                 font-interface
1102                                 key-signature-interface
1103                                 staff-symbol-referencer-interface))))))
1104
1105
1106    (LaissezVibrerTie
1107      . (
1108         (control-points . ,ly:semi-tie::calc-control-points)
1109         (details . ((ratio . 0.333)
1110                     (height-limit . 1.0)))
1111         (direction . ,ly:tie::calc-direction)
1112         (head-direction . ,LEFT)
1113         (stencil  . ,laissez-vibrer::print)
1114         (thickness . 1.0)
1115         (extra-spacing-height . (-0.5 . 0.5))
1116         (meta . ((class . Item)
1117                  (interfaces . (semi-tie-interface))))))
1118
1119     (LaissezVibrerTieColumn
1120      . (
1121         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1122         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1123         (X-extent . #f)
1124         (Y-extent . #f)
1125         (meta . ((class . Item)
1126                  (interfaces . (semi-tie-column-interface))))))
1127
1128     (LedgerLineSpanner
1129      . (
1130         (layer . 0)
1131         (length-fraction . 0.25)
1132         (minimum-length-fraction . 0.25)
1133         (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
1134         (stencil . ,ly:ledger-line-spanner::print)
1135         (X-extent . #f)
1136         (Y-extent . #f)
1137         (meta . ((class . Spanner)
1138                  (interfaces . (ledger-line-spanner-interface))))))
1139
1140     (LeftEdge
1141      . (
1142         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1143         (break-align-symbol . left-edge)
1144         (break-visibility . ,center-invisible)
1145         (non-musical . #t)
1146         (extra-spacing-height . (+inf.0 . -inf.0))
1147         (space-alist . (
1148                         (ambitus . (extra-space . 2.0))
1149                         (breathing-sign . (minimum-space . 0.0))
1150                         (cue-end-clef . (extra-space . 0.8))
1151                         (clef . (extra-space . 0.8))
1152                         (cue-clef . (extra-space . 0.8))
1153                         (staff-bar . (extra-space . 0.0))
1154                         (key-cancellation . (extra-space . 0.0))
1155                         (key-signature . (extra-space . 0.8))
1156                         (time-signature . (extra-space . 1.0))
1157                         (custos . (extra-space . 0.0))
1158                         (first-note . (fixed-space . 2.0))
1159                         (right-edge . (extra-space . 0.0))
1160                         ))
1161         (X-extent . (0 . 0))
1162         (meta . ((class . Item)
1163                  (interfaces . (break-aligned-interface))))))
1164
1165     (LigatureBracket
1166      . (
1167         ;; ugh.  A ligature bracket is totally different from
1168         ;; a tuplet bracket.
1169
1170         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1171         (control-points . ,ly:tuplet-bracket::calc-control-points)
1172         (direction . ,UP)
1173         (edge-height . (0.7 . 0.7))
1174         (padding . 2.0)
1175         (positions . ,ly:tuplet-bracket::calc-positions)
1176         (shorten-pair . (-0.2 . -0.2))
1177         (staff-padding . 0.25)
1178         (stencil . ,ly:tuplet-bracket::print)
1179         (thickness . 1.6)
1180         (meta . ((class . Spanner)
1181                  (interfaces . (line-interface
1182                                 tuplet-bracket-interface))))))
1183
1184     (LyricExtender
1185      . (
1186         (minimum-length . 1.5)
1187         (stencil . ,ly:lyric-extender::print)
1188         (thickness . 0.8) ; line-thickness
1189         (Y-extent . (0 . 0))
1190         (meta . ((class . Spanner)
1191                  (interfaces . (lyric-extender-interface
1192                                 lyric-interface))))))
1193
1194     (LyricHyphen
1195      . (
1196         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
1197         (dash-period . 10.0)
1198         (height . 0.42)
1199         (length . 0.66)
1200         (minimum-distance . 0.1)
1201         (minimum-length . 0.3)
1202         (padding . 0.07)
1203         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1204         (stencil . ,ly:lyric-hyphen::print)
1205         (thickness . 1.3)
1206         (Y-extent . (0 . 0))
1207         (meta . ((class . Spanner)
1208                  (interfaces . (font-interface
1209                                 lyric-hyphen-interface
1210                                 lyric-interface
1211                                 spanner-interface))))))
1212
1213     (LyricSpace
1214      . (
1215         (minimum-distance . 0.45)
1216         (padding . 0.0)
1217         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1218         (X-extent . #f)
1219         (Y-extent . #f)
1220         (meta . ((class . Spanner)
1221                  (interfaces . (lyric-hyphen-interface
1222                                 spanner-interface))))))
1223
1224     (LyricText
1225      . (
1226         (extra-spacing-width . (0.0 . 0.0))
1227         ;; Recede in height for purposes of note spacing,
1228         ;; so notes in melismata can be freely spaced above lyrics
1229         (extra-spacing-height . (0.2 . -0.2))
1230         (font-series . medium)
1231         (font-size . 1.0)
1232         (self-alignment-X . ,CENTER)
1233         (stencil . ,lyric-text::print)
1234         (text . ,(grob::calc-property-by-copy 'text))
1235         (word-space . 0.6)
1236         (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1237         (meta . ((class . Item)
1238                  (interfaces . (font-interface
1239                                 lyric-syllable-interface
1240                                 rhythmic-grob-interface
1241                                 self-alignment-interface
1242                                 text-interface))))))
1243
1244
1245     (MeasureGrouping
1246      . (
1247         (direction . ,UP)
1248         (height . 2.0)
1249         (padding . 2)
1250         (side-axis . ,Y)
1251         (staff-padding . 3)
1252         (stencil . ,ly:measure-grouping::print)
1253         (thickness . 1)
1254         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1255         (meta . ((class . Spanner)
1256                  (interfaces . (measure-grouping-interface
1257                                 side-position-interface))))))
1258
1259     (MelodyItem
1260      . (
1261         (neutral-direction . ,DOWN)
1262         (meta . ((class . Item)
1263                  (interfaces . (melody-spanner-interface))))))
1264
1265     (MensuralLigature
1266      . (
1267         (stencil . ,ly:mensural-ligature::print)
1268         (thickness . 1.4)
1269         (meta . ((class . Spanner)
1270                  (interfaces . (font-interface
1271                                 mensural-ligature-interface))))))
1272
1273     (MetronomeMark
1274      . (
1275         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1276         (break-visibility . ,end-of-line-invisible)
1277         (direction . ,UP)
1278         (extra-spacing-width . (+inf.0 . -inf.0))
1279         (outside-staff-priority . 1000)
1280         (padding . 0.8)
1281         (side-axis . ,Y)
1282         (stencil . ,ly:text-interface::print)
1283         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1284         (X-offset . ,(ly:make-simple-closure
1285                       `(,+
1286                         ,(ly:make-simple-closure
1287                           (list ly:break-alignable-interface::self-align-callback))
1288                         ,(ly:make-simple-closure
1289                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1290         (self-alignment-X . ,LEFT)
1291         (break-align-symbols . (time-signature))
1292         (non-break-align-symbols . (multi-measure-rest-interface))
1293         (non-musical . #t)
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         (Y-offset . ,ly:staff-symbol-referencer::callback)
1313         (meta . ((class . Spanner)
1314                  (interfaces . (font-interface
1315                                 multi-measure-interface
1316                                 multi-measure-rest-interface
1317                                 rest-interface
1318                                 staff-symbol-referencer-interface))))))
1319
1320     (MultiMeasureRestNumber
1321      . (
1322         (bound-padding  . 2.0)
1323         (direction . ,UP)
1324         (font-encoding . fetaText)
1325         (padding . 0.4)
1326         (self-alignment-X . ,CENTER)
1327         (side-axis . ,Y)
1328         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1329         (staff-padding . 0.4)
1330         (stencil . ,ly:text-interface::print)
1331         (X-offset . ,(ly:make-simple-closure
1332                       `(,+
1333                         ,(ly:make-simple-closure
1334                           (list ly:self-alignment-interface::x-aligned-on-self))
1335                         ,(ly:make-simple-closure
1336                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1337         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1338         (meta . ((class . Spanner)
1339                  (interfaces . (font-interface
1340                                 multi-measure-interface
1341                                 self-alignment-interface
1342                                 side-position-interface
1343                                 text-interface))))))
1344
1345     (MultiMeasureRestText
1346      . (
1347         (direction . ,UP)
1348         (outside-staff-priority . 450)
1349         (padding . 0.2)
1350         (self-alignment-X . ,CENTER)
1351         (staff-padding . 0.25)
1352         (stencil . ,ly:text-interface::print)
1353         (X-offset . ,(ly:make-simple-closure
1354                       `(,+
1355                         ,(ly:make-simple-closure
1356                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1357                         ,(ly:make-simple-closure
1358                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1359         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1360         (meta . ((class . Spanner)
1361                  (interfaces . (font-interface
1362                                 multi-measure-interface
1363                                 self-alignment-interface
1364                                 side-position-interface
1365                                 text-interface))))))
1366
1367
1368     (NonMusicalPaperColumn
1369      . (
1370         (allow-loose-spacing . #t)
1371         (axes . (,X))
1372         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1373         (full-measure-extra-space . 1.0)
1374         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1375         ;; sufficient padding to prevent ledger lines from moving over/under
1376         (skyline-vertical-padding . 0.6)
1377         ;;                    (stencil . ,ly:paper-column::print)
1378
1379         (keep-inside-line . #t)
1380         (line-break-permission . allow)
1381         (non-musical . #t)
1382         (page-break-permission . allow)
1383
1384         ;; debugging stuff: print column number.
1385         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1386
1387         (X-extent . ,ly:axis-group-interface::width)
1388         (meta . ((class . Paper_column)
1389                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1390                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1391                  (interfaces . (axis-group-interface
1392                                 font-interface
1393                                 paper-column-interface
1394                                 separation-item-interface
1395                                 spaceable-grob-interface))))))
1396
1397     (NoteCollision
1398      . (
1399         (axes . (,X ,Y))
1400         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1401         (prefer-dotted-right . #t)
1402         (X-extent . ,ly:axis-group-interface::width)
1403         (Y-extent . ,ly:axis-group-interface::height)
1404         (meta . ((class . Item)
1405                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1406                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1407                  (interfaces . (axis-group-interface
1408                                 note-collision-interface))))))
1409
1410     (NoteColumn
1411      . (
1412         (axes . (,X ,Y))
1413         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1414         (skyline-vertical-padding . 0.15)
1415         (X-extent . ,ly:axis-group-interface::width)
1416         (Y-extent . ,ly:axis-group-interface::height)
1417         (meta . ((class . Item)
1418                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1419                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1420                  (interfaces . (axis-group-interface
1421                                 note-column-interface
1422                                 separation-item-interface))))))
1423
1424     (NoteHead
1425      . (
1426         (flexa-width . 2.0)
1427         (duration-log . ,note-head::calc-duration-log)
1428         (extra-spacing-height . ,ly:note-head::include-ledger-line-height)
1429         (glyph-name . ,note-head::calc-glyph-name)
1430         (ligature-flexa . #f)
1431         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1432         (stencil . ,ly:note-head::print)
1433         (X-offset . ,ly:note-head::stem-x-shift)
1434         (Y-offset . ,ly:staff-symbol-referencer::callback)
1435         (meta . ((class . Item)
1436                  (interfaces . (font-interface
1437                                 gregorian-ligature-interface
1438                                 ledgered-interface
1439                                 mensural-ligature-interface
1440                                 note-head-interface
1441                                 rhythmic-grob-interface
1442                                 rhythmic-head-interface
1443                                 staff-symbol-referencer-interface
1444                                 vaticana-ligature-interface))))))
1445
1446     (NoteName
1447      . (
1448         (stencil . ,ly:text-interface::print)
1449         (meta . ((class . Item)
1450                  (interfaces . (font-interface
1451                                 note-name-interface
1452                                 text-interface))))))
1453
1454     (NoteSpacing
1455      . (
1456         ;; Changed this from 0.75.
1457         ;; If you ever change this back, please document! --hwn
1458         (knee-spacing-correction . 1.0)
1459         (same-direction-correction . 0.25)
1460         (space-to-barline . #t)
1461         (stem-spacing-correction . 0.5)
1462         (meta . ((class . Item)
1463                  (interfaces . (note-spacing-interface
1464                                 spacing-interface))))))
1465
1466
1467     (OctavateEight
1468      . (
1469         (break-visibility . ,inherit-x-parent-visibility)
1470         (font-shape . italic)
1471         (font-size . -4)
1472         (self-alignment-X . ,CENTER)
1473         (staff-padding . 0.2)
1474         (stencil . ,ly:text-interface::print)
1475         (X-offset . ,(ly:make-simple-closure
1476                       `(,+
1477                         ,(ly:make-simple-closure
1478                           (list ly:self-alignment-interface::x-aligned-on-self))
1479                         ,(ly:make-simple-closure
1480                           (list ly:self-alignment-interface::centered-on-x-parent)))))
1481         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1482         (meta . ((class . Item)
1483                  (interfaces . (font-interface
1484                                 self-alignment-interface
1485                                 side-position-interface
1486                                 text-interface))))))
1487
1488     (OttavaBracket
1489      . (
1490         (dash-fraction . 0.3)
1491         (direction . ,UP)
1492         (edge-height . (0 . 1.2))
1493         (font-shape . italic)
1494         (minimum-length . 1.0)
1495         (outside-staff-priority . 400)
1496         (padding . 0.5)
1497         (shorten-pair . (0.0 . -0.6))
1498         (staff-padding . 1.0)
1499         (stencil . ,ly:ottava-bracket::print)
1500         (style . dashed-line)
1501         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1502         (meta . ((class . Spanner)
1503                  (interfaces . (font-interface
1504                                 horizontal-bracket-interface
1505                                 line-interface
1506                                 ottava-bracket-interface
1507                                 side-position-interface
1508                                 text-interface))))))
1509
1510
1511     (PaperColumn
1512      . (
1513         (allow-loose-spacing . #t)
1514         (axes . (,X))
1515         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1516         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1517         (keep-inside-line . #t)
1518         ;; (stencil . ,ly:paper-column::print)
1519         (X-extent . ,ly:axis-group-interface::width)
1520
1521         ;; debugging
1522         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1523         (meta . ((class . Paper_column)
1524                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1525                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1526                  (interfaces . (axis-group-interface
1527                                 font-interface
1528                                 paper-column-interface
1529                                 separation-item-interface
1530                                 spaceable-grob-interface))))))
1531
1532     (ParenthesesItem
1533      . (
1534         (font-size . -6)
1535         (padding . 0.2)
1536         (stencil . ,parentheses-item::print)
1537         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1538         (meta . ((class . Item)
1539                  (interfaces . (font-interface
1540                                 parentheses-interface))))))
1541
1542     (PercentRepeat
1543      . (
1544         (dot-negative-kern . 0.75)
1545         (font-encoding . fetaMusic)
1546         (slope . 1.0)
1547         (spacing-pair . (break-alignment . staff-bar))
1548         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1549         (stencil . ,ly:multi-measure-rest::percent)
1550         (thickness . 0.48)
1551         (meta . ((class . Spanner)
1552                  (interfaces . (font-interface
1553                                 multi-measure-rest-interface
1554                                 percent-repeat-interface))))))
1555
1556     (PercentRepeatCounter
1557      . (
1558         (direction . ,UP)
1559         (font-encoding . fetaText)
1560         (font-size . -2)
1561         (padding . 0.2)
1562         (self-alignment-X . ,CENTER)
1563         (staff-padding . 0.25)
1564         (stencil . ,ly:text-interface::print)
1565         (X-offset . ,(ly:make-simple-closure
1566                       `(,+
1567                         ,(ly:make-simple-closure
1568                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1569                         ,(ly:make-simple-closure
1570                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1571         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1572         (meta . ((class . Spanner)
1573                  (interfaces . (font-interface
1574                                 percent-repeat-interface
1575                                 self-alignment-interface
1576                                 side-position-interface
1577                                 text-interface))))))
1578
1579     (PhrasingSlur
1580      . (
1581         (control-points . ,ly:slur::calc-control-points)
1582         (cross-staff . ,ly:slur::calc-cross-staff)
1583         (details . ,default-slur-details)
1584         (direction . ,ly:slur::calc-direction)
1585         (height-limit . 2.0)
1586         (minimum-length . 1.5)
1587         (ratio . 0.333)
1588         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1589         (stencil . ,ly:slur::print)
1590         (thickness . 1.1)
1591         (Y-extent . ,ly:slur::height)
1592         (meta . ((class . Spanner)
1593                  (interfaces . (slur-interface))))))
1594
1595     ;; an example of a text spanner
1596     (PianoPedalBracket
1597      . (
1598         (bound-padding . 1.0)
1599         (bracket-flare . (0.5 . 0.5))
1600         (direction . ,DOWN)
1601         (edge-height . (1.0 . 1.0))
1602         (shorten-pair . (0.0 . 0.0))
1603         (stencil . ,ly:piano-pedal-bracket::print)
1604         (style . line)
1605         (thickness .  1.0)
1606         (meta . ((class . Spanner)
1607                  (interfaces . (line-interface
1608                                 piano-pedal-bracket-interface
1609                                 piano-pedal-interface))))))
1610
1611
1612     (RehearsalMark
1613      . (
1614         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1615         (baseline-skip . 2)
1616         (break-align-symbols . (staff-bar clef))
1617         (break-visibility . ,end-of-line-invisible)
1618         (direction . ,UP)
1619         (extra-spacing-width . (+inf.0 . -inf.0))
1620         (font-size . 2)
1621         (non-musical . #t)
1622         (outside-staff-priority . 1500)
1623         (padding . 0.8)
1624         (self-alignment-X . ,CENTER)
1625         (stencil . ,ly:text-interface::print)
1626         (X-offset . ,(ly:make-simple-closure
1627                       `(,+
1628                         ,(ly:make-simple-closure
1629                           (list ly:break-alignable-interface::self-align-callback))
1630                         ,(ly:make-simple-closure
1631                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1632         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1633         (meta . ((class . Item)
1634                  (interfaces . (break-alignable-interface
1635                                 font-interface
1636                                 mark-interface
1637                                 self-alignment-interface
1638                                 side-position-interface
1639                                 text-interface))))))
1640
1641     (RepeatSlash
1642      . (
1643         (slash-negative-kern . 0.85)
1644         (slope . 1.7)
1645         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1646         (thickness . 0.48)
1647         (meta . ((class . Item)
1648                  (interfaces . (percent-repeat-interface
1649                                 percent-repeat-item-interface
1650                                 rhythmic-grob-interface))))))
1651
1652     (RepeatTie
1653      . (
1654         (control-points . ,ly:semi-tie::calc-control-points)
1655         (details . ((ratio . 0.333)
1656                     (height-limit . 1.0)))
1657         (direction . ,ly:tie::calc-direction)
1658         (head-direction . ,RIGHT)
1659         (stencil  . ,ly:tie::print)
1660         (thickness . 1.0)
1661         (extra-spacing-height . (-0.5 . 0.5))
1662         (meta . ((class . Item)
1663                  (interfaces . (semi-tie-interface))))))
1664
1665     (RepeatTieColumn
1666      . (
1667         (direction . ,ly:tie::calc-direction)
1668         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1669         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1670         (X-extent . #f)
1671         (Y-extent . #f)
1672         (meta . ((class . Item)
1673                  (interfaces . (semi-tie-column-interface))))))
1674
1675     (Rest
1676      . (
1677         (cross-staff . ,ly:rest::calc-cross-staff)
1678         (duration-log . ,stem::calc-duration-log)
1679         (minimum-distance . 0.25)
1680         (stencil . ,ly:rest::print)
1681         (X-extent . ,ly:rest::width)
1682         (Y-extent . ,ly:rest::height)
1683         (Y-offset . ,ly:rest::y-offset-callback)
1684         (meta . ((class . Item)
1685                  (interfaces . (font-interface
1686                                 rest-interface
1687                                 rhythmic-grob-interface
1688                                 rhythmic-head-interface
1689                                 staff-symbol-referencer-interface))))))
1690
1691     (RestCollision
1692      . (
1693         (minimum-distance . 0.75)
1694         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1695         (meta . ((class . Item)
1696                  (interfaces . (rest-collision-interface))))))
1697
1698
1699     (Script
1700      . (
1701         (add-stem-support . #t)
1702         (cross-staff . ,ly:script-interface::calc-cross-staff)
1703         (direction . ,ly:script-interface::calc-direction)
1704         (font-encoding . fetaMusic)
1705         (positioning-done . ,ly:script-interface::calc-positioning-done)
1706         (side-axis . ,Y)
1707
1708         ;; padding set in script definitions.
1709         (staff-padding . 0.25)
1710
1711         (stencil . ,ly:script-interface::print)
1712         (X-offset . ,script-interface::calc-x-offset)
1713         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1714         (meta . ((class . Item)
1715                  (interfaces . (font-interface
1716                                 script-interface
1717                                 side-position-interface))))))
1718
1719     (ScriptColumn
1720      . (
1721         (before-line-breaking . ,ly:script-column::before-line-breaking)
1722         (meta . ((class . Item)
1723                  (interfaces . (script-column-interface))))))
1724
1725     (ScriptRow
1726      . (
1727         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1728         (meta . ((class . Item)
1729                  (interfaces . (script-column-interface))))))
1730
1731     (Slur
1732      . (
1733         (avoid-slur . inside)
1734         (control-points . ,ly:slur::calc-control-points)
1735         (cross-staff . ,ly:slur::calc-cross-staff)
1736         (details . ,default-slur-details)
1737         (direction . ,ly:slur::calc-direction)
1738         (height-limit . 2.0)
1739         (line-thickness . 0.8)
1740         (minimum-length . 1.5)
1741         (ratio . 0.25)
1742         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1743         (stencil . ,ly:slur::print)
1744         (thickness . 1.2)
1745         (Y-extent . ,ly:slur::height)
1746         (meta . ((class . Spanner)
1747                  (interfaces . (slur-interface))))))
1748
1749     (SostenutoPedal
1750      . (
1751         (direction . ,RIGHT)
1752         (extra-spacing-width . (+inf.0 . -inf.0))
1753         (font-shape . italic)
1754         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1755         (self-alignment-X . ,CENTER)
1756         (stencil . ,ly:text-interface::print)
1757         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1758         (meta . ((class . Item)
1759                  (interfaces . (font-interface
1760                                 piano-pedal-script-interface
1761                                 self-alignment-interface
1762                                 text-interface))))))
1763
1764     (SostenutoPedalLineSpanner
1765      . (
1766         (axes . (,Y))
1767         (direction . ,DOWN)
1768         (minimum-space . 1.0)
1769         (outside-staff-priority . 1000)
1770         (padding . 1.2)
1771         (side-axis . ,Y)
1772         (staff-padding . 1.0)
1773         (X-extent . ,ly:axis-group-interface::width)
1774         (Y-extent . ,ly:axis-group-interface::height)
1775         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1776         (meta . ((class . Spanner)
1777                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1778                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1779                  (interfaces . (axis-group-interface
1780                                 piano-pedal-interface
1781                                 side-position-interface))))))
1782
1783     (SpacingSpanner
1784      . (
1785         (average-spacing-wishes . #t)
1786         (base-shortest-duration . ,(ly:make-moment 3 16))
1787         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1788         (shortest-duration-space . 2.0)
1789         (spacing-increment . 1.2)
1790         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1791         (meta . ((class . Spanner)
1792                  (interfaces . (spacing-options-interface
1793                                 spacing-spanner-interface))))))
1794
1795     (SpanBar
1796      . (
1797         (allow-span-bar . #t)
1798         (bar-extent . ,ly:axis-group-interface::height)
1799         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1800         (break-align-symbol . staff-bar)
1801         (cross-staff . #t)
1802         (glyph-name . ,ly:span-bar::calc-glyph-name)
1803
1804         ;; ugh duplication! (these 4 properties were copied from Barline)
1805         ;;
1806         ;; Ross. page 151 lists other values, we opt for a leaner look
1807         ;;
1808         (kern . 3.0)
1809         (thin-kern . 3.0)
1810         (hair-thickness . 1.6)
1811         (thick-thickness . 6.0)
1812
1813         (layer . 0)
1814         (non-musical . #t)
1815         (stencil . ,ly:span-bar::print)
1816         (X-extent . ,ly:span-bar::width)
1817         (Y-extent . ,ly:axis-group-interface::height)
1818         (meta . ((class . Item)
1819                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1820                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1821                  (interfaces . (bar-line-interface
1822                                 font-interface
1823                                 span-bar-interface))))))
1824
1825     (StaffGrouper
1826      . (
1827         (staff-staff-spacing . ((basic-distance . 9)
1828                                 (minimum-distance . 7)
1829                                 (padding . 1)
1830                                 (stretchability . 5)))
1831         (staffgroup-staff-spacing . ((basic-distance . 10.5)
1832                                      (minimum-distance . 8)
1833                                      (padding . 1)
1834                                      (stretchability . 9)))
1835         (meta . ((class . Spanner)
1836                  (interfaces . (staff-grouper-interface))))))
1837
1838     (StaffSpacing
1839      . (
1840         (non-musical . #t)
1841         (stem-spacing-correction . 0.4)
1842         (meta . ((class . Item)
1843                  (interfaces . (spacing-interface
1844                                 staff-spacing-interface))))))
1845
1846     (StaffSymbol
1847      . (
1848         (layer . 0)
1849         (ledger-line-thickness . (1.0 . 0.1))
1850         (line-count . 5)
1851         (stencil . ,ly:staff-symbol::print)
1852         (Y-extent . ,ly:staff-symbol::height)
1853         (meta . ((class . Spanner)
1854                  (interfaces . (staff-symbol-interface))))))
1855
1856     (StanzaNumber
1857      . (
1858         (direction . ,LEFT)
1859         (font-series . bold)
1860         (padding . 1.0)
1861         (side-axis . ,X)
1862         (stencil . ,ly:text-interface::print)
1863         (X-offset . ,ly:side-position-interface::x-aligned-side)
1864         (meta . ((class . Item)
1865                  (interfaces . (font-interface
1866                                 side-position-interface
1867                                 stanza-number-interface
1868                                 text-interface))))))
1869
1870     (Stem
1871      . (
1872         (beamlet-default-length . (1.1 . 1.1))
1873         (beamlet-max-length-proportion . (0.75 . 0.75))
1874         (cross-staff . ,ly:stem::calc-cross-staff)
1875         (default-direction . ,ly:stem::calc-default-direction)
1876         (details
1877          . (
1878             ;; 3.5 (or 3 measured from note head) is standard length
1879             ;; 32nd, 64th, 128th flagged stems should be longer
1880             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
1881
1882             ;; FIXME.  3.5 yields too long beams (according to Ross and
1883             ;; looking at Baerenreiter examples) for a number of common
1884             ;; boundary cases.  Subtracting half a beam thickness fixes
1885             ;; this, but the bug may well be somewhere else.
1886
1887             ;; FIXME this should come from 'lengths
1888             (beamed-lengths . (3.26 3.5 3.6))
1889
1890             ;; The 'normal' minima
1891             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1892                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1893
1894             ;; The 'extreme case' minima
1895             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1896
1897             ;; Stems in unnatural (forced) direction should be shortened by
1898             ;; one staff space, according to [Roush & Gourlay].
1899             ;; Flagged stems we shorten only half a staff space.
1900             (stem-shorten . (1.0 0.5))
1901
1902             ))
1903
1904         ;; We use the normal minima as minimum for the ideal lengths,
1905         ;; and the extreme minima as abolute minimum length.
1906
1907         (direction . ,ly:stem::calc-direction)
1908         (duration-log . ,stem::calc-duration-log)
1909         (flag . ,ly:stem::calc-flag)
1910         (length . ,ly:stem::calc-length)
1911         (neutral-direction . ,DOWN)
1912         (positioning-done . ,ly:stem::calc-positioning-done)
1913         (stem-end-position . ,ly:stem::calc-stem-end-position)
1914         (stem-info . ,ly:stem::calc-stem-info)
1915         (stencil . ,ly:stem::print)
1916         (thickness . 1.3)
1917         (X-extent . ,ly:stem::width)
1918         (X-offset . ,ly:stem::offset-callback)
1919         (Y-extent . ,ly:stem::height)
1920         (Y-offset . ,ly:staff-symbol-referencer::callback)
1921         (meta . ((class . Item)
1922                  (interfaces . (font-interface
1923                                 stem-interface))))))
1924
1925     (StemTremolo
1926      . (
1927         (beam-thickness . 0.48) ; staff-space
1928         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1929         (slope . ,ly:stem-tremolo::calc-slope)
1930         (stencil . ,ly:stem-tremolo::print)
1931         (style . ,ly:stem-tremolo::calc-style)
1932         (X-extent . ,ly:stem-tremolo::width)
1933         (Y-extent . ,ly:stem-tremolo::height)
1934         (meta . ((class . Item)
1935                  (interfaces . (stem-tremolo-interface))))))
1936
1937     (StringNumber
1938      . (
1939         (avoid-slur . around)
1940         (font-encoding . fetaText)
1941         (font-size . -5)                ; don't overlap when next to heads.
1942         (padding . 0.5)
1943         (script-priority . 100)
1944         (self-alignment-X . ,CENTER)
1945         (self-alignment-Y . ,CENTER)
1946         (staff-padding . 0.5)
1947         (stencil . ,print-circled-text-callback)
1948         (text . ,string-number::calc-text)
1949         (meta . ((class . Item)
1950                  (interfaces . (font-interface
1951                                 self-alignment-interface
1952                                 side-position-interface
1953                                 string-number-interface
1954                                 text-interface
1955                                 text-script-interface))))))
1956
1957     (StrokeFinger
1958      . (
1959         (digit-names . #("p" "i" "m" "a" "x"))
1960         (font-shape . italic)
1961         (font-size . -4)                ; don't overlap when next to heads.
1962         (padding . 0.5)
1963         (script-priority . 100)
1964         (self-alignment-X . ,CENTER)
1965         (self-alignment-Y . ,CENTER)
1966         (staff-padding . 0.5)
1967         (stencil . ,ly:text-interface::print)
1968         (text . ,stroke-finger::calc-text)
1969         (meta . ((class . Item)
1970                  (interfaces . (font-interface
1971                                 self-alignment-interface
1972                                 side-position-interface
1973                                 stroke-finger-interface
1974                                 text-interface
1975                                 text-script-interface))))))
1976
1977     (SustainPedal
1978      . (
1979         (direction . ,RIGHT)
1980         (extra-spacing-width . (+inf.0 . -inf.0))
1981         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1982         (self-alignment-X . ,CENTER)
1983         (stencil . ,ly:sustain-pedal::print)
1984         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1985         (meta . ((class . Item)
1986                  (interfaces . (font-interface
1987                                 piano-pedal-interface
1988                                 piano-pedal-script-interface
1989                                 self-alignment-interface
1990                                 text-interface))))))
1991
1992     (SustainPedalLineSpanner
1993      . (
1994         (axes . (,Y))
1995         (direction . ,DOWN)
1996         (minimum-space . 1.0)
1997         (outside-staff-priority . 1000)
1998         (padding . 1.2)
1999         (side-axis . ,Y)
2000         (staff-padding . 1.2)
2001         (X-extent . ,ly:axis-group-interface::width)
2002         (Y-extent . ,ly:axis-group-interface::height)
2003         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2004         (meta . ((class . Spanner)
2005                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2006                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2007                  (interfaces . (axis-group-interface
2008                                 piano-pedal-interface
2009                                 side-position-interface))))))
2010
2011     (System
2012      . (
2013         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2014         (axes . (,X ,Y))
2015         (skyline-horizontal-padding . 0.5)
2016         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2017         (X-extent . ,ly:axis-group-interface::width)
2018         (Y-extent . ,ly:system::height)
2019         (meta . ((class . System)
2020                  (object-callbacks . ((pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
2021                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2022                  (interfaces . (axis-group-interface
2023                                 system-interface))))))
2024
2025     (SystemStartBar
2026      . (
2027         (collapse-height . 5.0)
2028         (direction . ,LEFT)
2029
2030         ;; ugh--hardcoded.
2031         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
2032         (stencil . ,ly:system-start-delimiter::print)
2033         (style . bar-line)
2034         (thickness . 1.6)
2035         (X-offset . ,ly:side-position-interface::x-aligned-side)
2036         (Y-extent . #f)
2037         (meta . ((class . Spanner)
2038                  (interfaces . (side-position-interface
2039                                 system-start-delimiter-interface))))))
2040
2041     (SystemStartBrace
2042      . (
2043         (collapse-height . 5.0)
2044         (direction . ,LEFT)
2045         (font-encoding . fetaBraces)
2046         (padding . 0.3)
2047         (stencil . ,ly:system-start-delimiter::print)
2048         (style . brace)
2049         (X-offset . ,ly:side-position-interface::x-aligned-side)
2050         (Y-extent . #f)
2051         (meta . ((class . Spanner)
2052                  (interfaces . (font-interface
2053                                 side-position-interface
2054                                 system-start-delimiter-interface))))))
2055
2056     (SystemStartBracket
2057      . (
2058         (collapse-height . 5.0)
2059         (direction . ,LEFT)
2060         (padding . 0.8)
2061         (stencil . ,ly:system-start-delimiter::print)
2062         (style . bracket)
2063         (thickness . 0.45)
2064         (X-offset . ,ly:side-position-interface::x-aligned-side)
2065         (Y-extent . #f)
2066         (meta . ((class . Spanner)
2067                  (interfaces . (font-interface
2068                                 side-position-interface
2069                                 system-start-delimiter-interface))))))
2070
2071     (SystemStartSquare
2072      . (
2073         (direction . ,LEFT)
2074         (stencil . ,ly:system-start-delimiter::print)
2075         (style . line-bracket)
2076         (thickness . 1.0)
2077         (X-offset . ,ly:side-position-interface::x-aligned-side)
2078         (Y-extent . #f)
2079         (meta . ((class . Spanner)
2080                  (interfaces . (font-interface
2081                                 side-position-interface
2082                                 system-start-delimiter-interface))))))
2083
2084
2085     (TabNoteHead
2086      . (
2087         (details . ((cautionary-properties . ((angularity . 0.4)
2088                                               (half-thickness . 0.075)
2089                                               (padding . 0)
2090                                               (procedure . ,parenthesize-stencil)
2091                                               (width . 0.25)))
2092                     (head-offset . 3/5)
2093                     (harmonic-properties . ((angularity . 2)
2094                                             (half-thickness . 0.075)
2095                                             (padding . 0)
2096                                             (procedure . ,parenthesize-stencil)
2097                                             (width . 0.25)))
2098                     (repeat-tied-properties . ((note-head-visible . #t)
2099                                                (parenthesize . #t)))
2100                     (tied-properties . ((break-visibility . ,begin-of-line-visible)
2101                                         (parenthesize . #t)))))
2102
2103         (direction . ,CENTER)
2104         (duration-log . ,note-head::calc-duration-log)
2105         (font-series . bold)
2106         (font-size . -2)
2107         (stem-attachment . (0.0 . 1.35))
2108         (stencil . ,tab-note-head::print)
2109         (whiteout . #t)
2110         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2111         (Y-offset . ,ly:staff-symbol-referencer::callback)
2112         (meta . ((class . Item)
2113                  (interfaces  . (font-interface
2114                                  note-head-interface
2115                                  rhythmic-grob-interface
2116                                  rhythmic-head-interface
2117                                  staff-symbol-referencer-interface
2118                                  tab-note-head-interface
2119                                  text-interface))))))
2120
2121     (TextScript
2122      . (
2123         (avoid-slur . around)
2124         (cross-staff . ,ly:script-interface::calc-cross-staff)
2125         (direction . ,DOWN)
2126         (extra-spacing-width . (+inf.0 . -inf.0))
2127         (outside-staff-priority . 450)
2128
2129         ;; sync with Fingering ?
2130         (padding . 0.5)
2131
2132         (script-priority . 200)
2133         (side-axis . ,Y)
2134         (slur-padding . 0.5)
2135         (staff-padding . 0.5)
2136         (stencil . ,ly:text-interface::print)
2137         ;; todo: add X self alignment?
2138         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2139         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2140         (meta . ((class . Item)
2141                  (interfaces . (font-interface
2142                                 instrument-specific-markup-interface
2143                                 self-alignment-interface
2144                                 side-position-interface
2145                                 text-interface
2146                                 text-script-interface))))))
2147
2148     (TextSpanner
2149      . (
2150         (bound-details . ((left . ((Y . 0)
2151                                    (padding . 0.25)
2152                                    (attach-dir . ,LEFT)
2153                                    ))
2154                           (left-broken . ((end-on-note . #t)))
2155                           (right . ((Y . 0)
2156                                     (padding . 0.25)
2157                                     ))
2158                           ))
2159         (dash-fraction . 0.2)
2160         (dash-period . 3.0)
2161         (direction . ,UP)
2162         (font-shape . italic)
2163         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2164         (outside-staff-priority . 350)
2165         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2166         (side-axis . ,Y)
2167         (staff-padding . 0.8)
2168         (stencil . ,ly:line-spanner::print)
2169         (style . dashed-line)
2170         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2171
2172         (meta . ((class . Spanner)
2173                  (interfaces . (font-interface
2174                                 line-interface
2175                                 line-spanner-interface
2176                                 side-position-interface))))))
2177
2178     (Tie
2179      . (
2180         (avoid-slur . inside)
2181         (control-points . ,ly:tie::calc-control-points)
2182         (details . (
2183                     ;; for a full list, see tie-details.cc
2184                     (ratio . 0.333)
2185                     (center-staff-line-clearance . 0.6)
2186                     (tip-staff-line-clearance . 0.45)
2187                     (note-head-gap . 0.2)
2188                     (stem-gap . 0.35)
2189                     (height-limit . 1.0)
2190                     (horizontal-distance-penalty-factor . 10)
2191                     (same-dir-as-stem-penalty . 8)
2192                     (min-length-penalty-factor . 26)
2193                     (tie-tie-collision-distance . 0.45)
2194                     (tie-tie-collision-penalty . 25.0)
2195                     (intra-space-threshold . 1.25)
2196                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2197                     (outer-tie-length-symmetry-penalty-factor . 10)
2198                     (vertical-distance-penalty-factor . 7)
2199                     (outer-tie-vertical-gap . 0.25)
2200                     (multi-tie-region-size . 3)
2201                     (single-tie-region-size . 4)
2202                     (between-length-limit . 1.0)))
2203
2204         (direction . ,ly:tie::calc-direction)
2205         (font-size . -6)
2206         (line-thickness . 0.8)
2207         (neutral-direction . ,UP)
2208         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2209         (stencil . ,ly:tie::print)
2210         (thickness . 1.2)
2211         (meta . ((class . Spanner)
2212                  (interfaces . (tie-interface))))))
2213
2214     (TieColumn
2215      . (
2216         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2217         (positioning-done . ,ly:tie-column::calc-positioning-done)
2218         (X-extent . #f)
2219         (Y-extent . #f)
2220         (meta . ((class . Spanner)
2221                  (interfaces . (tie-column-interface))))))
2222
2223     (TimeSignature
2224      . (
2225         (avoid-slur . inside)
2226         (break-align-anchor
2227          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2228         (break-align-symbol . time-signature)
2229         (break-align-anchor-alignment . ,LEFT)
2230         (break-visibility . ,all-visible)
2231         (extra-spacing-height . (-1.0 . 1.0))
2232         (non-musical . #t)
2233         (space-alist . (
2234                         (cue-clef . (extra-space . 1.5))
2235                         (first-note . (fixed-space . 2.0))
2236                         (right-edge . (extra-space . 0.5))
2237                         (staff-bar . (minimum-space . 2.0))))
2238         (stencil . ,ly:time-signature::print)
2239         (style . C)
2240         (meta . ((class . Item)
2241                  (interfaces . (break-aligned-interface
2242                                 font-interface
2243                                 time-signature-interface))))))
2244
2245     (TrillPitchAccidental
2246      . (
2247         (direction . ,LEFT)
2248         (font-size . -4)
2249         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2250         (padding . 0.2)
2251         (side-axis . ,X)
2252         (stencil . ,ly:accidental-interface::print)
2253         (X-offset . ,ly:side-position-interface::x-aligned-side)
2254         (Y-extent . ,ly:accidental-interface::height)
2255         (meta . ((class . Item)
2256                  (interfaces . (accidental-interface
2257                                 font-interface
2258                                 inline-accidental-interface
2259                                 side-position-interface
2260                                 trill-pitch-accidental-interface))))))
2261
2262     (TrillPitchGroup
2263      . (
2264         (axes . (,X))
2265         (direction . ,RIGHT)
2266         (font-size . -4)
2267         (padding . 0.3)
2268         (side-axis . ,X)
2269         (stencil . ,parenthesize-elements)
2270         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2271         (X-offset . ,ly:side-position-interface::x-aligned-side)
2272         (meta . ((class . Item)
2273                  (interfaces . (axis-group-interface
2274                                 font-interface
2275                                 note-head-interface
2276                                 parentheses-interface
2277                                 side-position-interface))))))
2278
2279     (TrillPitchHead
2280      . (
2281         (duration-log . 2)
2282         (font-size . -4)
2283         (stencil . ,ly:note-head::print)
2284         (Y-offset . ,ly:staff-symbol-referencer::callback)
2285         (meta . ((class . Item)
2286                  (interfaces . (font-interface
2287                                 ledgered-interface
2288                                 pitched-trill-interface
2289                                 rhythmic-head-interface
2290                                 staff-symbol-referencer-interface))))))
2291
2292     (TrillSpanner
2293      . (
2294         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2295         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2296                                    (Y . 0)
2297                                    (stencil-offset . (-0.5 . -1))
2298                                    (padding . 0.5)
2299                                    (attach-dir . ,CENTER)
2300                                    ))
2301                           (left-broken . ((end-on-note . #t)))
2302                           (right . ((Y . 0)))
2303                           ))
2304         (direction . ,UP)
2305         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2306         (outside-staff-priority . 50)
2307         (padding . 0.5)
2308         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2309         (side-axis . ,Y)
2310         (staff-padding . 1.0)
2311         (stencil . ,ly:line-spanner::print)
2312         (style . trill)
2313         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2314         (meta . ((class . Spanner)
2315                  (interfaces . (font-interface
2316                                 line-interface
2317                                 line-spanner-interface
2318                                 side-position-interface
2319                                 trill-spanner-interface))))))
2320
2321     (TupletBracket
2322      . (
2323         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2324         (control-points . ,ly:tuplet-bracket::calc-control-points)
2325         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2326         (direction  . ,ly:tuplet-bracket::calc-direction)
2327         (edge-height . (0.7 . 0.7))
2328         (full-length-to-extent . #t)
2329         (padding . 1.1)
2330         (positions . ,ly:tuplet-bracket::calc-positions)
2331         (shorten-pair . (-0.2 . -0.2))
2332         (staff-padding . 0.25)
2333         (stencil . ,ly:tuplet-bracket::print)
2334         (thickness . 1.6)
2335
2336         (meta . ((class . Spanner)
2337                  (interfaces . (line-interface
2338                                 tuplet-bracket-interface))))))
2339
2340     (TupletNumber
2341      . (
2342         (avoid-slur . inside)
2343         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2344         (font-shape . italic)
2345         (font-size . -2)
2346         (stencil . ,ly:tuplet-number::print)
2347         (text . ,tuplet-number::calc-denominator-text)
2348         (meta . ((class . Spanner)
2349                  (interfaces . (font-interface
2350                                 text-interface
2351                                 tuplet-number-interface))))))
2352
2353
2354     (UnaCordaPedal
2355      . (
2356         (direction . ,RIGHT)
2357         (extra-spacing-width . (+inf.0 . -inf.0))
2358         (font-shape . italic)
2359         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2360         (self-alignment-X . ,CENTER)
2361         (stencil . ,ly:text-interface::print)
2362         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2363         (meta . ((class . Item)
2364                  (interfaces . (font-interface
2365                                 piano-pedal-script-interface
2366                                 self-alignment-interface
2367                                 text-interface))))))
2368
2369     (UnaCordaPedalLineSpanner
2370      . (
2371         (axes . (,Y))
2372         (direction . ,DOWN)
2373         (minimum-space . 1.0)
2374         (outside-staff-priority . 1000)
2375         (padding . 1.2)
2376         (side-axis . ,Y)
2377         (staff-padding . 1.2)
2378         (X-extent . ,ly:axis-group-interface::width)
2379         (Y-extent . ,ly:axis-group-interface::height)
2380         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2381         (meta . ((class . Spanner)
2382                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2383                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2384                  (interfaces . (axis-group-interface
2385                                 piano-pedal-interface
2386                                 side-position-interface))))))
2387
2388
2389     (VaticanaLigature
2390      . (
2391         (flexa-width . 2.0)
2392         (stencil . ,ly:vaticana-ligature::print)
2393         (thickness . 0.6)
2394         (meta . ((class . Spanner)
2395                  (interfaces . (font-interface
2396                                 vaticana-ligature-interface))))))
2397
2398     (VerticalAlignment
2399      . (
2400         (axes . (,Y))
2401         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2402         (stacking-dir . -1)
2403         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2404         (X-extent . ,ly:axis-group-interface::width)
2405         (Y-extent . ,ly:axis-group-interface::height)
2406         (meta . ((class . Spanner)
2407                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2408                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2409                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2410                  (interfaces . (align-interface
2411                                 axis-group-interface))))))
2412
2413     (VerticalAxisGroup
2414      . (
2415         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2416         (axes . (,Y))
2417         (default-staff-staff-spacing . ((basic-distance . 9)
2418                                         (minimum-distance . 8)
2419                                         (padding . 1)))
2420         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2421         (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing)
2422         (stencil . ,ly:axis-group-interface::print)
2423         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2424         (X-extent . ,ly:axis-group-interface::width)
2425         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2426         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2427         (meta . ((class . Spanner)
2428                  (object-callbacks . (
2429                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2430                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2431                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2432
2433                  (interfaces . (axis-group-interface
2434                                 hara-kiri-group-spanner-interface))))))
2435
2436     (VoiceFollower
2437      . (
2438         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2439         (bound-details . ((right . ((attach-dir .  ,CENTER)
2440                                     (padding . 1.5)
2441                                       ))
2442                           (left . ((attach-dir .  ,CENTER)
2443                                    (padding . 1.5)
2444                                       ))
2445                           ))
2446         (gap . 0.5)
2447         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2448         (non-musical . #t)
2449         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2450         (stencil . ,ly:line-spanner::print)
2451         (style . line)
2452         (X-extent . #f)
2453         (Y-extent . #f)
2454         (meta . ((class . Spanner)
2455                  (interfaces . (line-interface
2456                                 line-spanner-interface))))))
2457
2458     (VoltaBracket
2459      . (
2460         (direction . ,UP)
2461         (edge-height . (2.0 . 2.0)) ;; staff-space;
2462         (font-encoding . fetaText)
2463         (font-size . -4)
2464         (stencil . ,ly:volta-bracket-interface::print)
2465         (thickness . 1.6) ;; line-thickness
2466         (word-space . 0.6)
2467         (meta . ((class . Spanner)
2468                  (interfaces . (font-interface
2469                                 horizontal-bracket-interface
2470                                 line-interface
2471                                 side-position-interface
2472                                 text-interface
2473                                 volta-bracket-interface
2474                                 volta-interface))))))
2475
2476     (VoltaBracketSpanner
2477      . (
2478         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2479         (axes . (,Y))
2480         (direction . ,UP)
2481         (no-alignment . #t)
2482         (outside-staff-priority . 600)
2483         (padding . 1)
2484         (side-axis . ,Y)
2485         (X-extent . ,ly:axis-group-interface::width)
2486         (Y-extent . ,ly:axis-group-interface::height)
2487         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2488         (meta . ((class . Spanner)
2489                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2490                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2491                  (interfaces . (axis-group-interface
2492                                 side-position-interface
2493                                 volta-interface))))))
2494
2495 ))
2496
2497 (define (completize-grob-entry x)
2498   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2499 "
2500   ;;  (display (car x))
2501   ;;  (newline)
2502   (let* ((name-sym  (car x))
2503          (grob-entry (cdr x))
2504          (meta-entry (assoc-get 'meta grob-entry))
2505          (class (assoc-get 'class meta-entry))
2506          (ifaces-entry
2507           (assoc-get 'interfaces meta-entry)))
2508
2509     (cond
2510      ((eq? 'Item class)
2511       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2512      ((eq? 'Spanner class)
2513       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2514      ((eq? 'Paper_column class)
2515       (set! ifaces-entry (cons 'item-interface
2516                                (cons 'paper-column-interface ifaces-entry))))
2517      ((eq? 'System class)
2518       (set! ifaces-entry (cons 'system-interface
2519                                (cons 'spanner-interface ifaces-entry))))
2520      (else
2521       (ly:warning "Unknown class ~a" class)))
2522
2523     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2524     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2525
2526     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2527     (set! meta-entry (assoc-set! meta-entry 'interfaces
2528                                  ifaces-entry))
2529     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2530     (cons name-sym grob-entry)))
2531
2532 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2533
2534 ;;  (display (map pair? all-grob-descriptions))
2535
2536 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2537
2538 (map (lambda (x)
2539        ;; (display (car x)) (newline)
2540
2541        (set-object-property! (car x) 'translation-type? list?)
2542        (set-object-property! (car x) 'is-grob? #t))
2543      all-grob-descriptions)
2544
2545 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2546
2547 (define (volta-bracket-interface::pure-height grob start end)
2548   (let ((edge-height (ly:grob-property grob 'edge-height)))
2549     (if (number-pair? edge-height)
2550         (let ((smaller (min (car edge-height) (cdr edge-height)))
2551               (larger (max (car edge-height) (cdr edge-height))))
2552           (interval-union '(0 . 0) (cons smaller larger)))
2553         '(0 . 0))))
2554
2555 (define pure-print-callbacks
2556   (list
2557    fret-board::calc-stencil
2558    note-head::brew-ez-stencil
2559    print-circled-text-callback
2560    laissez-vibrer::print
2561    lyric-text::print
2562    ly:bar-line::print
2563    ly:mensural-ligature::brew-ligature-primitive
2564    ly:note-head::print
2565    ly:dots::print
2566    ly:clef::print
2567    ly:key-signature-interface::print
2568    ly:percent-repeat-item-interface::beat-slash
2569    ly:text-interface::print
2570    ly:script-interface::print
2571    ly:sustain-pedal::print))
2572
2573 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2574 ;; and the print function is not pure, but there is a easy way to
2575 ;; figure out the Y-extent from the print function.
2576 (define pure-print-to-height-conversions
2577   `(
2578     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2579     (,ly:arpeggio::brew-chord-bracket . ,ly:arpeggio::pure-height)
2580     (,ly:arpeggio::brew-chord-slur . ,ly:arpeggio::pure-height)
2581     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2582     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2583
2584 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2585 (define (pure-stencil-height grob start stop)
2586   (let* ((sten (ly:grob-property-data grob 'stencil))
2587          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2588     (cond ((or
2589             (ly:stencil? sten)
2590             (memq sten pure-print-callbacks))
2591            (ly:grob::stencil-height grob))
2592           ((procedure? pure-height-callback)
2593            (pure-height-callback grob start stop))
2594           (else
2595            '(0 . 0)))))
2596
2597 ;; Sometimes, a pure callback will be chained to a non-pure callback via
2598 ;; chain_offset_callback, in which case this provides a default by simply
2599 ;; passing through the value from the pure callback.
2600 (define (pure-chain-offset-callback grob start end prev-offset) prev-offset)
2601
2602 (define pure-conversions-alist
2603   `(
2604     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2605     (,ly:axis-group-interface::calc-staff-staff-spacing . ,ly:axis-group-interface::calc-pure-staff-staff-spacing)
2606     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2607     (,ly:grob::stencil-height . ,pure-stencil-height)
2608     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2609     (,ly:rest-collision::force-shift-callback-rest . ,pure-chain-offset-callback)
2610     (,ly:rest::height . ,ly:rest::pure-height)
2611     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2612     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2613     (,ly:slur::height . ,ly:slur::pure-height)
2614     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2615     (,ly:stem::height . ,ly:stem::pure-height)
2616     (,ly:system::height . ,ly:system::calc-pure-height)))
2617
2618 (define pure-functions
2619   (list
2620    parenthesize-elements
2621    laissez-vibrer::print
2622    ly:rest::y-offset-callback
2623    ly:staff-symbol-referencer::callback
2624    ly:staff-symbol::height))
2625
2626 (define-public (pure-relevant? grob)
2627   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2628     (not (eq? #f
2629               (or
2630                (pair? extent-callback)
2631                (memq extent-callback pure-functions)
2632                (and
2633                 (pair? (assq extent-callback pure-conversions-alist))
2634                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2635                   (or
2636                    (not (eq? extent-callback ly:grob::stencil-height))
2637                    (memq stencil pure-print-callbacks)
2638                    (assq stencil pure-print-to-height-conversions)
2639                    (ly:stencil? stencil)))))))))
2640
2641 (define-public (call-pure-function unpure args start end)
2642   (if (ly:simple-closure? unpure)
2643       (ly:eval-simple-closure (car args) unpure start end)
2644       (if (not (procedure? unpure))
2645           unpure
2646           (if (memq unpure pure-functions)
2647               (apply unpure args)
2648               (let ((pure (assq unpure pure-conversions-alist)))
2649                 (if pure
2650                     (apply (cdr pure)
2651                            (append
2652                             (list (car args) start end)
2653                             (cdr args)))))))))