]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Merge branch 'master' into lilypond/translation
[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                                 ligature-head-interface
1443                                 mensural-ligature-interface
1444                                 note-head-interface
1445                                 rhythmic-grob-interface
1446                                 rhythmic-head-interface
1447                                 staff-symbol-referencer-interface
1448                                 vaticana-ligature-interface))))))
1449
1450     (NoteName
1451      . (
1452         (stencil . ,ly:text-interface::print)
1453         (meta . ((class . Item)
1454                  (interfaces . (font-interface
1455                                 note-name-interface
1456                                 text-interface))))))
1457
1458     (NoteSpacing
1459      . (
1460         ;; Changed this from 0.75.
1461         ;; If you ever change this back, please document! --hwn
1462         (knee-spacing-correction . 1.0)
1463         (same-direction-correction . 0.25)
1464         (space-to-barline . #t)
1465         (stem-spacing-correction . 0.5)
1466         (meta . ((class . Item)
1467                  (interfaces . (note-spacing-interface
1468                                 spacing-interface))))))
1469
1470
1471     (OctavateEight
1472      . (
1473         (break-visibility . ,inherit-x-parent-visibility)
1474         (font-shape . italic)
1475         (font-size . -4)
1476         (self-alignment-X . ,CENTER)
1477         (staff-padding . 0.2)
1478         (stencil . ,ly:text-interface::print)
1479         (X-offset . ,(ly:make-simple-closure
1480                       `(,+
1481                         ,(ly:make-simple-closure
1482                           (list ly:self-alignment-interface::x-aligned-on-self))
1483                         ,(ly:make-simple-closure
1484                           (list ly:self-alignment-interface::centered-on-x-parent)))))
1485         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1486         (meta . ((class . Item)
1487                  (interfaces . (font-interface
1488                                 self-alignment-interface
1489                                 side-position-interface
1490                                 text-interface))))))
1491
1492     (OttavaBracket
1493      . (
1494         (dash-fraction . 0.3)
1495         (direction . ,UP)
1496         (edge-height . (0 . 1.2))
1497         (font-shape . italic)
1498         (minimum-length . 1.0)
1499         (outside-staff-priority . 400)
1500         (padding . 0.5)
1501         (shorten-pair . (0.0 . -0.6))
1502         (staff-padding . 1.0)
1503         (stencil . ,ly:ottava-bracket::print)
1504         (style . dashed-line)
1505         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1506         (meta . ((class . Spanner)
1507                  (interfaces . (font-interface
1508                                 horizontal-bracket-interface
1509                                 line-interface
1510                                 ottava-bracket-interface
1511                                 side-position-interface
1512                                 text-interface))))))
1513
1514
1515     (PaperColumn
1516      . (
1517         (allow-loose-spacing . #t)
1518         (axes . (,X))
1519         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1520         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1521         (keep-inside-line . #t)
1522         ;; (stencil . ,ly:paper-column::print)
1523         (X-extent . ,ly:axis-group-interface::width)
1524
1525         ;; debugging
1526         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1527         (meta . ((class . Paper_column)
1528                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1529                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1530                  (interfaces . (axis-group-interface
1531                                 font-interface
1532                                 paper-column-interface
1533                                 separation-item-interface
1534                                 spaceable-grob-interface))))))
1535
1536     (ParenthesesItem
1537      . (
1538         (font-size . -6)
1539         (padding . 0.2)
1540         (stencil . ,parentheses-item::print)
1541         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1542         (meta . ((class . Item)
1543                  (interfaces . (font-interface
1544                                 parentheses-interface))))))
1545
1546     (PercentRepeat
1547      . (
1548         (dot-negative-kern . 0.75)
1549         (font-encoding . fetaMusic)
1550         (slope . 1.0)
1551         (spacing-pair . (break-alignment . staff-bar))
1552         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1553         (stencil . ,ly:multi-measure-rest::percent)
1554         (thickness . 0.48)
1555         (meta . ((class . Spanner)
1556                  (interfaces . (font-interface
1557                                 multi-measure-rest-interface
1558                                 percent-repeat-interface))))))
1559
1560     (PercentRepeatCounter
1561      . (
1562         (direction . ,UP)
1563         (font-encoding . fetaText)
1564         (font-size . -2)
1565         (padding . 0.2)
1566         (self-alignment-X . ,CENTER)
1567         (staff-padding . 0.25)
1568         (stencil . ,ly:text-interface::print)
1569         (X-offset . ,(ly:make-simple-closure
1570                       `(,+
1571                         ,(ly:make-simple-closure
1572                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1573                         ,(ly:make-simple-closure
1574                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1575         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1576         (meta . ((class . Spanner)
1577                  (interfaces . (font-interface
1578                                 percent-repeat-interface
1579                                 self-alignment-interface
1580                                 side-position-interface
1581                                 text-interface))))))
1582
1583     (PhrasingSlur
1584      . (
1585         (control-points . ,ly:slur::calc-control-points)
1586         (cross-staff . ,ly:slur::calc-cross-staff)
1587         (details . ,default-slur-details)
1588         (direction . ,ly:slur::calc-direction)
1589         (height-limit . 2.0)
1590         (minimum-length . 1.5)
1591         (ratio . 0.333)
1592         (spanner-id . "")
1593         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1594         (stencil . ,ly:slur::print)
1595         (thickness . 1.1)
1596         (Y-extent . ,ly:slur::height)
1597         (meta . ((class . Spanner)
1598                  (interfaces . (slur-interface))))))
1599
1600     ;; an example of a text spanner
1601     (PianoPedalBracket
1602      . (
1603         (bound-padding . 1.0)
1604         (bracket-flare . (0.5 . 0.5))
1605         (direction . ,DOWN)
1606         (edge-height . (1.0 . 1.0))
1607         (shorten-pair . (0.0 . 0.0))
1608         (stencil . ,ly:piano-pedal-bracket::print)
1609         (style . line)
1610         (thickness .  1.0)
1611         (meta . ((class . Spanner)
1612                  (interfaces . (line-interface
1613                                 piano-pedal-bracket-interface
1614                                 piano-pedal-interface))))))
1615
1616
1617     (RehearsalMark
1618      . (
1619         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1620         (baseline-skip . 2)
1621         (break-align-symbols . (staff-bar clef))
1622         (break-visibility . ,end-of-line-invisible)
1623         (direction . ,UP)
1624         (extra-spacing-width . (+inf.0 . -inf.0))
1625         (font-size . 2)
1626         (non-musical . #t)
1627         (outside-staff-priority . 1500)
1628         (padding . 0.8)
1629         (self-alignment-X . ,CENTER)
1630         (stencil . ,ly:text-interface::print)
1631         (X-offset . ,(ly:make-simple-closure
1632                       `(,+
1633                         ,(ly:make-simple-closure
1634                           (list ly:break-alignable-interface::self-align-callback))
1635                         ,(ly:make-simple-closure
1636                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1637         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1638         (meta . ((class . Item)
1639                  (interfaces . (break-alignable-interface
1640                                 font-interface
1641                                 mark-interface
1642                                 self-alignment-interface
1643                                 side-position-interface
1644                                 text-interface))))))
1645
1646     (RepeatSlash
1647      . (
1648         (slash-negative-kern . 0.85)
1649         (slope . 1.7)
1650         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1651         (thickness . 0.48)
1652         (meta . ((class . Item)
1653                  (interfaces . (percent-repeat-interface
1654                                 percent-repeat-item-interface
1655                                 rhythmic-grob-interface))))))
1656
1657     (RepeatTie
1658      . (
1659         (control-points . ,ly:semi-tie::calc-control-points)
1660         (details . ((ratio . 0.333)
1661                     (height-limit . 1.0)))
1662         (direction . ,ly:tie::calc-direction)
1663         (head-direction . ,RIGHT)
1664         (stencil  . ,ly:tie::print)
1665         (thickness . 1.0)
1666         (extra-spacing-height . (-0.5 . 0.5))
1667         (meta . ((class . Item)
1668                  (interfaces . (semi-tie-interface))))))
1669
1670     (RepeatTieColumn
1671      . (
1672         (direction . ,ly:tie::calc-direction)
1673         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1674         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1675         (X-extent . #f)
1676         (Y-extent . #f)
1677         (meta . ((class . Item)
1678                  (interfaces . (semi-tie-column-interface))))))
1679
1680     (Rest
1681      . (
1682         (cross-staff . ,ly:rest::calc-cross-staff)
1683         (duration-log . ,stem::calc-duration-log)
1684         (minimum-distance . 0.25)
1685         (stencil . ,ly:rest::print)
1686         (X-extent . ,ly:rest::width)
1687         (Y-extent . ,ly:rest::height)
1688         (Y-offset . ,ly:rest::y-offset-callback)
1689         (meta . ((class . Item)
1690                  (interfaces . (font-interface
1691                                 rest-interface
1692                                 rhythmic-grob-interface
1693                                 rhythmic-head-interface
1694                                 staff-symbol-referencer-interface))))))
1695
1696     (RestCollision
1697      . (
1698         (minimum-distance . 0.75)
1699         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1700         (meta . ((class . Item)
1701                  (interfaces . (rest-collision-interface))))))
1702
1703
1704     (Script
1705      . (
1706         (add-stem-support . #t)
1707         (cross-staff . ,ly:script-interface::calc-cross-staff)
1708         (direction . ,ly:script-interface::calc-direction)
1709         (font-encoding . fetaMusic)
1710         (positioning-done . ,ly:script-interface::calc-positioning-done)
1711         (side-axis . ,Y)
1712
1713         ;; padding set in script definitions.
1714         (staff-padding . 0.25)
1715
1716         (stencil . ,ly:script-interface::print)
1717         (X-offset . ,script-interface::calc-x-offset)
1718         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1719         (meta . ((class . Item)
1720                  (interfaces . (font-interface
1721                                 script-interface
1722                                 side-position-interface))))))
1723
1724     (ScriptColumn
1725      . (
1726         (before-line-breaking . ,ly:script-column::before-line-breaking)
1727         (meta . ((class . Item)
1728                  (interfaces . (script-column-interface))))))
1729
1730     (ScriptRow
1731      . (
1732         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1733         (meta . ((class . Item)
1734                  (interfaces . (script-column-interface))))))
1735
1736     (Slur
1737      . (
1738         (avoid-slur . inside)
1739         (control-points . ,ly:slur::calc-control-points)
1740         (cross-staff . ,ly:slur::calc-cross-staff)
1741         (details . ,default-slur-details)
1742         (direction . ,ly:slur::calc-direction)
1743         (height-limit . 2.0)
1744         (line-thickness . 0.8)
1745         (minimum-length . 1.5)
1746         (ratio . 0.25)
1747         (spanner-id . "")
1748         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1749         (stencil . ,ly:slur::print)
1750         (thickness . 1.2)
1751         (Y-extent . ,ly:slur::height)
1752         (meta . ((class . Spanner)
1753                  (interfaces . (slur-interface))))))
1754
1755     (SostenutoPedal
1756      . (
1757         (direction . ,RIGHT)
1758         (extra-spacing-width . (+inf.0 . -inf.0))
1759         (font-shape . italic)
1760         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1761         (self-alignment-X . ,CENTER)
1762         (stencil . ,ly:text-interface::print)
1763         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1764         (meta . ((class . Item)
1765                  (interfaces . (font-interface
1766                                 piano-pedal-script-interface
1767                                 self-alignment-interface
1768                                 text-interface))))))
1769
1770     (SostenutoPedalLineSpanner
1771      . (
1772         (axes . (,Y))
1773         (direction . ,DOWN)
1774         (minimum-space . 1.0)
1775         (outside-staff-priority . 1000)
1776         (padding . 1.2)
1777         (side-axis . ,Y)
1778         (staff-padding . 1.0)
1779         (X-extent . ,ly:axis-group-interface::width)
1780         (Y-extent . ,ly:axis-group-interface::height)
1781         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1782         (meta . ((class . Spanner)
1783                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1784                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1785                  (interfaces . (axis-group-interface
1786                                 piano-pedal-interface
1787                                 side-position-interface))))))
1788
1789     (SpacingSpanner
1790      . (
1791         (average-spacing-wishes . #t)
1792         (base-shortest-duration . ,(ly:make-moment 3 16))
1793         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1794         (shortest-duration-space . 2.0)
1795         (spacing-increment . 1.2)
1796         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1797         (meta . ((class . Spanner)
1798                  (interfaces . (spacing-options-interface
1799                                 spacing-spanner-interface))))))
1800
1801     (SpanBar
1802      . (
1803         (allow-span-bar . #t)
1804         (bar-extent . ,ly:axis-group-interface::height)
1805         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1806         (break-align-symbol . staff-bar)
1807         (cross-staff . #t)
1808         (glyph-name . ,ly:span-bar::calc-glyph-name)
1809
1810         ;; ugh duplication! (these 4 properties were copied from Barline)
1811         ;;
1812         ;; Ross. page 151 lists other values, we opt for a leaner look
1813         ;;
1814         (kern . 3.0)
1815         (thin-kern . 3.0)
1816         (hair-thickness . 1.6)
1817         (thick-thickness . 6.0)
1818
1819         (layer . 0)
1820         (non-musical . #t)
1821         (stencil . ,ly:span-bar::print)
1822         (X-extent . ,ly:span-bar::width)
1823         (Y-extent . ,ly:axis-group-interface::height)
1824         (meta . ((class . Item)
1825                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1826                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1827                  (interfaces . (bar-line-interface
1828                                 font-interface
1829                                 span-bar-interface))))))
1830
1831     (StaffGrouper
1832      . (
1833         (staff-staff-spacing . ((basic-distance . 9)
1834                                 (minimum-distance . 7)
1835                                 (padding . 1)
1836                                 (stretchability . 5)))
1837         (staffgroup-staff-spacing . ((basic-distance . 10.5)
1838                                      (minimum-distance . 8)
1839                                      (padding . 1)
1840                                      (stretchability . 9)))
1841         (meta . ((class . Spanner)
1842                  (interfaces . (staff-grouper-interface))))))
1843
1844     (StaffSpacing
1845      . (
1846         (non-musical . #t)
1847         (stem-spacing-correction . 0.4)
1848         (meta . ((class . Item)
1849                  (interfaces . (spacing-interface
1850                                 staff-spacing-interface))))))
1851
1852     (StaffSymbol
1853      . (
1854         (layer . 0)
1855         (ledger-line-thickness . (1.0 . 0.1))
1856         (line-count . 5)
1857         (stencil . ,ly:staff-symbol::print)
1858         (Y-extent . ,ly:staff-symbol::height)
1859         (meta . ((class . Spanner)
1860                  (interfaces . (staff-symbol-interface))))))
1861
1862     (StanzaNumber
1863      . (
1864         (direction . ,LEFT)
1865         (font-series . bold)
1866         (padding . 1.0)
1867         (side-axis . ,X)
1868         (stencil . ,ly:text-interface::print)
1869         (X-offset . ,ly:side-position-interface::x-aligned-side)
1870         (meta . ((class . Item)
1871                  (interfaces . (font-interface
1872                                 side-position-interface
1873                                 stanza-number-interface
1874                                 text-interface))))))
1875
1876     (Stem
1877      . (
1878         (beamlet-default-length . (1.1 . 1.1))
1879         (beamlet-max-length-proportion . (0.75 . 0.75))
1880         (cross-staff . ,ly:stem::calc-cross-staff)
1881         (default-direction . ,ly:stem::calc-default-direction)
1882         (details
1883          . (
1884             ;; 3.5 (or 3 measured from note head) is standard length
1885             ;; 32nd, 64th, 128th flagged stems should be longer
1886             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
1887
1888             ;; FIXME.  3.5 yields too long beams (according to Ross and
1889             ;; looking at Baerenreiter examples) for a number of common
1890             ;; boundary cases.  Subtracting half a beam thickness fixes
1891             ;; this, but the bug may well be somewhere else.
1892
1893             ;; FIXME this should come from 'lengths
1894             (beamed-lengths . (3.26 3.5 3.6))
1895
1896             ;; The 'normal' minima
1897             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1898                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1899
1900             ;; The 'extreme case' minima
1901             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1902
1903             ;; Stems in unnatural (forced) direction should be shortened by
1904             ;; one staff space, according to [Roush & Gourlay].
1905             ;; Flagged stems we shorten only half a staff space.
1906             (stem-shorten . (1.0 0.5))
1907
1908             ))
1909
1910         ;; We use the normal minima as minimum for the ideal lengths,
1911         ;; and the extreme minima as abolute minimum length.
1912
1913         (direction . ,ly:stem::calc-direction)
1914         (duration-log . ,stem::calc-duration-log)
1915         (flag . ,ly:stem::calc-flag)
1916         (length . ,ly:stem::calc-length)
1917         (neutral-direction . ,DOWN)
1918         (positioning-done . ,ly:stem::calc-positioning-done)
1919         (stem-end-position . ,ly:stem::calc-stem-end-position)
1920         (stem-info . ,ly:stem::calc-stem-info)
1921         (stencil . ,ly:stem::print)
1922         (thickness . 1.3)
1923         (X-extent . ,ly:stem::width)
1924         (X-offset . ,ly:stem::offset-callback)
1925         (Y-extent . ,ly:stem::height)
1926         (Y-offset . ,ly:staff-symbol-referencer::callback)
1927         (meta . ((class . Item)
1928                  (interfaces . (font-interface
1929                                 stem-interface))))))
1930
1931     (StemTremolo
1932      . (
1933         (beam-thickness . 0.48) ; staff-space
1934         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1935         (slope . ,ly:stem-tremolo::calc-slope)
1936         (stencil . ,ly:stem-tremolo::print)
1937         (style . ,ly:stem-tremolo::calc-style)
1938         (X-extent . ,ly:stem-tremolo::width)
1939         (Y-extent . ,ly:stem-tremolo::height)
1940         (meta . ((class . Item)
1941                  (interfaces . (stem-tremolo-interface))))))
1942
1943     (StringNumber
1944      . (
1945         (avoid-slur . around)
1946         (font-encoding . fetaText)
1947         (font-size . -5)                ; don't overlap when next to heads.
1948         (padding . 0.5)
1949         (script-priority . 100)
1950         (self-alignment-X . ,CENTER)
1951         (self-alignment-Y . ,CENTER)
1952         (staff-padding . 0.5)
1953         (stencil . ,print-circled-text-callback)
1954         (text . ,string-number::calc-text)
1955         (meta . ((class . Item)
1956                  (interfaces . (font-interface
1957                                 self-alignment-interface
1958                                 side-position-interface
1959                                 string-number-interface
1960                                 text-interface
1961                                 text-script-interface))))))
1962
1963     (StrokeFinger
1964      . (
1965         (digit-names . #("p" "i" "m" "a" "x"))
1966         (font-shape . italic)
1967         (font-size . -4)                ; don't overlap when next to heads.
1968         (padding . 0.5)
1969         (script-priority . 100)
1970         (self-alignment-X . ,CENTER)
1971         (self-alignment-Y . ,CENTER)
1972         (staff-padding . 0.5)
1973         (stencil . ,ly:text-interface::print)
1974         (text . ,stroke-finger::calc-text)
1975         (meta . ((class . Item)
1976                  (interfaces . (font-interface
1977                                 self-alignment-interface
1978                                 side-position-interface
1979                                 stroke-finger-interface
1980                                 text-interface
1981                                 text-script-interface))))))
1982
1983     (SustainPedal
1984      . (
1985         (direction . ,RIGHT)
1986         (extra-spacing-width . (+inf.0 . -inf.0))
1987         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1988         (self-alignment-X . ,CENTER)
1989         (stencil . ,ly:sustain-pedal::print)
1990         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1991         (meta . ((class . Item)
1992                  (interfaces . (font-interface
1993                                 piano-pedal-interface
1994                                 piano-pedal-script-interface
1995                                 self-alignment-interface
1996                                 text-interface))))))
1997
1998     (SustainPedalLineSpanner
1999      . (
2000         (axes . (,Y))
2001         (direction . ,DOWN)
2002         (minimum-space . 1.0)
2003         (outside-staff-priority . 1000)
2004         (padding . 1.2)
2005         (side-axis . ,Y)
2006         (staff-padding . 1.2)
2007         (X-extent . ,ly:axis-group-interface::width)
2008         (Y-extent . ,ly:axis-group-interface::height)
2009         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2010         (meta . ((class . Spanner)
2011                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2012                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2013                  (interfaces . (axis-group-interface
2014                                 piano-pedal-interface
2015                                 side-position-interface))))))
2016
2017     (System
2018      . (
2019         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2020         (axes . (,X ,Y))
2021         (skyline-horizontal-padding . 0.5)
2022         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2023         (X-extent . ,ly:axis-group-interface::width)
2024         (Y-extent . ,ly:system::height)
2025         (meta . ((class . System)
2026                  (object-callbacks . ((pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
2027                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2028                  (interfaces . (axis-group-interface
2029                                 system-interface))))))
2030
2031     (SystemStartBar
2032      . (
2033         (collapse-height . 5.0)
2034         (direction . ,LEFT)
2035
2036         ;; ugh--hardcoded.
2037         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
2038         (stencil . ,ly:system-start-delimiter::print)
2039         (style . bar-line)
2040         (thickness . 1.6)
2041         (X-offset . ,ly:side-position-interface::x-aligned-side)
2042         (Y-extent . #f)
2043         (meta . ((class . Spanner)
2044                  (interfaces . (side-position-interface
2045                                 system-start-delimiter-interface))))))
2046
2047     (SystemStartBrace
2048      . (
2049         (collapse-height . 5.0)
2050         (direction . ,LEFT)
2051         (font-encoding . fetaBraces)
2052         (padding . 0.3)
2053         (stencil . ,ly:system-start-delimiter::print)
2054         (style . brace)
2055         (X-offset . ,ly:side-position-interface::x-aligned-side)
2056         (Y-extent . #f)
2057         (meta . ((class . Spanner)
2058                  (interfaces . (font-interface
2059                                 side-position-interface
2060                                 system-start-delimiter-interface))))))
2061
2062     (SystemStartBracket
2063      . (
2064         (collapse-height . 5.0)
2065         (direction . ,LEFT)
2066         (padding . 0.8)
2067         (stencil . ,ly:system-start-delimiter::print)
2068         (style . bracket)
2069         (thickness . 0.45)
2070         (X-offset . ,ly:side-position-interface::x-aligned-side)
2071         (Y-extent . #f)
2072         (meta . ((class . Spanner)
2073                  (interfaces . (font-interface
2074                                 side-position-interface
2075                                 system-start-delimiter-interface))))))
2076
2077     (SystemStartSquare
2078      . (
2079         (direction . ,LEFT)
2080         (stencil . ,ly:system-start-delimiter::print)
2081         (style . line-bracket)
2082         (thickness . 1.0)
2083         (X-offset . ,ly:side-position-interface::x-aligned-side)
2084         (Y-extent . #f)
2085         (meta . ((class . Spanner)
2086                  (interfaces . (font-interface
2087                                 side-position-interface
2088                                 system-start-delimiter-interface))))))
2089
2090
2091     (TabNoteHead
2092      . (
2093         (details . ((cautionary-properties . ((angularity . 0.4)
2094                                               (half-thickness . 0.075)
2095                                               (padding . 0)
2096                                               (procedure . ,parenthesize-stencil)
2097                                               (width . 0.25)))
2098                     (head-offset . 3/5)
2099                     (harmonic-properties . ((angularity . 2)
2100                                             (half-thickness . 0.075)
2101                                             (padding . 0)
2102                                             (procedure . ,parenthesize-stencil)
2103                                             (width . 0.25)))
2104                     (repeat-tied-properties . ((note-head-visible . #t)
2105                                                (parenthesize . #t)))
2106                     (tied-properties . ((break-visibility . ,begin-of-line-visible)
2107                                         (parenthesize . #t)))))
2108
2109         (direction . ,CENTER)
2110         (duration-log . ,note-head::calc-duration-log)
2111         (font-series . bold)
2112         (font-size . -2)
2113         (stem-attachment . (0.0 . 1.35))
2114         (stencil . ,tab-note-head::print)
2115         (whiteout . #t)
2116         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2117         (Y-offset . ,ly:staff-symbol-referencer::callback)
2118         (meta . ((class . Item)
2119                  (interfaces  . (font-interface
2120                                  note-head-interface
2121                                  rhythmic-grob-interface
2122                                  rhythmic-head-interface
2123                                  staff-symbol-referencer-interface
2124                                  tab-note-head-interface
2125                                  text-interface))))))
2126
2127     (TextScript
2128      . (
2129         (avoid-slur . around)
2130         (cross-staff . ,ly:script-interface::calc-cross-staff)
2131         (direction . ,DOWN)
2132         (extra-spacing-width . (+inf.0 . -inf.0))
2133         (outside-staff-priority . 450)
2134
2135         ;; sync with Fingering ?
2136         (padding . 0.5)
2137
2138         (script-priority . 200)
2139         (side-axis . ,Y)
2140         (slur-padding . 0.5)
2141         (staff-padding . 0.5)
2142         (stencil . ,ly:text-interface::print)
2143         ;; todo: add X self alignment?
2144         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2145         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2146         (meta . ((class . Item)
2147                  (interfaces . (font-interface
2148                                 instrument-specific-markup-interface
2149                                 self-alignment-interface
2150                                 side-position-interface
2151                                 text-interface
2152                                 text-script-interface))))))
2153
2154     (TextSpanner
2155      . (
2156         (bound-details . ((left . ((Y . 0)
2157                                    (padding . 0.25)
2158                                    (attach-dir . ,LEFT)
2159                                    ))
2160                           (left-broken . ((end-on-note . #t)))
2161                           (right . ((Y . 0)
2162                                     (padding . 0.25)
2163                                     ))
2164                           ))
2165         (dash-fraction . 0.2)
2166         (dash-period . 3.0)
2167         (direction . ,UP)
2168         (font-shape . italic)
2169         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2170         (outside-staff-priority . 350)
2171         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2172         (side-axis . ,Y)
2173         (staff-padding . 0.8)
2174         (stencil . ,ly:line-spanner::print)
2175         (style . dashed-line)
2176         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2177
2178         (meta . ((class . Spanner)
2179                  (interfaces . (font-interface
2180                                 line-interface
2181                                 line-spanner-interface
2182                                 side-position-interface))))))
2183
2184     (Tie
2185      . (
2186         (avoid-slur . inside)
2187         (control-points . ,ly:tie::calc-control-points)
2188         (details . (
2189                     ;; for a full list, see tie-details.cc
2190                     (ratio . 0.333)
2191                     (center-staff-line-clearance . 0.6)
2192                     (tip-staff-line-clearance . 0.45)
2193                     (note-head-gap . 0.2)
2194                     (stem-gap . 0.35)
2195                     (height-limit . 1.0)
2196                     (horizontal-distance-penalty-factor . 10)
2197                     (same-dir-as-stem-penalty . 8)
2198                     (min-length-penalty-factor . 26)
2199                     (tie-tie-collision-distance . 0.45)
2200                     (tie-tie-collision-penalty . 25.0)
2201                     (intra-space-threshold . 1.25)
2202                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2203                     (outer-tie-length-symmetry-penalty-factor . 10)
2204                     (vertical-distance-penalty-factor . 7)
2205                     (outer-tie-vertical-gap . 0.25)
2206                     (multi-tie-region-size . 3)
2207                     (single-tie-region-size . 4)
2208                     (between-length-limit . 1.0)))
2209
2210         (direction . ,ly:tie::calc-direction)
2211         (font-size . -6)
2212         (line-thickness . 0.8)
2213         (neutral-direction . ,UP)
2214         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2215         (stencil . ,ly:tie::print)
2216         (thickness . 1.2)
2217         (meta . ((class . Spanner)
2218                  (interfaces . (tie-interface))))))
2219
2220     (TieColumn
2221      . (
2222         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2223         (positioning-done . ,ly:tie-column::calc-positioning-done)
2224         (X-extent . #f)
2225         (Y-extent . #f)
2226         (meta . ((class . Spanner)
2227                  (interfaces . (tie-column-interface))))))
2228
2229     (TimeSignature
2230      . (
2231         (avoid-slur . inside)
2232         (break-align-anchor
2233          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2234         (break-align-symbol . time-signature)
2235         (break-align-anchor-alignment . ,LEFT)
2236         (break-visibility . ,all-visible)
2237         (extra-spacing-height . (-1.0 . 1.0))
2238         (non-musical . #t)
2239         (space-alist . (
2240                         (cue-clef . (extra-space . 1.5))
2241                         (first-note . (fixed-space . 2.0))
2242                         (right-edge . (extra-space . 0.5))
2243                         (staff-bar . (minimum-space . 2.0))))
2244         (stencil . ,ly:time-signature::print)
2245         (style . C)
2246         (meta . ((class . Item)
2247                  (interfaces . (break-aligned-interface
2248                                 font-interface
2249                                 time-signature-interface))))))
2250
2251     (TrillPitchAccidental
2252      . (
2253         (direction . ,LEFT)
2254         (font-size . -4)
2255         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2256         (padding . 0.2)
2257         (side-axis . ,X)
2258         (stencil . ,ly:accidental-interface::print)
2259         (X-offset . ,ly:side-position-interface::x-aligned-side)
2260         (Y-extent . ,ly:accidental-interface::height)
2261         (meta . ((class . Item)
2262                  (interfaces . (accidental-interface
2263                                 font-interface
2264                                 inline-accidental-interface
2265                                 side-position-interface
2266                                 trill-pitch-accidental-interface))))))
2267
2268     (TrillPitchGroup
2269      . (
2270         (axes . (,X))
2271         (direction . ,RIGHT)
2272         (font-size . -4)
2273         (padding . 0.3)
2274         (side-axis . ,X)
2275         (stencil . ,parenthesize-elements)
2276         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2277         (X-offset . ,ly:side-position-interface::x-aligned-side)
2278         (meta . ((class . Item)
2279                  (interfaces . (axis-group-interface
2280                                 font-interface
2281                                 note-head-interface
2282                                 parentheses-interface
2283                                 side-position-interface))))))
2284
2285     (TrillPitchHead
2286      . (
2287         (duration-log . 2)
2288         (font-size . -4)
2289         (stencil . ,ly:note-head::print)
2290         (Y-offset . ,ly:staff-symbol-referencer::callback)
2291         (meta . ((class . Item)
2292                  (interfaces . (font-interface
2293                                 ledgered-interface
2294                                 pitched-trill-interface
2295                                 rhythmic-head-interface
2296                                 staff-symbol-referencer-interface))))))
2297
2298     (TrillSpanner
2299      . (
2300         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2301         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2302                                    (Y . 0)
2303                                    (stencil-offset . (-0.5 . -1))
2304                                    (padding . 0.5)
2305                                    (attach-dir . ,CENTER)
2306                                    ))
2307                           (left-broken . ((end-on-note . #t)))
2308                           (right . ((Y . 0)))
2309                           ))
2310         (direction . ,UP)
2311         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2312         (outside-staff-priority . 50)
2313         (padding . 0.5)
2314         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2315         (side-axis . ,Y)
2316         (staff-padding . 1.0)
2317         (stencil . ,ly:line-spanner::print)
2318         (style . trill)
2319         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2320         (meta . ((class . Spanner)
2321                  (interfaces . (font-interface
2322                                 line-interface
2323                                 line-spanner-interface
2324                                 side-position-interface
2325                                 trill-spanner-interface))))))
2326
2327     (TupletBracket
2328      . (
2329         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2330         (control-points . ,ly:tuplet-bracket::calc-control-points)
2331         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2332         (direction  . ,ly:tuplet-bracket::calc-direction)
2333         (edge-height . (0.7 . 0.7))
2334         (full-length-to-extent . #t)
2335         (padding . 1.1)
2336         (positions . ,ly:tuplet-bracket::calc-positions)
2337         (shorten-pair . (-0.2 . -0.2))
2338         (staff-padding . 0.25)
2339         (stencil . ,ly:tuplet-bracket::print)
2340         (thickness . 1.6)
2341
2342         (meta . ((class . Spanner)
2343                  (interfaces . (line-interface
2344                                 tuplet-bracket-interface))))))
2345
2346     (TupletNumber
2347      . (
2348         (avoid-slur . inside)
2349         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2350         (direction . ,tuplet-number::calc-direction)
2351         (font-shape . italic)
2352         (font-size . -2)
2353         (stencil . ,ly:tuplet-number::print)
2354         (text . ,tuplet-number::calc-denominator-text)
2355         (meta . ((class . Spanner)
2356                  (interfaces . (font-interface
2357                                 text-interface
2358                                 tuplet-number-interface))))))
2359
2360
2361     (UnaCordaPedal
2362      . (
2363         (direction . ,RIGHT)
2364         (extra-spacing-width . (+inf.0 . -inf.0))
2365         (font-shape . italic)
2366         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2367         (self-alignment-X . ,CENTER)
2368         (stencil . ,ly:text-interface::print)
2369         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2370         (meta . ((class . Item)
2371                  (interfaces . (font-interface
2372                                 piano-pedal-script-interface
2373                                 self-alignment-interface
2374                                 text-interface))))))
2375
2376     (UnaCordaPedalLineSpanner
2377      . (
2378         (axes . (,Y))
2379         (direction . ,DOWN)
2380         (minimum-space . 1.0)
2381         (outside-staff-priority . 1000)
2382         (padding . 1.2)
2383         (side-axis . ,Y)
2384         (staff-padding . 1.2)
2385         (X-extent . ,ly:axis-group-interface::width)
2386         (Y-extent . ,ly:axis-group-interface::height)
2387         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2388         (meta . ((class . Spanner)
2389                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2390                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2391                  (interfaces . (axis-group-interface
2392                                 piano-pedal-interface
2393                                 side-position-interface))))))
2394
2395
2396     (VaticanaLigature
2397      . (
2398         (flexa-width . 2.0)
2399         (stencil . ,ly:vaticana-ligature::print)
2400         (thickness . 0.6)
2401         (meta . ((class . Spanner)
2402                  (interfaces . (font-interface
2403                                 vaticana-ligature-interface))))))
2404
2405     (VerticalAlignment
2406      . (
2407         (axes . (,Y))
2408         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2409         (stacking-dir . -1)
2410         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2411         (X-extent . ,ly:axis-group-interface::width)
2412         (Y-extent . ,ly:axis-group-interface::height)
2413         (meta . ((class . Spanner)
2414                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2415                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2416                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2417                  (interfaces . (align-interface
2418                                 axis-group-interface))))))
2419
2420     (VerticalAxisGroup
2421      . (
2422         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2423         (axes . (,Y))
2424         (default-staff-staff-spacing . ((basic-distance . 9)
2425                                         (minimum-distance . 8)
2426                                         (padding . 1)))
2427         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2428         (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing)
2429         (stencil . ,ly:axis-group-interface::print)
2430         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2431         (X-extent . ,ly:axis-group-interface::width)
2432         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2433         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2434         (meta . ((class . Spanner)
2435                  (object-callbacks . (
2436                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2437                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2438                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2439
2440                  (interfaces . (axis-group-interface
2441                                 hara-kiri-group-spanner-interface))))))
2442
2443     (VoiceFollower
2444      . (
2445         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2446         (bound-details . ((right . ((attach-dir .  ,CENTER)
2447                                     (padding . 1.5)
2448                                       ))
2449                           (left . ((attach-dir .  ,CENTER)
2450                                    (padding . 1.5)
2451                                       ))
2452                           ))
2453         (gap . 0.5)
2454         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2455         (non-musical . #t)
2456         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2457         (stencil . ,ly:line-spanner::print)
2458         (style . line)
2459         (X-extent . #f)
2460         (Y-extent . #f)
2461         (meta . ((class . Spanner)
2462                  (interfaces . (line-interface
2463                                 line-spanner-interface))))))
2464
2465     (VoltaBracket
2466      . (
2467         (direction . ,UP)
2468         (edge-height . (2.0 . 2.0)) ;; staff-space;
2469         (font-encoding . fetaText)
2470         (font-size . -4)
2471         (stencil . ,ly:volta-bracket-interface::print)
2472         (thickness . 1.6) ;; line-thickness
2473         (word-space . 0.6)
2474         (meta . ((class . Spanner)
2475                  (interfaces . (font-interface
2476                                 horizontal-bracket-interface
2477                                 line-interface
2478                                 side-position-interface
2479                                 text-interface
2480                                 volta-bracket-interface
2481                                 volta-interface))))))
2482
2483     (VoltaBracketSpanner
2484      . (
2485         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2486         (axes . (,Y))
2487         (direction . ,UP)
2488         (no-alignment . #t)
2489         (outside-staff-priority . 600)
2490         (padding . 1)
2491         (side-axis . ,Y)
2492         (X-extent . ,ly:axis-group-interface::width)
2493         (Y-extent . ,ly:axis-group-interface::height)
2494         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2495         (meta . ((class . Spanner)
2496                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2497                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2498                  (interfaces . (axis-group-interface
2499                                 side-position-interface
2500                                 volta-interface))))))
2501
2502 ))
2503
2504 (define (completize-grob-entry x)
2505   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2506 "
2507   ;;  (display (car x))
2508   ;;  (newline)
2509   (let* ((name-sym  (car x))
2510          (grob-entry (cdr x))
2511          (meta-entry (assoc-get 'meta grob-entry))
2512          (class (assoc-get 'class meta-entry))
2513          (ifaces-entry
2514           (assoc-get 'interfaces meta-entry)))
2515
2516     (cond
2517      ((eq? 'Item class)
2518       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2519      ((eq? 'Spanner class)
2520       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2521      ((eq? 'Paper_column class)
2522       (set! ifaces-entry (cons 'item-interface
2523                                (cons 'paper-column-interface ifaces-entry))))
2524      ((eq? 'System class)
2525       (set! ifaces-entry (cons 'system-interface
2526                                (cons 'spanner-interface ifaces-entry))))
2527      (else
2528       (ly:warning "Unknown class ~a" class)))
2529
2530     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2531     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2532
2533     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2534     (set! meta-entry (assoc-set! meta-entry 'interfaces
2535                                  ifaces-entry))
2536     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2537     (cons name-sym grob-entry)))
2538
2539 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2540
2541 ;;  (display (map pair? all-grob-descriptions))
2542
2543 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2544
2545 (map (lambda (x)
2546        ;; (display (car x)) (newline)
2547
2548        (set-object-property! (car x) 'translation-type? list?)
2549        (set-object-property! (car x) 'is-grob? #t))
2550      all-grob-descriptions)
2551
2552 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2553
2554 (define (volta-bracket-interface::pure-height grob start end)
2555   (let ((edge-height (ly:grob-property grob 'edge-height)))
2556     (if (number-pair? edge-height)
2557         (let ((smaller (min (car edge-height) (cdr edge-height)))
2558               (larger (max (car edge-height) (cdr edge-height))))
2559           (interval-union '(0 . 0) (cons smaller larger)))
2560         '(0 . 0))))
2561
2562 (define pure-print-callbacks
2563   (list
2564    fret-board::calc-stencil
2565    note-head::brew-ez-stencil
2566    print-circled-text-callback
2567    laissez-vibrer::print
2568    lyric-text::print
2569    ly:bar-line::print
2570    ly:mensural-ligature::brew-ligature-primitive
2571    ly:note-head::print
2572    ly:dots::print
2573    ly:clef::print
2574    ly:key-signature-interface::print
2575    ly:percent-repeat-item-interface::beat-slash
2576    ly:text-interface::print
2577    ly:script-interface::print
2578    ly:sustain-pedal::print))
2579
2580 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2581 ;; and the print function is not pure, but there is a easy way to
2582 ;; figure out the Y-extent from the print function.
2583 (define pure-print-to-height-conversions
2584   `(
2585     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2586     (,ly:arpeggio::brew-chord-bracket . ,ly:arpeggio::pure-height)
2587     (,ly:arpeggio::brew-chord-slur . ,ly:arpeggio::pure-height)
2588     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2589     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2590
2591 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2592 (define (pure-stencil-height grob start stop)
2593   (let* ((sten (ly:grob-property-data grob 'stencil))
2594          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2595     (cond ((or
2596             (ly:stencil? sten)
2597             (memq sten pure-print-callbacks))
2598            (ly:grob::stencil-height grob))
2599           ((procedure? pure-height-callback)
2600            (pure-height-callback grob start stop))
2601           (else
2602            '(0 . 0)))))
2603
2604 ;; Sometimes, a pure callback will be chained to a non-pure callback via
2605 ;; chain_offset_callback, in which case this provides a default by simply
2606 ;; passing through the value from the pure callback.
2607 (define (pure-chain-offset-callback grob start end prev-offset) prev-offset)
2608
2609 (define pure-conversions-alist
2610   `(
2611     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2612     (,ly:axis-group-interface::calc-staff-staff-spacing . ,ly:axis-group-interface::calc-pure-staff-staff-spacing)
2613     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2614     (,ly:grob::stencil-height . ,pure-stencil-height)
2615     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2616     (,ly:rest-collision::force-shift-callback-rest . ,pure-chain-offset-callback)
2617     (,ly:rest::height . ,ly:rest::pure-height)
2618     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2619     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2620     (,ly:slur::height . ,ly:slur::pure-height)
2621     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2622     (,ly:stem::height . ,ly:stem::pure-height)
2623     (,ly:system::height . ,ly:system::calc-pure-height)))
2624
2625 (define pure-functions
2626   (list
2627    parenthesize-elements
2628    laissez-vibrer::print
2629    ly:rest::y-offset-callback
2630    ly:staff-symbol-referencer::callback
2631    ly:staff-symbol::height))
2632
2633 (define-public (pure-relevant? grob)
2634   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2635     (not (eq? #f
2636               (or
2637                (pair? extent-callback)
2638                (memq extent-callback pure-functions)
2639                (and
2640                 (pair? (assq extent-callback pure-conversions-alist))
2641                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2642                   (or
2643                    (not (eq? extent-callback ly:grob::stencil-height))
2644                    (memq stencil pure-print-callbacks)
2645                    (assq stencil pure-print-to-height-conversions)
2646                    (ly:stencil? stencil)))))))))
2647
2648 (define-public (call-pure-function unpure args start end)
2649   (if (ly:simple-closure? unpure)
2650       (ly:eval-simple-closure (car args) unpure start end)
2651       (if (not (procedure? unpure))
2652           unpure
2653           (if (memq unpure pure-functions)
2654               (apply unpure args)
2655               (let ((pure (assq unpure pure-conversions-alist)))
2656                 (if pure
2657                     (apply (cdr pure)
2658                            (append
2659                             (list (car args) start end)
2660                             (cdr args)))))))))