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