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