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