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