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