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