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