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