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