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