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