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