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