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