]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Makes all side-positioning based on skylines instead of boxes.
[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         (staff-padding . 0.5)
1337         (stencil . ,measure-counter-stencil)
1338         (meta . ((class . Spanner)
1339                  (interfaces . (font-interface
1340                                 measure-counter-interface
1341                                 self-alignment-interface
1342                                 text-interface))))))
1343
1344     (MeasureGrouping
1345      . (
1346         (direction . ,UP)
1347         (height . 2.0)
1348         (padding . 2)
1349         (side-axis . ,Y)
1350         (staff-padding . 3)
1351         (stencil . ,ly:measure-grouping::print)
1352         (thickness . 1)
1353         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1354         (meta . ((class . Spanner)
1355                  (interfaces . (measure-grouping-interface
1356                                 side-position-interface))))))
1357
1358     (MelodyItem
1359      . (
1360         (neutral-direction . ,DOWN)
1361         (meta . ((class . Item)
1362                  (interfaces . (melody-spanner-interface))))))
1363
1364     (MensuralLigature
1365      . (
1366         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1367         (stencil . ,ly:mensural-ligature::print)
1368         (thickness . 1.3)
1369         (meta . ((class . Spanner)
1370                  (interfaces . (font-interface
1371                                 mensural-ligature-interface))))))
1372
1373     (MetronomeMark
1374      . (
1375         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1376         (break-visibility . ,end-of-line-invisible)
1377         (direction . ,UP)
1378         (extra-spacing-width . (+inf.0 . -inf.0))
1379         (outside-staff-horizontal-padding . 0.12)
1380         (outside-staff-priority . 1000)
1381         (padding . 0.8)
1382         (side-axis . ,Y)
1383         (stencil . ,ly:text-interface::print)
1384         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1385         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1386         (X-offset . ,(ly:make-simple-closure
1387                       `(,+
1388                         ,(ly:make-simple-closure
1389                           (list ly:break-alignable-interface::self-align-callback))
1390                         ,(ly:make-simple-closure
1391                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1392         (self-alignment-X . ,LEFT)
1393         (break-align-symbols . (time-signature))
1394         (non-break-align-symbols . (multi-measure-rest-interface))
1395         (meta . ((class . Item)
1396                  (interfaces . (break-alignable-interface
1397                                 font-interface
1398                                 metronome-mark-interface
1399                                 self-alignment-interface
1400                                 side-position-interface
1401                                 text-interface))))))
1402
1403     (MultiMeasureRest
1404      . (
1405         (expand-limit . 10)
1406         (hair-thickness . 2.0)
1407         (round-up-exceptions . ())
1408         (padding . 1)
1409         (spacing-pair . (break-alignment . break-alignment))
1410         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1411         (stencil . ,ly:multi-measure-rest::print)
1412         (thick-thickness . 6.6)
1413         ;; See Wanske pp. 125
1414         (usable-duration-logs . ,(iota 4 -3))
1415         (Y-extent . ,ly:multi-measure-rest::height)
1416         (Y-offset . ,ly:staff-symbol-referencer::callback)
1417         (meta . ((class . Spanner)
1418                  (interfaces . (font-interface
1419                                 multi-measure-interface
1420                                 multi-measure-rest-interface
1421                                 rest-interface
1422                                 staff-symbol-referencer-interface))))))
1423
1424     (MultiMeasureRestNumber
1425      . (
1426         (bound-padding  . 2.0)
1427         (direction . ,UP)
1428         (font-encoding . fetaText)
1429         (padding . 0.4)
1430         (self-alignment-X . ,CENTER)
1431         (side-axis . ,Y)
1432         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1433         (staff-padding . 0.4)
1434         (stencil . ,ly:text-interface::print)
1435         (X-offset . ,(ly:make-simple-closure
1436                       `(,+
1437                         ,(ly:make-simple-closure
1438                           (list ly:self-alignment-interface::x-aligned-on-self))
1439                         ,(ly:make-simple-closure
1440                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1441         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1442         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1443         (meta . ((class . Spanner)
1444                  (interfaces . (font-interface
1445                                 multi-measure-interface
1446                                 self-alignment-interface
1447                                 side-position-interface
1448                                 text-interface))))))
1449
1450     (MultiMeasureRestText
1451      . (
1452         (direction . ,UP)
1453         (outside-staff-priority . 450)
1454         (padding . 0.2)
1455         (self-alignment-X . ,CENTER)
1456         (staff-padding . 0.25)
1457         (stencil . ,ly:text-interface::print)
1458         (X-offset . ,(ly:make-simple-closure
1459                       `(,+
1460                         ,(ly:make-simple-closure
1461                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1462                         ,(ly:make-simple-closure
1463                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1464         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1465         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1466         (meta . ((class . Spanner)
1467                  (interfaces . (font-interface
1468                                 multi-measure-interface
1469                                 self-alignment-interface
1470                                 side-position-interface
1471                                 text-interface))))))
1472
1473
1474     (NonMusicalPaperColumn
1475      . (
1476         (allow-loose-spacing . #t)
1477         (axes . (,X))
1478         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1479         (bound-alignment-interfaces . (break-alignment-interface))
1480         (full-measure-extra-space . 1.0)
1481         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1482         ;;                    (stencil . ,ly:paper-column::print)
1483
1484         (keep-inside-line . #t)
1485         (line-break-permission . allow)
1486         (non-musical . #t)
1487         (page-break-permission . allow)
1488
1489         ;; debugging stuff: print column number.
1490         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1491
1492         (X-extent . ,ly:axis-group-interface::width)
1493         (meta . ((class . Paper_column)
1494                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1495                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1496                  (interfaces . (axis-group-interface
1497                                 font-interface
1498                                 paper-column-interface
1499                                 separation-item-interface
1500                                 spaceable-grob-interface))))))
1501
1502     (NoteCollision
1503      . (
1504         (axes . (,X ,Y))
1505         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1506         (prefer-dotted-right . #t)
1507         (X-extent . ,ly:axis-group-interface::width)
1508         (Y-extent . ,ly:axis-group-interface::height)
1509         (meta . ((class . Item)
1510                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1511                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1512                  (interfaces . (axis-group-interface
1513                                 note-collision-interface))))))
1514
1515     (NoteColumn
1516      . (
1517         (axes . (,X ,Y))
1518         (bound-alignment-interfaces . (rhythmic-head-interface stem-interface))
1519         (cross-staff . ,ly:axis-group-interface::cross-staff)
1520         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1521         (skyline-vertical-padding . 0.15)
1522         (X-extent . ,ly:axis-group-interface::width)
1523         (Y-extent . ,ly:axis-group-interface::height)
1524         (meta . ((class . Item)
1525                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1526                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1527                  (interfaces . (axis-group-interface
1528                                 note-column-interface
1529                                 separation-item-interface))))))
1530
1531     (NoteHead
1532      . (
1533         (flexa-width . 2.0)
1534         (duration-log . ,note-head::calc-duration-log)
1535         (extra-spacing-height . ,ly:note-head::include-ledger-line-height)
1536         (glyph-name . ,note-head::calc-glyph-name)
1537         (ligature-flexa . #f)
1538         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1539         (stencil . ,ly:note-head::print)
1540         (X-offset . ,ly:note-head::stem-x-shift)
1541         (Y-offset . ,ly:staff-symbol-referencer::callback)
1542         (meta . ((class . Item)
1543                  (interfaces . (font-interface
1544                                 gregorian-ligature-interface
1545                                 ledgered-interface
1546                                 ligature-head-interface
1547                                 mensural-ligature-interface
1548                                 note-head-interface
1549                                 rhythmic-grob-interface
1550                                 rhythmic-head-interface
1551                                 staff-symbol-referencer-interface
1552                                 vaticana-ligature-interface))))))
1553
1554     (NoteName
1555      . (
1556         (stencil . ,ly:text-interface::print)
1557         (meta . ((class . Item)
1558                  (interfaces . (font-interface
1559                                 note-name-interface
1560                                 text-interface))))))
1561
1562     (NoteSpacing
1563      . (
1564         ;; Changed this from 0.75.
1565         ;; If you ever change this back, please document! --hwn
1566         (knee-spacing-correction . 1.0)
1567         (same-direction-correction . 0.25)
1568         (space-to-barline . #t)
1569         (stem-spacing-correction . 0.5)
1570         (meta . ((class . Item)
1571                  (interfaces . (note-spacing-interface
1572                                 spacing-interface))))))
1573
1574
1575     (OctavateEight
1576      . (
1577         (break-visibility . ,inherit-x-parent-visibility)
1578         (font-shape . italic)
1579         (font-size . -4)
1580         (self-alignment-X . ,CENTER)
1581         (staff-padding . 0.2)
1582         (stencil . ,ly:text-interface::print)
1583         (X-offset . ,(ly:make-simple-closure
1584                       `(,+
1585                         ,(ly:make-simple-closure
1586                           (list ly:self-alignment-interface::x-aligned-on-self))
1587                         ,(ly:make-simple-closure
1588                           (list ly:self-alignment-interface::centered-on-x-parent)))))
1589         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1590         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1591         (meta . ((class . Item)
1592                  (interfaces . (font-interface
1593                                 octavate-eight-interface
1594                                 self-alignment-interface
1595                                 side-position-interface
1596                                 text-interface))))))
1597
1598     (OttavaBracket
1599      . (
1600         (dash-fraction . 0.3)
1601         (direction . ,UP)
1602         (edge-height . (0 . 1.2))
1603         (font-shape . italic)
1604         (minimum-length . 1.0)
1605         (outside-staff-priority . 400)
1606         (padding . 0.5)
1607         (shorten-pair . (0.0 . -0.6))
1608         (staff-padding . 1.0)
1609         (stencil . ,ly:ottava-bracket::print)
1610         (style . dashed-line)
1611         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1612         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1613         (meta . ((class . Spanner)
1614                  (interfaces . (font-interface
1615                                 horizontal-bracket-interface
1616                                 line-interface
1617                                 ottava-bracket-interface
1618                                 side-position-interface
1619                                 text-interface))))))
1620
1621
1622     (PaperColumn
1623      . (
1624         (allow-loose-spacing . #t)
1625         (axes . (,X))
1626         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1627         (bound-alignment-interfaces . (note-column-interface))
1628         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1629         (keep-inside-line . #t)
1630         ; 0.08 comes from spacing-horizontal-skyline.ly
1631         ; allows double flat of F to be nestled over dots of C
1632         (skyline-vertical-padding . 0.08)
1633         ;; (stencil . ,ly:paper-column::print)
1634         (X-extent . ,ly:axis-group-interface::width)
1635
1636         ;; debugging
1637         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1638         (meta . ((class . Paper_column)
1639                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1640                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1641                  (interfaces . (axis-group-interface
1642                                 font-interface
1643                                 paper-column-interface
1644                                 separation-item-interface
1645                                 spaceable-grob-interface))))))
1646
1647     (ParenthesesItem
1648      . (
1649         (font-size . -6)
1650         (padding . 0.2)
1651         (stencil . ,parentheses-item::print)
1652         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1653         (meta . ((class . Item)
1654                  (interfaces . (font-interface
1655                                 parentheses-interface))))))
1656
1657     (PercentRepeat
1658      . (
1659         (dot-negative-kern . 0.75)
1660         (font-encoding . fetaMusic)
1661         (slope . 1.0)
1662         (spacing-pair . (break-alignment . staff-bar))
1663         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1664         (stencil . ,ly:multi-measure-rest::percent)
1665         (thickness . 0.48)
1666         (meta . ((class . Spanner)
1667                  (interfaces . (font-interface
1668                                 multi-measure-rest-interface
1669                                 percent-repeat-interface))))))
1670
1671     (PercentRepeatCounter
1672      . (
1673         (direction . ,UP)
1674         (font-encoding . fetaText)
1675         (font-size . -2)
1676         (padding . 0.2)
1677         (self-alignment-X . ,CENTER)
1678         (staff-padding . 0.25)
1679         (stencil . ,ly:text-interface::print)
1680         (X-offset . ,(ly:make-simple-closure
1681                       `(,+
1682                         ,(ly:make-simple-closure
1683                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1684                         ,(ly:make-simple-closure
1685                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1686         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1687         (meta . ((class . Spanner)
1688                  (interfaces . (font-interface
1689                                 percent-repeat-interface
1690                                 self-alignment-interface
1691                                 side-position-interface
1692                                 text-interface))))))
1693
1694     (PhrasingSlur
1695      . (
1696         (control-points . ,ly:slur::calc-control-points)
1697         (cross-staff . ,ly:slur::calc-cross-staff)
1698         (details . ,default-slur-details)
1699         (direction . ,ly:slur::calc-direction)
1700         (height-limit . 2.0)
1701         (minimum-length . 1.5)
1702         (ratio . 0.333)
1703         (spanner-id . "")
1704         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1705         (stencil . ,ly:slur::print)
1706         (thickness . 1.1)
1707         (vertical-skylines . ,ly:slur::vertical-skylines)
1708         (Y-extent . ,ly:slur::height)
1709         (meta . ((class . Spanner)
1710                  (interfaces . (slur-interface))))))
1711
1712     ;; an example of a text spanner
1713     (PianoPedalBracket
1714      . (
1715         (bound-padding . 1.0)
1716         (bracket-flare . (0.5 . 0.5))
1717         (direction . ,DOWN)
1718         (edge-height . (1.0 . 1.0))
1719         (shorten-pair . (0.0 . 0.0))
1720         (stencil . ,ly:piano-pedal-bracket::print)
1721         (style . line)
1722         (thickness .  1.0)
1723         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1724         (meta . ((class . Spanner)
1725                  (interfaces . (line-interface
1726                                 piano-pedal-bracket-interface
1727                                 piano-pedal-interface))))))
1728
1729
1730     (RehearsalMark
1731      . (
1732         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1733         (baseline-skip . 2)
1734         (break-align-symbols . (staff-bar clef))
1735         (break-visibility . ,end-of-line-invisible)
1736         (direction . ,UP)
1737         (extra-spacing-width . (+inf.0 . -inf.0))
1738         (font-size . 2)
1739         (non-musical . #t)
1740         (outside-staff-horizontal-padding . 0.12)
1741         (outside-staff-priority . 1500)
1742         (padding . 0.8)
1743         (self-alignment-X . ,CENTER)
1744         (stencil . ,ly:text-interface::print)
1745         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1746         (X-offset . ,(ly:make-simple-closure
1747                       `(,+
1748                         ,(ly:make-simple-closure
1749                           (list ly:break-alignable-interface::self-align-callback))
1750                         ,(ly:make-simple-closure
1751                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1752         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1753         (meta . ((class . Item)
1754                  (interfaces . (break-alignable-interface
1755                                 font-interface
1756                                 mark-interface
1757                                 self-alignment-interface
1758                                 side-position-interface
1759                                 text-interface))))))
1760
1761     (RepeatSlash
1762      . (
1763         (slash-negative-kern . 0.85)
1764         (slope . 1.7)
1765         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1766         (thickness . 0.48)
1767         (meta . ((class . Item)
1768                  (interfaces . (percent-repeat-interface
1769                                 percent-repeat-item-interface
1770                                 rhythmic-grob-interface))))))
1771
1772     (RepeatTie
1773      . (
1774         (control-points . ,ly:semi-tie::calc-control-points)
1775         (details . ((ratio . 0.333)
1776                     (height-limit . 1.0)))
1777         (direction . ,ly:tie::calc-direction)
1778         (head-direction . ,RIGHT)
1779         (stencil  . ,ly:tie::print)
1780         (thickness . 1.0)
1781         (extra-spacing-height . (-0.5 . 0.5))
1782         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1783         (meta . ((class . Item)
1784                  (interfaces . (semi-tie-interface))))))
1785
1786     (RepeatTieColumn
1787      . (
1788         (direction . ,ly:tie::calc-direction)
1789         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1790         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1791         (X-extent . #f)
1792         (Y-extent . #f)
1793         (meta . ((class . Item)
1794                  (interfaces . (semi-tie-column-interface))))))
1795
1796     (Rest
1797      . (
1798         (cross-staff . ,ly:rest::calc-cross-staff)
1799         (duration-log . ,stem::calc-duration-log)
1800         (minimum-distance . 0.25)
1801         (stencil . ,ly:rest::print)
1802         (X-extent . ,ly:rest::width)
1803         (Y-extent . ,ly:rest::height)
1804         (Y-offset . ,ly:rest::y-offset-callback)
1805         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1806         (meta . ((class . Item)
1807                  (interfaces . (font-interface
1808                                 rest-interface
1809                                 rhythmic-grob-interface
1810                                 rhythmic-head-interface
1811                                 staff-symbol-referencer-interface))))))
1812
1813     (RestCollision
1814      . (
1815         (minimum-distance . 0.75)
1816         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1817         (meta . ((class . Item)
1818                  (interfaces . (rest-collision-interface))))))
1819
1820
1821     (Script
1822      . (
1823         (add-stem-support . #t)
1824         (cross-staff . ,ly:script-interface::calc-cross-staff)
1825         (direction . ,ly:script-interface::calc-direction)
1826         (font-encoding . fetaMusic)
1827         (positioning-done . ,ly:script-interface::calc-positioning-done)
1828         (side-axis . ,Y)
1829
1830         ;; padding set in script definitions.
1831         (slur-padding . 0.2)
1832         (staff-padding . 0.25)
1833
1834         (stencil . ,ly:script-interface::print)
1835         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1836         (X-offset . ,script-interface::calc-x-offset)
1837         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1838         (meta . ((class . Item)
1839                  (interfaces . (font-interface
1840                                 script-interface
1841                                 side-position-interface))))))
1842
1843     (ScriptColumn
1844      . (
1845         (before-line-breaking . ,ly:script-column::before-line-breaking)
1846         (meta . ((class . Item)
1847                  (interfaces . (script-column-interface))))))
1848
1849     (ScriptRow
1850      . (
1851         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1852         (meta . ((class . Item)
1853                  (interfaces . (script-column-interface))))))
1854
1855     (Slur
1856      . (
1857         (avoid-slur . inside)
1858         (control-points . ,ly:slur::calc-control-points)
1859         (cross-staff . ,ly:slur::calc-cross-staff)
1860         (details . ,default-slur-details)
1861         (direction . ,ly:slur::calc-direction)
1862         (height-limit . 2.0)
1863         (line-thickness . 0.8)
1864         (minimum-length . 1.5)
1865         (ratio . 0.25)
1866         (spanner-id . "")
1867         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1868         (stencil . ,ly:slur::print)
1869         (thickness . 1.2)
1870         (vertical-skylines . ,ly:slur::vertical-skylines)
1871         (Y-extent . ,ly:slur::height)
1872         (meta . ((class . Spanner)
1873                  (interfaces . (slur-interface))))))
1874
1875     (SostenutoPedal
1876      . (
1877         (direction . ,RIGHT)
1878         (extra-spacing-width . (+inf.0 . -inf.0))
1879         (font-shape . italic)
1880         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1881         (self-alignment-X . ,CENTER)
1882         (stencil . ,ly:text-interface::print)
1883         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
1884         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1885         (meta . ((class . Item)
1886                  (interfaces . (font-interface
1887                                 piano-pedal-script-interface
1888                                 self-alignment-interface
1889                                 text-interface))))))
1890
1891     (SostenutoPedalLineSpanner
1892      . (
1893         (axes . (,Y))
1894         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
1895         (direction . ,DOWN)
1896         (minimum-space . 1.0)
1897         (outside-staff-priority . 1000)
1898         (padding . 1.2)
1899         (side-axis . ,Y)
1900         (staff-padding . 1.0)
1901         (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
1902         (X-extent . ,ly:axis-group-interface::width)
1903         (Y-extent . ,ly:axis-group-interface::height)
1904         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1905         (meta . ((class . Spanner)
1906                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1907                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1908                  (interfaces . (axis-group-interface
1909                                 piano-pedal-interface
1910                                 side-position-interface))))))
1911
1912     (SpacingSpanner
1913      . (
1914         (average-spacing-wishes . #t)
1915         (base-shortest-duration . ,(ly:make-moment 3 16))
1916         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1917         (shortest-duration-space . 2.0)
1918         (spacing-increment . 1.2)
1919         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1920         (meta . ((class . Spanner)
1921                  (interfaces . (spacing-options-interface
1922                                 spacing-spanner-interface))))))
1923
1924     (SpanBar
1925      . (
1926         (allow-span-bar . #t)
1927         (bar-extent . ,ly:axis-group-interface::height)
1928         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1929         (break-align-symbol . staff-bar)
1930         (cross-staff . #t)
1931         (glyph-name . ,ly:span-bar::calc-glyph-name)
1932         (layer . 0)
1933         (non-musical . #t)
1934         (stencil . ,ly:span-bar::print)
1935         (X-extent . ,ly:span-bar::width)
1936         (Y-extent . (+inf.0 . -inf.0))
1937         (meta . ((class . Item)
1938                  (interfaces . (bar-line-interface
1939                                 font-interface
1940                                 span-bar-interface))))))
1941
1942     (SpanBarStub
1943      . (
1944         (X-extent . ,grob::x-parent-width)
1945         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height)
1946         (Y-extent . #f)
1947         (meta . ((class . Item)
1948                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1949                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
1950                  (interfaces . (pure-from-neighbor-interface))))))
1951
1952     (StaffGrouper
1953      . (
1954         (staff-staff-spacing . ((basic-distance . 9)
1955                                 (minimum-distance . 7)
1956                                 (padding . 1)
1957                                 (stretchability . 5)))
1958         (staffgroup-staff-spacing . ((basic-distance . 10.5)
1959                                      (minimum-distance . 8)
1960                                      (padding . 1)
1961                                      (stretchability . 9)))
1962         (meta . ((class . Spanner)
1963                  (interfaces . (staff-grouper-interface))))))
1964
1965     (StaffSpacing
1966      . (
1967         (non-musical . #t)
1968         (stem-spacing-correction . 0.4)
1969         (meta . ((class . Item)
1970                  (interfaces . (spacing-interface
1971                                 staff-spacing-interface))))))
1972
1973     (StaffSymbol
1974      . (
1975         (layer . 0)
1976         (ledger-line-thickness . (1.0 . 0.1))
1977         (line-count . 5)
1978         (stencil . ,ly:staff-symbol::print)
1979         (Y-extent . ,ly:staff-symbol::height)
1980         (meta . ((class . Spanner)
1981                  (interfaces . (staff-symbol-interface))))))
1982
1983     (StanzaNumber
1984      . (
1985         (direction . ,LEFT)
1986         (font-series . bold)
1987         (padding . 1.0)
1988         (side-axis . ,X)
1989         (stencil . ,ly:text-interface::print)
1990         (X-offset . ,ly:side-position-interface::x-aligned-side)
1991         (meta . ((class . Item)
1992                  (interfaces . (font-interface
1993                                 side-position-interface
1994                                 stanza-number-interface
1995                                 text-interface))))))
1996
1997     (Stem
1998      . (
1999         (beamlet-default-length . (1.1 . 1.1))
2000         (beamlet-max-length-proportion . (0.75 . 0.75))
2001         (cross-staff . ,ly:stem::calc-cross-staff)
2002         (default-direction . ,ly:stem::calc-default-direction)
2003         (details
2004          . (
2005             ;; 3.5 (or 3 measured from note head) is standard length
2006             ;; 32nd, 64th, 128th flagged stems should be longer
2007             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
2008
2009             ;; FIXME.  3.5 yields too long beams (according to Ross and
2010             ;; looking at Baerenreiter examples) for a number of common
2011             ;; boundary cases.  Subtracting half a beam thickness fixes
2012             ;; this, but the bug may well be somewhere else.
2013
2014             ;; FIXME this should come from 'lengths
2015             (beamed-lengths . (3.26 3.5 3.6))
2016
2017             ;; The 'normal' minima
2018             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
2019                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
2020
2021             ;; The 'extreme case' minima
2022             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
2023
2024             ;; Stems in unnatural (forced) direction should be shortened by
2025             ;; one staff space, according to [Roush & Gourlay].
2026             ;; Flagged stems we shorten only half a staff space.
2027             (stem-shorten . (1.0 0.5))
2028
2029             ))
2030
2031         ;; We use the normal minima as minimum for the ideal lengths,
2032         ;; and the extreme minima as abolute minimum length.
2033
2034         (direction . ,ly:stem::calc-direction)
2035         (duration-log . ,stem::calc-duration-log)
2036         (length . ,ly:stem::calc-length)
2037         (neutral-direction . ,DOWN)
2038         (positioning-done . ,ly:stem::calc-positioning-done)
2039         (stem-info . ,ly:stem::calc-stem-info)
2040         (stem-begin-position . ,ly:stem::calc-stem-begin-position)
2041         (stencil . ,ly:stem::print)
2042         (thickness . 1.3)
2043         (X-extent . ,ly:stem::width)
2044         (X-offset . ,ly:stem::offset-callback)
2045         (Y-extent . ,ly:stem::height)
2046         (Y-offset . ,ly:staff-symbol-referencer::callback)
2047         (meta . ((class . Item)
2048                  (interfaces . (stem-interface))))))
2049
2050     (StemStub
2051      . (
2052         (X-extent . ,stem-stub::width)
2053         (extra-spacing-height . ,stem-stub::extra-spacing-height)
2054         (Y-extent . ,(ly:make-unpure-pure-container #f stem-stub::pure-height))
2055         (meta . ((class . Item)
2056                  (interfaces . ())))))
2057
2058     (StemTremolo
2059      . (
2060         (beam-thickness . 0.48) ; staff-space
2061         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
2062         (direction . ,ly:stem-tremolo::calc-direction)
2063         (slope . ,ly:stem-tremolo::calc-slope)
2064         (stencil . ,ly:stem-tremolo::print)
2065         (style . ,ly:stem-tremolo::calc-style)
2066         (X-extent . ,ly:stem-tremolo::width)
2067         (X-offset . ,(ly:make-simple-closure
2068                       `(,+
2069                         ,(ly:make-simple-closure
2070                           (list ly:self-alignment-interface::centered-on-x-parent))
2071                         ,(ly:make-simple-closure
2072                           (list ly:self-alignment-interface::x-aligned-on-self)))))
2073         (Y-offset . ,ly:stem-tremolo::calc-y-offset)
2074         (meta . ((class . Item)
2075                  (interfaces . (self-alignment-interface
2076                                 stem-tremolo-interface))))))
2077
2078     (StringNumber
2079      . (
2080         (avoid-slur . around)
2081         (cross-staff . ,script-or-side-position-cross-staff)
2082         (font-encoding . fetaText)
2083         (font-size . -5)                ; don't overlap when next to heads.
2084         (padding . 0.5)
2085         (script-priority . 100)
2086         (self-alignment-X . ,CENTER)
2087         (self-alignment-Y . ,CENTER)
2088         (staff-padding . 0.5)
2089         (stencil . ,print-circled-text-callback)
2090         (text . ,string-number::calc-text)
2091         (meta . ((class . Item)
2092                  (interfaces . (font-interface
2093                                 self-alignment-interface
2094                                 side-position-interface
2095                                 string-number-interface
2096                                 text-interface
2097                                 text-script-interface))))))
2098
2099     (StrokeFinger
2100      . (
2101         (digit-names . #("p" "i" "m" "a" "x"))
2102         (font-shape . italic)
2103         (font-size . -4)                ; don't overlap when next to heads.
2104         (padding . 0.5)
2105         (script-priority . 100)
2106         (self-alignment-X . ,CENTER)
2107         (self-alignment-Y . ,CENTER)
2108         (staff-padding . 0.5)
2109         (stencil . ,ly:text-interface::print)
2110         (text . ,stroke-finger::calc-text)
2111         (meta . ((class . Item)
2112                  (interfaces . (font-interface
2113                                 self-alignment-interface
2114                                 side-position-interface
2115                                 stroke-finger-interface
2116                                 text-interface
2117                                 text-script-interface))))))
2118
2119     (SustainPedal
2120      . (
2121         (direction . ,RIGHT)
2122         (extra-spacing-width . (+inf.0 . -inf.0))
2123         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
2124         (self-alignment-X . ,CENTER)
2125         (stencil . ,ly:sustain-pedal::print)
2126         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
2127         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2128         (meta . ((class . Item)
2129                  (interfaces . (font-interface
2130                                 piano-pedal-interface
2131                                 piano-pedal-script-interface
2132                                 self-alignment-interface
2133                                 text-interface))))))
2134
2135     (SustainPedalLineSpanner
2136      . (
2137         (axes . (,Y))
2138         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
2139         (direction . ,DOWN)
2140         (minimum-space . 1.0)
2141         (outside-staff-priority . 1000)
2142         (padding . 1.2)
2143         (side-axis . ,Y)
2144         (staff-padding . 1.2)
2145         (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
2146         (X-extent . ,ly:axis-group-interface::width)
2147         (Y-extent . ,ly:axis-group-interface::height)
2148         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2149         (meta . ((class . Spanner)
2150                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2151                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2152                  (interfaces . (axis-group-interface
2153                                 piano-pedal-interface
2154                                 side-position-interface))))))
2155
2156     (System
2157      . (
2158         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2159         (axes . (,X ,Y))
2160         (outside-staff-placement-directive . left-to-right-polite)
2161         (skyline-horizontal-padding . 1.0)
2162         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2163         (X-extent . ,ly:axis-group-interface::width)
2164         (Y-extent . ,ly:system::height)
2165         (meta . ((class . System)
2166                  (object-callbacks . ((footnotes-before-line-breaking . ,ly:system::footnotes-before-line-breaking)
2167                                       (footnotes-after-line-breaking . ,ly:system::footnotes-after-line-breaking)
2168                                       (pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
2169                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2170                                       (vertical-skyline-elements . ,ly:system::vertical-skyline-elements)
2171                                       (vertical-alignment . ,ly:system::get-vertical-alignment)))
2172                  (interfaces . (axis-group-interface
2173                                 system-interface))))))
2174
2175     (SystemStartBar
2176      . (
2177         (collapse-height . 5.0)
2178         (direction . ,LEFT)
2179
2180         ;; ugh--hardcoded.
2181         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
2182         (stencil . ,ly:system-start-delimiter::print)
2183         (style . bar-line)
2184         (thickness . 1.6)
2185         (X-offset . ,ly:side-position-interface::x-aligned-side)
2186         (Y-extent . #f)
2187         (meta . ((class . Spanner)
2188                  (interfaces . (side-position-interface
2189                                 system-start-delimiter-interface))))))
2190
2191     (SystemStartBrace
2192      . (
2193         (collapse-height . 5.0)
2194         (direction . ,LEFT)
2195         (font-encoding . fetaBraces)
2196         (padding . 0.3)
2197         (stencil . ,ly:system-start-delimiter::print)
2198         (style . brace)
2199         (X-offset . ,ly:side-position-interface::x-aligned-side)
2200         (Y-extent . #f)
2201         (meta . ((class . Spanner)
2202                  (interfaces . (font-interface
2203                                 side-position-interface
2204                                 system-start-delimiter-interface))))))
2205
2206     (SystemStartBracket
2207      . (
2208         (collapse-height . 5.0)
2209         (direction . ,LEFT)
2210         (padding . 0.8)
2211         (stencil . ,ly:system-start-delimiter::print)
2212         (style . bracket)
2213         (thickness . 0.45)
2214         (X-offset . ,ly:side-position-interface::x-aligned-side)
2215         (Y-extent . #f)
2216         (meta . ((class . Spanner)
2217                  (interfaces . (font-interface
2218                                 side-position-interface
2219                                 system-start-delimiter-interface))))))
2220
2221     (SystemStartSquare
2222      . (
2223         (direction . ,LEFT)
2224         (stencil . ,ly:system-start-delimiter::print)
2225         (style . line-bracket)
2226         (thickness . 1.0)
2227         (X-offset . ,ly:side-position-interface::x-aligned-side)
2228         (Y-extent . #f)
2229         (meta . ((class . Spanner)
2230                  (interfaces . (font-interface
2231                                 side-position-interface
2232                                 system-start-delimiter-interface))))))
2233
2234
2235     (TabNoteHead
2236      . (
2237         (details . ((cautionary-properties . ((angularity . 0.4)
2238                                               (half-thickness . 0.075)
2239                                               (padding . 0)
2240                                               (procedure . ,parenthesize-stencil)
2241                                               (width . 0.25)))
2242                     (head-offset . 3/5)
2243                     (harmonic-properties . ((angularity . 2)
2244                                             (half-thickness . 0.075)
2245                                             (padding . 0)
2246                                             (procedure . ,parenthesize-stencil)
2247                                             (width . 0.25)))
2248                     (repeat-tied-properties . ((note-head-visible . #t)
2249                                                (parenthesize . #t)))
2250                     (tied-properties . ((break-visibility . ,begin-of-line-visible)
2251                                         (parenthesize . #t)))))
2252
2253         (direction . ,CENTER)
2254         (duration-log . ,note-head::calc-duration-log)
2255         (font-series . bold)
2256         (font-size . -2)
2257         (stem-attachment . (0.0 . 1.35))
2258         (stencil . ,tab-note-head::print)
2259         (whiteout . #t)
2260         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2261         (Y-offset . ,ly:staff-symbol-referencer::callback)
2262         (meta . ((class . Item)
2263                  (interfaces  . (font-interface
2264                                  note-head-interface
2265                                  rhythmic-grob-interface
2266                                  rhythmic-head-interface
2267                                  staff-symbol-referencer-interface
2268                                  tab-note-head-interface
2269                                  text-interface))))))
2270
2271     (TextScript
2272      . (
2273         (avoid-slur . around)
2274         (cross-staff . ,script-or-side-position-cross-staff)
2275         (direction . ,DOWN)
2276         (extra-spacing-width . (+inf.0 . -inf.0))
2277         (outside-staff-horizontal-padding . 0.12)
2278         (outside-staff-priority . 450)
2279
2280         ;; sync with Fingering ?
2281         (padding . 0.3)
2282
2283         (script-priority . 200)
2284         (side-axis . ,Y)
2285         (slur-padding . 0.5)
2286         (staff-padding . 0.5)
2287         (stencil . ,ly:text-interface::print)
2288         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
2289         ;; todo: add X self alignment?
2290         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2291         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2292         (meta . ((class . Item)
2293                  (interfaces . (font-interface
2294                                 instrument-specific-markup-interface
2295                                 self-alignment-interface
2296                                 side-position-interface
2297                                 text-interface
2298                                 text-script-interface))))))
2299
2300     (TextSpanner
2301      . (
2302         (bound-details . ((left . ((Y . 0)
2303                                    (padding . 0.25)
2304                                    (attach-dir . ,LEFT)
2305                                    ))
2306                           (left-broken . ((attach-dir . ,RIGHT)))
2307                           (right . ((Y . 0)
2308                                     (padding . 0.25)
2309                                     ))
2310                           ))
2311         (dash-fraction . 0.2)
2312         (dash-period . 3.0)
2313         (direction . ,UP)
2314         (font-shape . italic)
2315         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2316         (outside-staff-priority . 350)
2317         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2318         (side-axis . ,Y)
2319         (staff-padding . 0.8)
2320         (stencil . ,ly:line-spanner::print)
2321         (style . dashed-line)
2322         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2323
2324         (meta . ((class . Spanner)
2325                  (interfaces . (font-interface
2326                                 line-interface
2327                                 line-spanner-interface
2328                                 side-position-interface))))))
2329
2330     (Tie
2331      . (
2332         (avoid-slur . inside)
2333         (control-points . ,ly:tie::calc-control-points)
2334         (details . (
2335                     ;; for a full list, see tie-details.cc
2336                     (ratio . 0.333)
2337                     (center-staff-line-clearance . 0.6)
2338                     (tip-staff-line-clearance . 0.45)
2339                     (note-head-gap . 0.2)
2340                     (stem-gap . 0.35)
2341                     (height-limit . 1.0)
2342                     (horizontal-distance-penalty-factor . 10)
2343                     (same-dir-as-stem-penalty . 8)
2344                     (min-length-penalty-factor . 26)
2345                     (tie-tie-collision-distance . 0.45)
2346                     (tie-tie-collision-penalty . 25.0)
2347                     (intra-space-threshold . 1.25)
2348                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2349                     (outer-tie-length-symmetry-penalty-factor . 10)
2350                     (vertical-distance-penalty-factor . 7)
2351                     (outer-tie-vertical-gap . 0.25)
2352                     (multi-tie-region-size . 3)
2353                     (single-tie-region-size . 4)
2354                     (between-length-limit . 1.0)))
2355
2356         (direction . ,ly:tie::calc-direction)
2357         (font-size . -6)
2358         (line-thickness . 0.8)
2359         (neutral-direction . ,UP)
2360         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2361         (stencil . ,ly:tie::print)
2362         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
2363         (thickness . 1.2)
2364         (meta . ((class . Spanner)
2365                  (interfaces . (tie-interface))))))
2366
2367     (TieColumn
2368      . (
2369         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2370         (positioning-done . ,ly:tie-column::calc-positioning-done)
2371         (X-extent . #f)
2372         (Y-extent . #f)
2373         (meta . ((class . Spanner)
2374                  (interfaces . (tie-column-interface))))))
2375
2376     (TimeSignature
2377      . (
2378         (avoid-slur . inside)
2379         (break-align-anchor
2380          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2381         (break-align-symbol . time-signature)
2382         (break-align-anchor-alignment . ,LEFT)
2383         (break-visibility . ,all-visible)
2384         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-including-staff)
2385         (extra-spacing-width . (0.0 . 0.8))
2386         (non-musical . #t)
2387         (space-alist . (
2388                         (cue-clef . (extra-space . 1.5))
2389                         (first-note . (fixed-space . 2.0))
2390                         (right-edge . (extra-space . 0.5))
2391                         (staff-bar . (minimum-space . 2.0))))
2392         (stencil . ,ly:time-signature::print)
2393         (style . C)
2394         (meta . ((class . Item)
2395                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2396                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
2397                  (interfaces . (break-aligned-interface
2398                                 font-interface
2399                                 pure-from-neighbor-interface
2400                                 time-signature-interface))))))
2401
2402     (TrillPitchAccidental
2403      . (
2404         (direction . ,LEFT)
2405         (font-size . -4)
2406         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2407         (padding . 0.2)
2408         (side-axis . ,X)
2409         (stencil . ,ly:accidental-interface::print)
2410         (X-offset . ,ly:side-position-interface::x-aligned-side)
2411         (Y-extent . ,ly:accidental-interface::height)
2412         (meta . ((class . Item)
2413                  (interfaces . (accidental-interface
2414                                 font-interface
2415                                 inline-accidental-interface
2416                                 side-position-interface
2417                                 trill-pitch-accidental-interface))))))
2418
2419     (TrillPitchGroup
2420      . (
2421         (axes . (,X))
2422         (direction . ,RIGHT)
2423         (font-size . -4)
2424         (padding . 0.3)
2425         (side-axis . ,X)
2426         (stencil . ,parenthesize-elements)
2427         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2428         (X-offset . ,ly:side-position-interface::x-aligned-side)
2429         (meta . ((class . Item)
2430                  (interfaces . (axis-group-interface
2431                                 font-interface
2432                                 note-head-interface
2433                                 parentheses-interface
2434                                 side-position-interface))))))
2435
2436     (TrillPitchHead
2437      . (
2438         (duration-log . 2)
2439         (font-size . -4)
2440         (stencil . ,ly:note-head::print)
2441         (Y-offset . ,ly:staff-symbol-referencer::callback)
2442         (meta . ((class . Item)
2443                  (interfaces . (font-interface
2444                                 ledgered-interface
2445                                 pitched-trill-interface
2446                                 rhythmic-head-interface
2447                                 staff-symbol-referencer-interface))))))
2448
2449     (TrillSpanner
2450      . (
2451         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2452         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2453                                    (Y . 0)
2454                                    (stencil-offset . (-0.5 . -1))
2455                                    (padding . 0.5)
2456                                    (attach-dir . ,CENTER)
2457                                    ))
2458                           (left-broken . ((end-on-note . #t)))
2459                           (right . ((Y . 0)))
2460                           ))
2461         (direction . ,UP)
2462         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2463         (outside-staff-priority . 50)
2464         (padding . 0.5)
2465         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2466         (side-axis . ,Y)
2467         (staff-padding . 1.0)
2468         (stencil . ,ly:line-spanner::print)
2469         (style . trill)
2470         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2471         (meta . ((class . Spanner)
2472                  (interfaces . (font-interface
2473                                 line-interface
2474                                 line-spanner-interface
2475                                 side-position-interface
2476                                 trill-spanner-interface))))))
2477
2478     (TupletBracket
2479      . (
2480         (avoid-scripts . #t)
2481         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2482         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2483         (direction  . ,ly:tuplet-bracket::calc-direction)
2484         (edge-height . (0.7 . 0.7))
2485         (full-length-to-extent . #t)
2486         (padding . 1.1)
2487         (positions . ,ly:tuplet-bracket::calc-positions)
2488         (shorten-pair . (-0.2 . -0.2))
2489         (staff-padding . 0.25)
2490         (stencil . ,ly:tuplet-bracket::print)
2491         (thickness . 1.6)
2492         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
2493         (X-positions . ,ly:tuplet-bracket::calc-x-positions)
2494
2495         (meta . ((class . Spanner)
2496                  (interfaces . (line-interface
2497                                 tuplet-bracket-interface))))))
2498
2499     (TupletNumber
2500      . (
2501         (avoid-slur . inside)
2502         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2503         (direction . ,tuplet-number::calc-direction)
2504         (font-shape . italic)
2505         (font-size . -2)
2506         (stencil . ,ly:tuplet-number::print)
2507         (text . ,tuplet-number::calc-denominator-text)
2508         (X-offset . ,ly:tuplet-number::calc-x-offset)
2509         (Y-offset . ,ly:tuplet-number::calc-y-offset)
2510         (meta . ((class . Spanner)
2511                  (interfaces . (font-interface
2512                                 text-interface
2513                                 tuplet-number-interface))))))
2514
2515
2516     (UnaCordaPedal
2517      . (
2518         (direction . ,RIGHT)
2519         (extra-spacing-width . (+inf.0 . -inf.0))
2520         (font-shape . italic)
2521         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2522         (self-alignment-X . ,CENTER)
2523         (stencil . ,ly:text-interface::print)
2524         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
2525         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2526         (meta . ((class . Item)
2527                  (interfaces . (font-interface
2528                                 piano-pedal-script-interface
2529                                 self-alignment-interface
2530                                 text-interface))))))
2531
2532     (UnaCordaPedalLineSpanner
2533      . (
2534         (axes . (,Y))
2535         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
2536         (direction . ,DOWN)
2537         (minimum-space . 1.0)
2538         (outside-staff-priority . 1000)
2539         (padding . 1.2)
2540         (side-axis . ,Y)
2541         (staff-padding . 1.2)
2542         (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
2543         (X-extent . ,ly:axis-group-interface::width)
2544         (Y-extent . ,ly:axis-group-interface::height)
2545         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2546         (meta . ((class . Spanner)
2547                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2548                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2549                  (interfaces . (axis-group-interface
2550                                 piano-pedal-interface
2551                                 side-position-interface))))))
2552
2553
2554     (VaticanaLigature
2555      . (
2556         (flexa-width . 2.0)
2557         (stencil . ,ly:vaticana-ligature::print)
2558         (thickness . 0.6)
2559         (meta . ((class . Spanner)
2560                  (interfaces . (font-interface
2561                                 vaticana-ligature-interface))))))
2562
2563     (VerticalAlignment
2564      . (
2565         (axes . (,Y))
2566         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2567         (stacking-dir . -1)
2568         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2569         (X-extent . ,ly:axis-group-interface::width)
2570         (Y-extent . ,ly:axis-group-interface::height)
2571         (meta . ((class . Spanner)
2572                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2573                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2574                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2575                  (interfaces . (align-interface
2576                                 axis-group-interface))))))
2577
2578     (VerticalAxisGroup
2579      . (
2580         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2581         (axes . (,Y))
2582         (default-staff-staff-spacing . ((basic-distance . 9)
2583                                         (minimum-distance . 8)
2584                                         (padding . 1)))
2585         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2586         (outside-staff-placement-directive . left-to-right-polite)
2587         (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing)
2588         (stencil . ,ly:axis-group-interface::print)
2589         (skyline-horizontal-padding . 0.1)
2590         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2591         (X-extent . ,ly:axis-group-interface::width)
2592         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2593         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2594         (meta . ((class . Spanner)
2595                  (object-callbacks . (
2596                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2597                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2598                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2599
2600                  (interfaces . (axis-group-interface
2601                                 hara-kiri-group-spanner-interface))))))
2602
2603     (VoiceFollower
2604      . (
2605         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2606         (bound-details . ((right . ((attach-dir .  ,CENTER)
2607                                     (padding . 1.5)
2608                                       ))
2609                           (left . ((attach-dir .  ,CENTER)
2610                                    (padding . 1.5)
2611                                       ))
2612                           ))
2613         (cross-staff . #t)
2614         (gap . 0.5)
2615         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2616         (non-musical . #t)
2617         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2618         (stencil . ,ly:line-spanner::print)
2619         (style . line)
2620         (X-extent . #f)
2621         (Y-extent . #f)
2622         (meta . ((class . Spanner)
2623                  (interfaces . (line-interface
2624                                 line-spanner-interface))))))
2625
2626     (VoltaBracket
2627      . (
2628         (direction . ,UP)
2629         (edge-height . (2.0 . 2.0)) ;; staff-space;
2630         (font-encoding . fetaText)
2631         (font-size . -4)
2632         (shorten-pair . ,ly:volta-bracket::calc-shorten-pair)
2633         (stencil . ,ly:volta-bracket-interface::print)
2634         (thickness . 1.6) ;; line-thickness
2635         (word-space . 0.6)
2636         (vertical-skylines . ,ly:grob::vertical-skylines-from-stencil)
2637         (meta . ((class . Spanner)
2638                  (interfaces . (font-interface
2639                                 horizontal-bracket-interface
2640                                 line-interface
2641                                 side-position-interface
2642                                 text-interface
2643                                 volta-bracket-interface
2644                                 volta-interface))))))
2645
2646     (VoltaBracketSpanner
2647      . (
2648         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2649         (axes . (,Y))
2650         (direction . ,UP)
2651         (no-alignment . #t)
2652         (outside-staff-priority . 600)
2653         (padding . 1)
2654         (side-axis . ,Y)
2655         (vertical-skylines . ,ly:grob::vertical-skylines-from-element-stencils)
2656         (X-extent . ,ly:axis-group-interface::width)
2657         (Y-extent . ,ly:axis-group-interface::height)
2658         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2659         (meta . ((class . Spanner)
2660                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2661                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2662                  (interfaces . (axis-group-interface
2663                                 side-position-interface
2664                                 volta-interface))))))
2665
2666 ))
2667
2668 (define (completize-grob-entry x)
2669   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2670 "
2671   ;;  (display (car x))
2672   ;;  (newline)
2673   (let* ((name-sym  (car x))
2674          (grob-entry (cdr x))
2675          (meta-entry (assoc-get 'meta grob-entry))
2676          (class (assoc-get 'class meta-entry))
2677          (ifaces-entry
2678           (assoc-get 'interfaces meta-entry)))
2679
2680     (cond
2681      ((eq? 'Item class)
2682       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2683      ((eq? 'Spanner class)
2684       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2685      ((eq? 'Paper_column class)
2686       (set! ifaces-entry (cons 'item-interface
2687                                (cons 'paper-column-interface ifaces-entry))))
2688      ((eq? 'System class)
2689       (set! ifaces-entry (cons 'system-interface
2690                                (cons 'spanner-interface ifaces-entry))))
2691      (else
2692       (ly:warning "Unknown class ~a" class)))
2693
2694     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2695     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2696
2697     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2698     (set! meta-entry (assoc-set! meta-entry 'interfaces
2699                                  ifaces-entry))
2700     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2701     (cons name-sym grob-entry)))
2702
2703 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2704
2705 ;;  (display (map pair? all-grob-descriptions))
2706
2707 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2708
2709 (map (lambda (x)
2710        ;; (display (car x)) (newline)
2711
2712        (set-object-property! (car x) 'translation-type? list?)
2713        (set-object-property! (car x) 'is-grob? #t))
2714      all-grob-descriptions)
2715
2716 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2717
2718 (define (volta-bracket-interface::pure-height grob start end)
2719   (let ((edge-height (ly:grob-property grob 'edge-height)))
2720     (if (number-pair? edge-height)
2721         (let ((smaller (min (car edge-height) (cdr edge-height)))
2722               (larger (max (car edge-height) (cdr edge-height))))
2723           (interval-union '(0 . 0) (cons smaller larger)))
2724         '(0 . 0))))
2725
2726 (define pure-print-callbacks
2727   (list
2728    fret-board::calc-stencil
2729    note-head::brew-ez-stencil
2730    print-circled-text-callback
2731    laissez-vibrer::print
2732    lyric-text::print
2733    ly:bar-line::print
2734    ly:mensural-ligature::brew-ligature-primitive
2735    ly:note-head::print
2736    ly:dots::print
2737    ly:clef::print
2738    ly:flag::print
2739    ly:time-signature::print
2740    default-flag
2741    normal-flag
2742    mensural-flag
2743    no-flag
2744    modern-straight-flag
2745    old-straight-flag
2746    ly:key-signature-interface::print
2747    ly:percent-repeat-item-interface::beat-slash
2748    ly:text-interface::print
2749    ly:script-interface::print
2750    ly:sustain-pedal::print))
2751
2752 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2753 ;; and the print function is not pure, but there is a easy way to
2754 ;; figure out the Y-extent from the print function.
2755 (define pure-print-to-height-conversions
2756   `(
2757     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2758     (,ly:arpeggio::brew-chord-bracket . ,ly:arpeggio::pure-height)
2759     (,ly:arpeggio::brew-chord-slur . ,ly:arpeggio::pure-height)
2760     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2761     (,ly:stem-tremolo::print . ,ly:stem-tremolo::pure-height)
2762     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2763
2764 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2765 (define (pure-stencil-height grob start stop)
2766   (let* ((sten (ly:grob-property-data grob 'stencil))
2767          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2768     (cond ((or
2769             (ly:stencil? sten)
2770             (memq sten pure-print-callbacks))
2771            (ly:grob::stencil-height grob))
2772           ((procedure? pure-height-callback)
2773            (pure-height-callback grob start stop))
2774           (else
2775            '(0 . 0)))))
2776
2777 ;; Sometimes, a pure callback will be chained to a non-pure callback via
2778 ;; chain_offset_callback, in which case this provides a default by simply
2779 ;; passing through the value from the pure callback.
2780 (define (pure-chain-offset-callback grob start end prev-offset) prev-offset)
2781
2782 (define pure-conversions-alist
2783   `(
2784     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2785     (,ly:axis-group-interface::calc-staff-staff-spacing . ,ly:axis-group-interface::calc-pure-staff-staff-spacing)
2786     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2787     (,ly:beam::rest-collision-callback . ,ly:beam::pure-rest-collision-callback)
2788     (,ly:flag::calc-y-offset . ,ly:flag::pure-calc-y-offset)
2789     (,ly:grob::horizontal-skylines-from-stencil . ,ly:grob::pure-simple-horizontal-skylines-from-extents)
2790     (,ly:grob::horizontal-skylines-from-element-stencils . ,ly:grob::pure-simple-horizontal-skylines-from-extents)
2791     (,ly:grob::simple-horizontal-skylines-from-extents . ,ly:grob::pure-simple-horizontal-skylines-from-extents)
2792     (,ly:grob::simple-vertical-skylines-from-extents . ,ly:grob::pure-simple-vertical-skylines-from-extents)
2793     (,ly:grob::stencil-height . ,pure-stencil-height)
2794     (,ly:grob::vertical-skylines-from-stencil . ,ly:grob::pure-simple-vertical-skylines-from-extents)
2795     (,ly:grob::vertical-skylines-from-element-stencils . ,ly:grob::pure-simple-vertical-skylines-from-extents)
2796     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2797     (,ly:rest-collision::force-shift-callback-rest . ,pure-chain-offset-callback)
2798     (,ly:rest::height . ,ly:rest::pure-height)
2799     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2800     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2801     (,ly:slur::height . ,ly:slur::pure-height)
2802     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2803     (,ly:stem::calc-stem-begin-position . ,ly:stem::pure-calc-stem-begin-position)
2804     (,ly:stem::calc-stem-end-position . ,ly:stem::pure-calc-stem-end-position)
2805     (,ly:stem::calc-length . ,ly:stem::pure-calc-length)
2806     (,ly:stem::height . ,ly:stem::pure-height)
2807     (,ly:stem-tremolo::calc-y-offset . ,ly:stem-tremolo::pure-calc-y-offset)
2808     (,ly:system::height . ,ly:system::calc-pure-height)))
2809
2810 (define pure-functions
2811   (list
2812    ly:accidental-interface::horizontal-skylines
2813    parenthesize-elements
2814    laissez-vibrer::print
2815    ly:multi-measure-rest::height
2816    ly:rest::y-offset-callback
2817    ly:staff-symbol-referencer::callback
2818    ly:staff-symbol::height))
2819
2820 (define-public (pure-relevant? grob)
2821   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2822     (not (eq? #f
2823               (or
2824                (ly:unpure-pure-container? extent-callback)
2825                (pair? extent-callback)
2826                (memq extent-callback pure-functions)
2827                (and
2828                 (pair? (assq extent-callback pure-conversions-alist))
2829                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2830                   (or
2831                    (not (eq? extent-callback ly:grob::stencil-height))
2832                    (memq stencil pure-print-callbacks)
2833                    (assq stencil pure-print-to-height-conversions)
2834                    (ly:stencil? stencil)))))))))
2835
2836 ;; hideous code dup below - to be cleaned up when call pure functino
2837 ;; is eliminated and lilypond works entirely from unpure-pure-containers
2838
2839 (define-public (call-pure-function unpure args start end)
2840   (if (ly:unpure-pure-container? unpure)
2841       (let ((unpure (ly:unpure-pure-container-pure-part unpure)))
2842         (if (ly:simple-closure? unpure)
2843           (ly:eval-simple-closure (car args) unpure start end)
2844           (if (not (procedure? unpure))
2845               unpure
2846               (apply unpure
2847                      (append
2848                        (list (car args) start end)
2849                        (cdr args))))))
2850       (if (ly:simple-closure? unpure)
2851           (ly:eval-simple-closure (car args) unpure start end)
2852           (if (not (procedure? unpure))
2853               unpure
2854               (if (memq unpure pure-functions)
2855                   (apply unpure args)
2856                   (let ((pure (assq unpure pure-conversions-alist)))
2857                     (if pure
2858                         (apply (cdr pure)
2859                                (append
2860                                 (list (car args) start end)
2861                                 (cdr args))))))))))