]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Imported Upstream version 2.14.2
[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         (meta . ((class . Item)
1294                  (interfaces . (break-alignable-interface
1295                                 font-interface
1296                                 metronome-mark-interface
1297                                 self-alignment-interface
1298                                 side-position-interface
1299                                 text-interface))))))
1300
1301     (MultiMeasureRest
1302      . (
1303         (expand-limit . 10)
1304         (hair-thickness . 2.0)
1305         (padding . 1)
1306         (spacing-pair . (break-alignment . break-alignment))
1307         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1308         (staff-position . 0)
1309         (stencil . ,ly:multi-measure-rest::print)
1310         (thick-thickness . 6.6)
1311         (Y-offset . ,ly:staff-symbol-referencer::callback)
1312         (meta . ((class . Spanner)
1313                  (interfaces . (font-interface
1314                                 multi-measure-interface
1315                                 multi-measure-rest-interface
1316                                 rest-interface
1317                                 staff-symbol-referencer-interface))))))
1318
1319     (MultiMeasureRestNumber
1320      . (
1321         (bound-padding  . 2.0)
1322         (direction . ,UP)
1323         (font-encoding . fetaText)
1324         (padding . 0.4)
1325         (self-alignment-X . ,CENTER)
1326         (side-axis . ,Y)
1327         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1328         (staff-padding . 0.4)
1329         (stencil . ,ly:text-interface::print)
1330         (X-offset . ,(ly:make-simple-closure
1331                       `(,+
1332                         ,(ly:make-simple-closure
1333                           (list ly:self-alignment-interface::x-aligned-on-self))
1334                         ,(ly:make-simple-closure
1335                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1336         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1337         (meta . ((class . Spanner)
1338                  (interfaces . (font-interface
1339                                 multi-measure-interface
1340                                 self-alignment-interface
1341                                 side-position-interface
1342                                 text-interface))))))
1343
1344     (MultiMeasureRestText
1345      . (
1346         (direction . ,UP)
1347         (outside-staff-priority . 450)
1348         (padding . 0.2)
1349         (self-alignment-X . ,CENTER)
1350         (staff-padding . 0.25)
1351         (stencil . ,ly:text-interface::print)
1352         (X-offset . ,(ly:make-simple-closure
1353                       `(,+
1354                         ,(ly:make-simple-closure
1355                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1356                         ,(ly:make-simple-closure
1357                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1358         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1359         (meta . ((class . Spanner)
1360                  (interfaces . (font-interface
1361                                 multi-measure-interface
1362                                 self-alignment-interface
1363                                 side-position-interface
1364                                 text-interface))))))
1365
1366
1367     (NonMusicalPaperColumn
1368      . (
1369         (allow-loose-spacing . #t)
1370         (axes . (,X))
1371         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1372         (full-measure-extra-space . 1.0)
1373         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1374         ;; sufficient padding to prevent ledger lines from moving over/under
1375         (skyline-vertical-padding . 0.6)
1376         ;;                    (stencil . ,ly:paper-column::print)
1377
1378         (keep-inside-line . #t)
1379         (line-break-permission . allow)
1380         (non-musical . #t)
1381         (page-break-permission . allow)
1382
1383         ;; debugging stuff: print column number.
1384         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1385
1386         (X-extent . ,ly:axis-group-interface::width)
1387         (meta . ((class . Paper_column)
1388                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1389                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1390                  (interfaces . (axis-group-interface
1391                                 font-interface
1392                                 paper-column-interface
1393                                 separation-item-interface
1394                                 spaceable-grob-interface))))))
1395
1396     (NoteCollision
1397      . (
1398         (axes . (,X ,Y))
1399         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1400         (prefer-dotted-right . #t)
1401         (X-extent . ,ly:axis-group-interface::width)
1402         (Y-extent . ,ly:axis-group-interface::height)
1403         (meta . ((class . Item)
1404                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1405                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1406                  (interfaces . (axis-group-interface
1407                                 note-collision-interface))))))
1408
1409     (NoteColumn
1410      . (
1411         (axes . (,X ,Y))
1412         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1413         (skyline-vertical-padding . 0.15)
1414         (X-extent . ,ly:axis-group-interface::width)
1415         (Y-extent . ,ly:axis-group-interface::height)
1416         (meta . ((class . Item)
1417                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1418                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1419                  (interfaces . (axis-group-interface
1420                                 note-column-interface
1421                                 separation-item-interface))))))
1422
1423     (NoteHead
1424      . (
1425         (flexa-width . 2.0)
1426         (duration-log . ,note-head::calc-duration-log)
1427         (extra-spacing-height . ,ly:note-head::include-ledger-line-height)
1428         (glyph-name . ,note-head::calc-glyph-name)
1429         (ligature-flexa . #f)
1430         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1431         (stencil . ,ly:note-head::print)
1432         (X-offset . ,ly:note-head::stem-x-shift)
1433         (Y-offset . ,ly:staff-symbol-referencer::callback)
1434         (meta . ((class . Item)
1435                  (interfaces . (font-interface
1436                                 gregorian-ligature-interface
1437                                 ledgered-interface
1438                                 ligature-head-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         (spanner-id . "")
1589         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1590         (stencil . ,ly:slur::print)
1591         (thickness . 1.1)
1592         (Y-extent . ,ly:slur::height)
1593         (meta . ((class . Spanner)
1594                  (interfaces . (slur-interface))))))
1595
1596     ;; an example of a text spanner
1597     (PianoPedalBracket
1598      . (
1599         (bound-padding . 1.0)
1600         (bracket-flare . (0.5 . 0.5))
1601         (direction . ,DOWN)
1602         (edge-height . (1.0 . 1.0))
1603         (shorten-pair . (0.0 . 0.0))
1604         (stencil . ,ly:piano-pedal-bracket::print)
1605         (style . line)
1606         (thickness .  1.0)
1607         (meta . ((class . Spanner)
1608                  (interfaces . (line-interface
1609                                 piano-pedal-bracket-interface
1610                                 piano-pedal-interface))))))
1611
1612
1613     (RehearsalMark
1614      . (
1615         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1616         (baseline-skip . 2)
1617         (break-align-symbols . (staff-bar clef))
1618         (break-visibility . ,end-of-line-invisible)
1619         (direction . ,UP)
1620         (extra-spacing-width . (+inf.0 . -inf.0))
1621         (font-size . 2)
1622         (non-musical . #t)
1623         (outside-staff-priority . 1500)
1624         (padding . 0.8)
1625         (self-alignment-X . ,CENTER)
1626         (stencil . ,ly:text-interface::print)
1627         (X-offset . ,(ly:make-simple-closure
1628                       `(,+
1629                         ,(ly:make-simple-closure
1630                           (list ly:break-alignable-interface::self-align-callback))
1631                         ,(ly:make-simple-closure
1632                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1633         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1634         (meta . ((class . Item)
1635                  (interfaces . (break-alignable-interface
1636                                 font-interface
1637                                 mark-interface
1638                                 self-alignment-interface
1639                                 side-position-interface
1640                                 text-interface))))))
1641
1642     (RepeatSlash
1643      . (
1644         (slash-negative-kern . 0.85)
1645         (slope . 1.7)
1646         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1647         (thickness . 0.48)
1648         (meta . ((class . Item)
1649                  (interfaces . (percent-repeat-interface
1650                                 percent-repeat-item-interface
1651                                 rhythmic-grob-interface))))))
1652
1653     (RepeatTie
1654      . (
1655         (control-points . ,ly:semi-tie::calc-control-points)
1656         (details . ((ratio . 0.333)
1657                     (height-limit . 1.0)))
1658         (direction . ,ly:tie::calc-direction)
1659         (head-direction . ,RIGHT)
1660         (stencil  . ,ly:tie::print)
1661         (thickness . 1.0)
1662         (extra-spacing-height . (-0.5 . 0.5))
1663         (meta . ((class . Item)
1664                  (interfaces . (semi-tie-interface))))))
1665
1666     (RepeatTieColumn
1667      . (
1668         (direction . ,ly:tie::calc-direction)
1669         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1670         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1671         (X-extent . #f)
1672         (Y-extent . #f)
1673         (meta . ((class . Item)
1674                  (interfaces . (semi-tie-column-interface))))))
1675
1676     (Rest
1677      . (
1678         (cross-staff . ,ly:rest::calc-cross-staff)
1679         (duration-log . ,stem::calc-duration-log)
1680         (minimum-distance . 0.25)
1681         (stencil . ,ly:rest::print)
1682         (X-extent . ,ly:rest::width)
1683         (Y-extent . ,ly:rest::height)
1684         (Y-offset . ,ly:rest::y-offset-callback)
1685         (meta . ((class . Item)
1686                  (interfaces . (font-interface
1687                                 rest-interface
1688                                 rhythmic-grob-interface
1689                                 rhythmic-head-interface
1690                                 staff-symbol-referencer-interface))))))
1691
1692     (RestCollision
1693      . (
1694         (minimum-distance . 0.75)
1695         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1696         (meta . ((class . Item)
1697                  (interfaces . (rest-collision-interface))))))
1698
1699
1700     (Script
1701      . (
1702         (add-stem-support . #t)
1703         (cross-staff . ,ly:script-interface::calc-cross-staff)
1704         (direction . ,ly:script-interface::calc-direction)
1705         (font-encoding . fetaMusic)
1706         (positioning-done . ,ly:script-interface::calc-positioning-done)
1707         (side-axis . ,Y)
1708
1709         ;; padding set in script definitions.
1710         (staff-padding . 0.25)
1711
1712         (stencil . ,ly:script-interface::print)
1713         (X-offset . ,script-interface::calc-x-offset)
1714         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1715         (meta . ((class . Item)
1716                  (interfaces . (font-interface
1717                                 script-interface
1718                                 side-position-interface))))))
1719
1720     (ScriptColumn
1721      . (
1722         (before-line-breaking . ,ly:script-column::before-line-breaking)
1723         (meta . ((class . Item)
1724                  (interfaces . (script-column-interface))))))
1725
1726     (ScriptRow
1727      . (
1728         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1729         (meta . ((class . Item)
1730                  (interfaces . (script-column-interface))))))
1731
1732     (Slur
1733      . (
1734         (avoid-slur . inside)
1735         (control-points . ,ly:slur::calc-control-points)
1736         (cross-staff . ,ly:slur::calc-cross-staff)
1737         (details . ,default-slur-details)
1738         (direction . ,ly:slur::calc-direction)
1739         (height-limit . 2.0)
1740         (line-thickness . 0.8)
1741         (minimum-length . 1.5)
1742         (ratio . 0.25)
1743         (spanner-id . "")
1744         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1745         (stencil . ,ly:slur::print)
1746         (thickness . 1.2)
1747         (Y-extent . ,ly:slur::height)
1748         (meta . ((class . Spanner)
1749                  (interfaces . (slur-interface))))))
1750
1751     (SostenutoPedal
1752      . (
1753         (direction . ,RIGHT)
1754         (extra-spacing-width . (+inf.0 . -inf.0))
1755         (font-shape . italic)
1756         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1757         (self-alignment-X . ,CENTER)
1758         (stencil . ,ly:text-interface::print)
1759         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1760         (meta . ((class . Item)
1761                  (interfaces . (font-interface
1762                                 piano-pedal-script-interface
1763                                 self-alignment-interface
1764                                 text-interface))))))
1765
1766     (SostenutoPedalLineSpanner
1767      . (
1768         (axes . (,Y))
1769         (direction . ,DOWN)
1770         (minimum-space . 1.0)
1771         (outside-staff-priority . 1000)
1772         (padding . 1.2)
1773         (side-axis . ,Y)
1774         (staff-padding . 1.0)
1775         (X-extent . ,ly:axis-group-interface::width)
1776         (Y-extent . ,ly:axis-group-interface::height)
1777         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1778         (meta . ((class . Spanner)
1779                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1780                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1781                  (interfaces . (axis-group-interface
1782                                 piano-pedal-interface
1783                                 side-position-interface))))))
1784
1785     (SpacingSpanner
1786      . (
1787         (average-spacing-wishes . #t)
1788         (base-shortest-duration . ,(ly:make-moment 3 16))
1789         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1790         (shortest-duration-space . 2.0)
1791         (spacing-increment . 1.2)
1792         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1793         (meta . ((class . Spanner)
1794                  (interfaces . (spacing-options-interface
1795                                 spacing-spanner-interface))))))
1796
1797     (SpanBar
1798      . (
1799         (allow-span-bar . #t)
1800         (bar-extent . ,ly:axis-group-interface::height)
1801         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1802         (break-align-symbol . staff-bar)
1803         (cross-staff . #t)
1804         (glyph-name . ,ly:span-bar::calc-glyph-name)
1805
1806         ;; ugh duplication! (these 4 properties were copied from Barline)
1807         ;;
1808         ;; Ross. page 151 lists other values, we opt for a leaner look
1809         ;;
1810         (kern . 3.0)
1811         (thin-kern . 3.0)
1812         (hair-thickness . 1.6)
1813         (thick-thickness . 6.0)
1814
1815         (layer . 0)
1816         (non-musical . #t)
1817         (stencil . ,ly:span-bar::print)
1818         (X-extent . ,ly:span-bar::width)
1819         (Y-extent . ,ly:axis-group-interface::height)
1820         (meta . ((class . Item)
1821                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1822                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1823                  (interfaces . (bar-line-interface
1824                                 font-interface
1825                                 span-bar-interface))))))
1826
1827     (StaffGrouper
1828      . (
1829         (staff-staff-spacing . ((basic-distance . 9)
1830                                 (minimum-distance . 7)
1831                                 (padding . 1)
1832                                 (stretchability . 5)))
1833         (staffgroup-staff-spacing . ((basic-distance . 10.5)
1834                                      (minimum-distance . 8)
1835                                      (padding . 1)
1836                                      (stretchability . 9)))
1837         (meta . ((class . Spanner)
1838                  (interfaces . (staff-grouper-interface))))))
1839
1840     (StaffSpacing
1841      . (
1842         (non-musical . #t)
1843         (stem-spacing-correction . 0.4)
1844         (meta . ((class . Item)
1845                  (interfaces . (spacing-interface
1846                                 staff-spacing-interface))))))
1847
1848     (StaffSymbol
1849      . (
1850         (layer . 0)
1851         (ledger-line-thickness . (1.0 . 0.1))
1852         (line-count . 5)
1853         (stencil . ,ly:staff-symbol::print)
1854         (Y-extent . ,ly:staff-symbol::height)
1855         (meta . ((class . Spanner)
1856                  (interfaces . (staff-symbol-interface))))))
1857
1858     (StanzaNumber
1859      . (
1860         (direction . ,LEFT)
1861         (font-series . bold)
1862         (padding . 1.0)
1863         (side-axis . ,X)
1864         (stencil . ,ly:text-interface::print)
1865         (X-offset . ,ly:side-position-interface::x-aligned-side)
1866         (meta . ((class . Item)
1867                  (interfaces . (font-interface
1868                                 side-position-interface
1869                                 stanza-number-interface
1870                                 text-interface))))))
1871
1872     (Stem
1873      . (
1874         (beamlet-default-length . (1.1 . 1.1))
1875         (beamlet-max-length-proportion . (0.75 . 0.75))
1876         (cross-staff . ,ly:stem::calc-cross-staff)
1877         (default-direction . ,ly:stem::calc-default-direction)
1878         (details
1879          . (
1880             ;; 3.5 (or 3 measured from note head) is standard length
1881             ;; 32nd, 64th, 128th flagged stems should be longer
1882             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
1883
1884             ;; FIXME.  3.5 yields too long beams (according to Ross and
1885             ;; looking at Baerenreiter examples) for a number of common
1886             ;; boundary cases.  Subtracting half a beam thickness fixes
1887             ;; this, but the bug may well be somewhere else.
1888
1889             ;; FIXME this should come from 'lengths
1890             (beamed-lengths . (3.26 3.5 3.6))
1891
1892             ;; The 'normal' minima
1893             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1894                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1895
1896             ;; The 'extreme case' minima
1897             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1898
1899             ;; Stems in unnatural (forced) direction should be shortened by
1900             ;; one staff space, according to [Roush & Gourlay].
1901             ;; Flagged stems we shorten only half a staff space.
1902             (stem-shorten . (1.0 0.5))
1903
1904             ))
1905
1906         ;; We use the normal minima as minimum for the ideal lengths,
1907         ;; and the extreme minima as abolute minimum length.
1908
1909         (direction . ,ly:stem::calc-direction)
1910         (duration-log . ,stem::calc-duration-log)
1911         (flag . ,ly:stem::calc-flag)
1912         (length . ,ly:stem::calc-length)
1913         (neutral-direction . ,DOWN)
1914         (positioning-done . ,ly:stem::calc-positioning-done)
1915         (stem-end-position . ,ly:stem::calc-stem-end-position)
1916         (stem-info . ,ly:stem::calc-stem-info)
1917         (stencil . ,ly:stem::print)
1918         (thickness . 1.3)
1919         (X-extent . ,ly:stem::width)
1920         (X-offset . ,ly:stem::offset-callback)
1921         (Y-extent . ,ly:stem::height)
1922         (Y-offset . ,ly:staff-symbol-referencer::callback)
1923         (meta . ((class . Item)
1924                  (interfaces . (font-interface
1925                                 stem-interface))))))
1926
1927     (StemTremolo
1928      . (
1929         (beam-thickness . 0.48) ; staff-space
1930         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1931         (slope . ,ly:stem-tremolo::calc-slope)
1932         (stencil . ,ly:stem-tremolo::print)
1933         (style . ,ly:stem-tremolo::calc-style)
1934         (X-extent . ,ly:stem-tremolo::width)
1935         (Y-extent . ,ly:stem-tremolo::height)
1936         (meta . ((class . Item)
1937                  (interfaces . (stem-tremolo-interface))))))
1938
1939     (StringNumber
1940      . (
1941         (avoid-slur . around)
1942         (font-encoding . fetaText)
1943         (font-size . -5)                ; don't overlap when next to heads.
1944         (padding . 0.5)
1945         (script-priority . 100)
1946         (self-alignment-X . ,CENTER)
1947         (self-alignment-Y . ,CENTER)
1948         (staff-padding . 0.5)
1949         (stencil . ,print-circled-text-callback)
1950         (text . ,string-number::calc-text)
1951         (meta . ((class . Item)
1952                  (interfaces . (font-interface
1953                                 self-alignment-interface
1954                                 side-position-interface
1955                                 string-number-interface
1956                                 text-interface
1957                                 text-script-interface))))))
1958
1959     (StrokeFinger
1960      . (
1961         (digit-names . #("p" "i" "m" "a" "x"))
1962         (font-shape . italic)
1963         (font-size . -4)                ; don't overlap when next to heads.
1964         (padding . 0.5)
1965         (script-priority . 100)
1966         (self-alignment-X . ,CENTER)
1967         (self-alignment-Y . ,CENTER)
1968         (staff-padding . 0.5)
1969         (stencil . ,ly:text-interface::print)
1970         (text . ,stroke-finger::calc-text)
1971         (meta . ((class . Item)
1972                  (interfaces . (font-interface
1973                                 self-alignment-interface
1974                                 side-position-interface
1975                                 stroke-finger-interface
1976                                 text-interface
1977                                 text-script-interface))))))
1978
1979     (SustainPedal
1980      . (
1981         (direction . ,RIGHT)
1982         (extra-spacing-width . (+inf.0 . -inf.0))
1983         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1984         (self-alignment-X . ,CENTER)
1985         (stencil . ,ly:sustain-pedal::print)
1986         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1987         (meta . ((class . Item)
1988                  (interfaces . (font-interface
1989                                 piano-pedal-interface
1990                                 piano-pedal-script-interface
1991                                 self-alignment-interface
1992                                 text-interface))))))
1993
1994     (SustainPedalLineSpanner
1995      . (
1996         (axes . (,Y))
1997         (direction . ,DOWN)
1998         (minimum-space . 1.0)
1999         (outside-staff-priority . 1000)
2000         (padding . 1.2)
2001         (side-axis . ,Y)
2002         (staff-padding . 1.2)
2003         (X-extent . ,ly:axis-group-interface::width)
2004         (Y-extent . ,ly:axis-group-interface::height)
2005         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2006         (meta . ((class . Spanner)
2007                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2008                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2009                  (interfaces . (axis-group-interface
2010                                 piano-pedal-interface
2011                                 side-position-interface))))))
2012
2013     (System
2014      . (
2015         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2016         (axes . (,X ,Y))
2017         (skyline-horizontal-padding . 0.5)
2018         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2019         (X-extent . ,ly:axis-group-interface::width)
2020         (Y-extent . ,ly:system::height)
2021         (meta . ((class . System)
2022                  (object-callbacks . ((pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
2023                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2024                  (interfaces . (axis-group-interface
2025                                 system-interface))))))
2026
2027     (SystemStartBar
2028      . (
2029         (collapse-height . 5.0)
2030         (direction . ,LEFT)
2031
2032         ;; ugh--hardcoded.
2033         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
2034         (stencil . ,ly:system-start-delimiter::print)
2035         (style . bar-line)
2036         (thickness . 1.6)
2037         (X-offset . ,ly:side-position-interface::x-aligned-side)
2038         (Y-extent . #f)
2039         (meta . ((class . Spanner)
2040                  (interfaces . (side-position-interface
2041                                 system-start-delimiter-interface))))))
2042
2043     (SystemStartBrace
2044      . (
2045         (collapse-height . 5.0)
2046         (direction . ,LEFT)
2047         (font-encoding . fetaBraces)
2048         (padding . 0.3)
2049         (stencil . ,ly:system-start-delimiter::print)
2050         (style . brace)
2051         (X-offset . ,ly:side-position-interface::x-aligned-side)
2052         (Y-extent . #f)
2053         (meta . ((class . Spanner)
2054                  (interfaces . (font-interface
2055                                 side-position-interface
2056                                 system-start-delimiter-interface))))))
2057
2058     (SystemStartBracket
2059      . (
2060         (collapse-height . 5.0)
2061         (direction . ,LEFT)
2062         (padding . 0.8)
2063         (stencil . ,ly:system-start-delimiter::print)
2064         (style . bracket)
2065         (thickness . 0.45)
2066         (X-offset . ,ly:side-position-interface::x-aligned-side)
2067         (Y-extent . #f)
2068         (meta . ((class . Spanner)
2069                  (interfaces . (font-interface
2070                                 side-position-interface
2071                                 system-start-delimiter-interface))))))
2072
2073     (SystemStartSquare
2074      . (
2075         (direction . ,LEFT)
2076         (stencil . ,ly:system-start-delimiter::print)
2077         (style . line-bracket)
2078         (thickness . 1.0)
2079         (X-offset . ,ly:side-position-interface::x-aligned-side)
2080         (Y-extent . #f)
2081         (meta . ((class . Spanner)
2082                  (interfaces . (font-interface
2083                                 side-position-interface
2084                                 system-start-delimiter-interface))))))
2085
2086
2087     (TabNoteHead
2088      . (
2089         (details . ((cautionary-properties . ((angularity . 0.4)
2090                                               (half-thickness . 0.075)
2091                                               (padding . 0)
2092                                               (procedure . ,parenthesize-stencil)
2093                                               (width . 0.25)))
2094                     (head-offset . 3/5)
2095                     (harmonic-properties . ((angularity . 2)
2096                                             (half-thickness . 0.075)
2097                                             (padding . 0)
2098                                             (procedure . ,parenthesize-stencil)
2099                                             (width . 0.25)))
2100                     (repeat-tied-properties . ((note-head-visible . #t)
2101                                                (parenthesize . #t)))
2102                     (tied-properties . ((break-visibility . ,begin-of-line-visible)
2103                                         (parenthesize . #t)))))
2104
2105         (direction . ,CENTER)
2106         (duration-log . ,note-head::calc-duration-log)
2107         (font-series . bold)
2108         (font-size . -2)
2109         (stem-attachment . (0.0 . 1.35))
2110         (stencil . ,tab-note-head::print)
2111         (whiteout . #t)
2112         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2113         (Y-offset . ,ly:staff-symbol-referencer::callback)
2114         (meta . ((class . Item)
2115                  (interfaces  . (font-interface
2116                                  note-head-interface
2117                                  rhythmic-grob-interface
2118                                  rhythmic-head-interface
2119                                  staff-symbol-referencer-interface
2120                                  tab-note-head-interface
2121                                  text-interface))))))
2122
2123     (TextScript
2124      . (
2125         (avoid-slur . around)
2126         (cross-staff . ,ly:script-interface::calc-cross-staff)
2127         (direction . ,DOWN)
2128         (extra-spacing-width . (+inf.0 . -inf.0))
2129         (outside-staff-priority . 450)
2130
2131         ;; sync with Fingering ?
2132         (padding . 0.5)
2133
2134         (script-priority . 200)
2135         (side-axis . ,Y)
2136         (slur-padding . 0.5)
2137         (staff-padding . 0.5)
2138         (stencil . ,ly:text-interface::print)
2139         ;; todo: add X self alignment?
2140         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2141         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2142         (meta . ((class . Item)
2143                  (interfaces . (font-interface
2144                                 instrument-specific-markup-interface
2145                                 self-alignment-interface
2146                                 side-position-interface
2147                                 text-interface
2148                                 text-script-interface))))))
2149
2150     (TextSpanner
2151      . (
2152         (bound-details . ((left . ((Y . 0)
2153                                    (padding . 0.25)
2154                                    (attach-dir . ,LEFT)
2155                                    ))
2156                           (left-broken . ((end-on-note . #t)))
2157                           (right . ((Y . 0)
2158                                     (padding . 0.25)
2159                                     ))
2160                           ))
2161         (dash-fraction . 0.2)
2162         (dash-period . 3.0)
2163         (direction . ,UP)
2164         (font-shape . italic)
2165         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2166         (outside-staff-priority . 350)
2167         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2168         (side-axis . ,Y)
2169         (staff-padding . 0.8)
2170         (stencil . ,ly:line-spanner::print)
2171         (style . dashed-line)
2172         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2173
2174         (meta . ((class . Spanner)
2175                  (interfaces . (font-interface
2176                                 line-interface
2177                                 line-spanner-interface
2178                                 side-position-interface))))))
2179
2180     (Tie
2181      . (
2182         (avoid-slur . inside)
2183         (control-points . ,ly:tie::calc-control-points)
2184         (details . (
2185                     ;; for a full list, see tie-details.cc
2186                     (ratio . 0.333)
2187                     (center-staff-line-clearance . 0.6)
2188                     (tip-staff-line-clearance . 0.45)
2189                     (note-head-gap . 0.2)
2190                     (stem-gap . 0.35)
2191                     (height-limit . 1.0)
2192                     (horizontal-distance-penalty-factor . 10)
2193                     (same-dir-as-stem-penalty . 8)
2194                     (min-length-penalty-factor . 26)
2195                     (tie-tie-collision-distance . 0.45)
2196                     (tie-tie-collision-penalty . 25.0)
2197                     (intra-space-threshold . 1.25)
2198                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2199                     (outer-tie-length-symmetry-penalty-factor . 10)
2200                     (vertical-distance-penalty-factor . 7)
2201                     (outer-tie-vertical-gap . 0.25)
2202                     (multi-tie-region-size . 3)
2203                     (single-tie-region-size . 4)
2204                     (between-length-limit . 1.0)))
2205
2206         (direction . ,ly:tie::calc-direction)
2207         (font-size . -6)
2208         (line-thickness . 0.8)
2209         (neutral-direction . ,UP)
2210         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2211         (stencil . ,ly:tie::print)
2212         (thickness . 1.2)
2213         (meta . ((class . Spanner)
2214                  (interfaces . (tie-interface))))))
2215
2216     (TieColumn
2217      . (
2218         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2219         (positioning-done . ,ly:tie-column::calc-positioning-done)
2220         (X-extent . #f)
2221         (Y-extent . #f)
2222         (meta . ((class . Spanner)
2223                  (interfaces . (tie-column-interface))))))
2224
2225     (TimeSignature
2226      . (
2227         (avoid-slur . inside)
2228         (break-align-anchor
2229          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2230         (break-align-symbol . time-signature)
2231         (break-align-anchor-alignment . ,LEFT)
2232         (break-visibility . ,all-visible)
2233         (extra-spacing-height . (-1.0 . 1.0))
2234         (non-musical . #t)
2235         (space-alist . (
2236                         (cue-clef . (extra-space . 1.5))
2237                         (first-note . (fixed-space . 2.0))
2238                         (right-edge . (extra-space . 0.5))
2239                         (staff-bar . (minimum-space . 2.0))))
2240         (stencil . ,ly:time-signature::print)
2241         (style . C)
2242         (meta . ((class . Item)
2243                  (interfaces . (break-aligned-interface
2244                                 font-interface
2245                                 time-signature-interface))))))
2246
2247     (TrillPitchAccidental
2248      . (
2249         (direction . ,LEFT)
2250         (font-size . -4)
2251         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2252         (padding . 0.2)
2253         (side-axis . ,X)
2254         (stencil . ,ly:accidental-interface::print)
2255         (X-offset . ,ly:side-position-interface::x-aligned-side)
2256         (Y-extent . ,ly:accidental-interface::height)
2257         (meta . ((class . Item)
2258                  (interfaces . (accidental-interface
2259                                 font-interface
2260                                 inline-accidental-interface
2261                                 side-position-interface
2262                                 trill-pitch-accidental-interface))))))
2263
2264     (TrillPitchGroup
2265      . (
2266         (axes . (,X))
2267         (direction . ,RIGHT)
2268         (font-size . -4)
2269         (padding . 0.3)
2270         (side-axis . ,X)
2271         (stencil . ,parenthesize-elements)
2272         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2273         (X-offset . ,ly:side-position-interface::x-aligned-side)
2274         (meta . ((class . Item)
2275                  (interfaces . (axis-group-interface
2276                                 font-interface
2277                                 note-head-interface
2278                                 parentheses-interface
2279                                 side-position-interface))))))
2280
2281     (TrillPitchHead
2282      . (
2283         (duration-log . 2)
2284         (font-size . -4)
2285         (stencil . ,ly:note-head::print)
2286         (Y-offset . ,ly:staff-symbol-referencer::callback)
2287         (meta . ((class . Item)
2288                  (interfaces . (font-interface
2289                                 ledgered-interface
2290                                 pitched-trill-interface
2291                                 rhythmic-head-interface
2292                                 staff-symbol-referencer-interface))))))
2293
2294     (TrillSpanner
2295      . (
2296         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2297         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2298                                    (Y . 0)
2299                                    (stencil-offset . (-0.5 . -1))
2300                                    (padding . 0.5)
2301                                    (attach-dir . ,CENTER)
2302                                    ))
2303                           (left-broken . ((end-on-note . #t)))
2304                           (right . ((Y . 0)))
2305                           ))
2306         (direction . ,UP)
2307         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2308         (outside-staff-priority . 50)
2309         (padding . 0.5)
2310         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2311         (side-axis . ,Y)
2312         (staff-padding . 1.0)
2313         (stencil . ,ly:line-spanner::print)
2314         (style . trill)
2315         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2316         (meta . ((class . Spanner)
2317                  (interfaces . (font-interface
2318                                 line-interface
2319                                 line-spanner-interface
2320                                 side-position-interface
2321                                 trill-spanner-interface))))))
2322
2323     (TupletBracket
2324      . (
2325         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2326         (control-points . ,ly:tuplet-bracket::calc-control-points)
2327         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2328         (direction  . ,ly:tuplet-bracket::calc-direction)
2329         (edge-height . (0.7 . 0.7))
2330         (full-length-to-extent . #t)
2331         (padding . 1.1)
2332         (positions . ,ly:tuplet-bracket::calc-positions)
2333         (shorten-pair . (-0.2 . -0.2))
2334         (staff-padding . 0.25)
2335         (stencil . ,ly:tuplet-bracket::print)
2336         (thickness . 1.6)
2337
2338         (meta . ((class . Spanner)
2339                  (interfaces . (line-interface
2340                                 tuplet-bracket-interface))))))
2341
2342     (TupletNumber
2343      . (
2344         (avoid-slur . inside)
2345         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2346         (font-shape . italic)
2347         (font-size . -2)
2348         (stencil . ,ly:tuplet-number::print)
2349         (text . ,tuplet-number::calc-denominator-text)
2350         (meta . ((class . Spanner)
2351                  (interfaces . (font-interface
2352                                 text-interface
2353                                 tuplet-number-interface))))))
2354
2355
2356     (UnaCordaPedal
2357      . (
2358         (direction . ,RIGHT)
2359         (extra-spacing-width . (+inf.0 . -inf.0))
2360         (font-shape . italic)
2361         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2362         (self-alignment-X . ,CENTER)
2363         (stencil . ,ly:text-interface::print)
2364         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2365         (meta . ((class . Item)
2366                  (interfaces . (font-interface
2367                                 piano-pedal-script-interface
2368                                 self-alignment-interface
2369                                 text-interface))))))
2370
2371     (UnaCordaPedalLineSpanner
2372      . (
2373         (axes . (,Y))
2374         (direction . ,DOWN)
2375         (minimum-space . 1.0)
2376         (outside-staff-priority . 1000)
2377         (padding . 1.2)
2378         (side-axis . ,Y)
2379         (staff-padding . 1.2)
2380         (X-extent . ,ly:axis-group-interface::width)
2381         (Y-extent . ,ly:axis-group-interface::height)
2382         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2383         (meta . ((class . Spanner)
2384                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2385                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2386                  (interfaces . (axis-group-interface
2387                                 piano-pedal-interface
2388                                 side-position-interface))))))
2389
2390
2391     (VaticanaLigature
2392      . (
2393         (flexa-width . 2.0)
2394         (stencil . ,ly:vaticana-ligature::print)
2395         (thickness . 0.6)
2396         (meta . ((class . Spanner)
2397                  (interfaces . (font-interface
2398                                 vaticana-ligature-interface))))))
2399
2400     (VerticalAlignment
2401      . (
2402         (axes . (,Y))
2403         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2404         (stacking-dir . -1)
2405         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2406         (X-extent . ,ly:axis-group-interface::width)
2407         (Y-extent . ,ly:axis-group-interface::height)
2408         (meta . ((class . Spanner)
2409                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2410                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2411                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2412                  (interfaces . (align-interface
2413                                 axis-group-interface))))))
2414
2415     (VerticalAxisGroup
2416      . (
2417         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2418         (axes . (,Y))
2419         (default-staff-staff-spacing . ((basic-distance . 9)
2420                                         (minimum-distance . 8)
2421                                         (padding . 1)))
2422         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2423         (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing)
2424         (stencil . ,ly:axis-group-interface::print)
2425         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2426         (X-extent . ,ly:axis-group-interface::width)
2427         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2428         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2429         (meta . ((class . Spanner)
2430                  (object-callbacks . (
2431                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2432                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2433                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2434
2435                  (interfaces . (axis-group-interface
2436                                 hara-kiri-group-spanner-interface))))))
2437
2438     (VoiceFollower
2439      . (
2440         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2441         (bound-details . ((right . ((attach-dir .  ,CENTER)
2442                                     (padding . 1.5)
2443                                       ))
2444                           (left . ((attach-dir .  ,CENTER)
2445                                    (padding . 1.5)
2446                                       ))
2447                           ))
2448         (gap . 0.5)
2449         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2450         (non-musical . #t)
2451         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2452         (stencil . ,ly:line-spanner::print)
2453         (style . line)
2454         (X-extent . #f)
2455         (Y-extent . #f)
2456         (meta . ((class . Spanner)
2457                  (interfaces . (line-interface
2458                                 line-spanner-interface))))))
2459
2460     (VoltaBracket
2461      . (
2462         (direction . ,UP)
2463         (edge-height . (2.0 . 2.0)) ;; staff-space;
2464         (font-encoding . fetaText)
2465         (font-size . -4)
2466         (stencil . ,ly:volta-bracket-interface::print)
2467         (thickness . 1.6) ;; line-thickness
2468         (word-space . 0.6)
2469         (meta . ((class . Spanner)
2470                  (interfaces . (font-interface
2471                                 horizontal-bracket-interface
2472                                 line-interface
2473                                 side-position-interface
2474                                 text-interface
2475                                 volta-bracket-interface
2476                                 volta-interface))))))
2477
2478     (VoltaBracketSpanner
2479      . (
2480         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2481         (axes . (,Y))
2482         (direction . ,UP)
2483         (no-alignment . #t)
2484         (outside-staff-priority . 600)
2485         (padding . 1)
2486         (side-axis . ,Y)
2487         (X-extent . ,ly:axis-group-interface::width)
2488         (Y-extent . ,ly:axis-group-interface::height)
2489         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2490         (meta . ((class . Spanner)
2491                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2492                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2493                  (interfaces . (axis-group-interface
2494                                 side-position-interface
2495                                 volta-interface))))))
2496
2497 ))
2498
2499 (define (completize-grob-entry x)
2500   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2501 "
2502   ;;  (display (car x))
2503   ;;  (newline)
2504   (let* ((name-sym  (car x))
2505          (grob-entry (cdr x))
2506          (meta-entry (assoc-get 'meta grob-entry))
2507          (class (assoc-get 'class meta-entry))
2508          (ifaces-entry
2509           (assoc-get 'interfaces meta-entry)))
2510
2511     (cond
2512      ((eq? 'Item class)
2513       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2514      ((eq? 'Spanner class)
2515       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2516      ((eq? 'Paper_column class)
2517       (set! ifaces-entry (cons 'item-interface
2518                                (cons 'paper-column-interface ifaces-entry))))
2519      ((eq? 'System class)
2520       (set! ifaces-entry (cons 'system-interface
2521                                (cons 'spanner-interface ifaces-entry))))
2522      (else
2523       (ly:warning "Unknown class ~a" class)))
2524
2525     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2526     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2527
2528     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2529     (set! meta-entry (assoc-set! meta-entry 'interfaces
2530                                  ifaces-entry))
2531     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2532     (cons name-sym grob-entry)))
2533
2534 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2535
2536 ;;  (display (map pair? all-grob-descriptions))
2537
2538 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2539
2540 (map (lambda (x)
2541        ;; (display (car x)) (newline)
2542
2543        (set-object-property! (car x) 'translation-type? list?)
2544        (set-object-property! (car x) 'is-grob? #t))
2545      all-grob-descriptions)
2546
2547 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2548
2549 (define (volta-bracket-interface::pure-height grob start end)
2550   (let ((edge-height (ly:grob-property grob 'edge-height)))
2551     (if (number-pair? edge-height)
2552         (let ((smaller (min (car edge-height) (cdr edge-height)))
2553               (larger (max (car edge-height) (cdr edge-height))))
2554           (interval-union '(0 . 0) (cons smaller larger)))
2555         '(0 . 0))))
2556
2557 (define pure-print-callbacks
2558   (list
2559    fret-board::calc-stencil
2560    note-head::brew-ez-stencil
2561    print-circled-text-callback
2562    laissez-vibrer::print
2563    lyric-text::print
2564    ly:bar-line::print
2565    ly:mensural-ligature::brew-ligature-primitive
2566    ly:note-head::print
2567    ly:dots::print
2568    ly:clef::print
2569    ly:key-signature-interface::print
2570    ly:percent-repeat-item-interface::beat-slash
2571    ly:text-interface::print
2572    ly:script-interface::print
2573    ly:sustain-pedal::print))
2574
2575 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2576 ;; and the print function is not pure, but there is a easy way to
2577 ;; figure out the Y-extent from the print function.
2578 (define pure-print-to-height-conversions
2579   `(
2580     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2581     (,ly:arpeggio::brew-chord-bracket . ,ly:arpeggio::pure-height)
2582     (,ly:arpeggio::brew-chord-slur . ,ly:arpeggio::pure-height)
2583     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2584     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2585
2586 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2587 (define (pure-stencil-height grob start stop)
2588   (let* ((sten (ly:grob-property-data grob 'stencil))
2589          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2590     (cond ((or
2591             (ly:stencil? sten)
2592             (memq sten pure-print-callbacks))
2593            (ly:grob::stencil-height grob))
2594           ((procedure? pure-height-callback)
2595            (pure-height-callback grob start stop))
2596           (else
2597            '(0 . 0)))))
2598
2599 ;; Sometimes, a pure callback will be chained to a non-pure callback via
2600 ;; chain_offset_callback, in which case this provides a default by simply
2601 ;; passing through the value from the pure callback.
2602 (define (pure-chain-offset-callback grob start end prev-offset) prev-offset)
2603
2604 (define pure-conversions-alist
2605   `(
2606     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2607     (,ly:axis-group-interface::calc-staff-staff-spacing . ,ly:axis-group-interface::calc-pure-staff-staff-spacing)
2608     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2609     (,ly:grob::stencil-height . ,pure-stencil-height)
2610     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2611     (,ly:rest-collision::force-shift-callback-rest . ,pure-chain-offset-callback)
2612     (,ly:rest::height . ,ly:rest::pure-height)
2613     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2614     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2615     (,ly:slur::height . ,ly:slur::pure-height)
2616     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2617     (,ly:stem::height . ,ly:stem::pure-height)
2618     (,ly:system::height . ,ly:system::calc-pure-height)))
2619
2620 (define pure-functions
2621   (list
2622    parenthesize-elements
2623    laissez-vibrer::print
2624    ly:rest::y-offset-callback
2625    ly:staff-symbol-referencer::callback
2626    ly:staff-symbol::height))
2627
2628 (define-public (pure-relevant? grob)
2629   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2630     (not (eq? #f
2631               (or
2632                (pair? extent-callback)
2633                (memq extent-callback pure-functions)
2634                (and
2635                 (pair? (assq extent-callback pure-conversions-alist))
2636                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2637                   (or
2638                    (not (eq? extent-callback ly:grob::stencil-height))
2639                    (memq stencil pure-print-callbacks)
2640                    (assq stencil pure-print-to-height-conversions)
2641                    (ly:stencil? stencil)))))))))
2642
2643 (define-public (call-pure-function unpure args start end)
2644   (if (ly:simple-closure? unpure)
2645       (ly:eval-simple-closure (car args) unpure start end)
2646       (if (not (procedure? unpure))
2647           unpure
2648           (if (memq unpure pure-functions)
2649               (apply unpure args)
2650               (let ((pure (assq unpure pure-conversions-alist)))
2651                 (if pure
2652                     (apply (cdr pure)
2653                            (append
2654                             (list (car args) start end)
2655                             (cdr args)))))))))