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