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