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