]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
7be62f1c82cb0ccf5f810ffce2d18be47472d10c
[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 . fetaText)
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 . fetaText)
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 . fetaText)
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  . ,laissez-vibrer::print)
981         (thickness . 1.0)
982         (meta . ((class . Item)
983                  (interfaces . (semi-tie-interface))))))
984
985     (LaissezVibrerTieColumn
986      . (
987         (head-direction . ,ly:semi-tie-column::calc-head-direction)
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 . fetaText)
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 . fetaText)
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     (Slur
1558      . (
1559         (avoid-slur . inside)
1560         (control-points . ,ly:slur::calc-control-points)
1561         (cross-staff . ,ly:slur::calc-cross-staff)
1562         (details . ,default-slur-details)
1563         (direction . ,ly:slur::calc-direction)
1564         (height-limit . 2.0)
1565         (line-thickness . 0.8)
1566         (minimum-length . 1.5)
1567         (ratio . 0.25)
1568         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1569         (stencil . ,ly:slur::print)
1570         (thickness . 1.2)
1571         (Y-extent . ,ly:slur::height)
1572         (meta . ((class . Spanner)
1573                  (interfaces . (slur-interface))))))
1574
1575     (SostenutoPedal
1576      . (
1577         (direction . ,RIGHT)
1578         (extra-spacing-width . (+inf.0 . -inf.0))
1579         (font-shape . italic)
1580         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1581         (self-alignment-X . ,CENTER)
1582         (stencil . ,ly:text-interface::print)
1583         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1584         (meta . ((class . Item)
1585                  (interfaces . (font-interface
1586                                 piano-pedal-script-interface
1587                                 self-alignment-interface
1588                                 text-interface))))))
1589
1590     (SostenutoPedalLineSpanner
1591      . (
1592         (axes . (,Y))
1593         (direction . ,DOWN)
1594         (minimum-space . 1.0)
1595         (outside-staff-priority . 1000)
1596         (padding . 1.2)
1597         (side-axis . ,Y)
1598         (staff-padding . 1.0)
1599         (X-extent . ,ly:axis-group-interface::width)
1600         (Y-extent . ,ly:axis-group-interface::height)
1601         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1602         (meta . ((class . Spanner)
1603                  (interfaces . (axis-group-interface
1604                                 piano-pedal-interface
1605                                 side-position-interface))))))
1606
1607     (SpacingSpanner
1608      . (
1609         (average-spacing-wishes . #t)
1610         (base-shortest-duration . ,(ly:make-moment 3 16))
1611         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1612         (shortest-duration-space . 2.0)
1613         (spacing-increment . 1.2)
1614         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1615         (meta . ((class . Spanner)
1616                  (interfaces . (spacing-options-interface
1617                                 spacing-spanner-interface))))))
1618
1619     (SpanBar
1620      . (
1621         (allow-span-bar . #t)
1622         (bar-extent . ,ly:axis-group-interface::height)
1623         (bar-size . ,ly:span-bar::calc-bar-size)
1624         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1625         (break-align-symbol . staff-bar)
1626         (cross-staff . #t)
1627         (glyph-name . ,ly:span-bar::calc-glyph-name)
1628
1629         ;; ugh duplication! (these 4 properties were copied from Barline)
1630         ;;
1631         ;; Ross. page 151 lists other values, we opt for a leaner look
1632         ;;
1633         (kern . 3.0)
1634         (thin-kern . 3.0)
1635         (hair-thickness . 1.6)
1636         (thick-thickness . 6.0)
1637
1638         (layer . 0)
1639         (non-musical . #t)
1640         (stencil . ,ly:span-bar::print)
1641         (X-extent . ,ly:span-bar::width)
1642         (Y-extent . ,ly:axis-group-interface::height)
1643         (meta . ((class . Item)
1644                  (interfaces . (bar-line-interface
1645                                 font-interface
1646                                 span-bar-interface))))))
1647
1648     (StaffGrouper
1649      . (
1650         (between-staff-spacing . ((space . 9)
1651                                   (minimum-distance . 7)
1652                                   (padding . 1)))
1653         (after-last-staff-spacing . ((space . 10.5)
1654                                      (minimum-distance . 8)
1655                                      (padding . 1)))
1656         (meta . ((class . Spanner)
1657                  (interfaces . (staff-grouper-interface))))))
1658
1659     (StaffSpacing
1660      . (
1661         (non-musical . #t)
1662         (stem-spacing-correction . 0.4)
1663         (meta . ((class . Item)
1664                  (interfaces . (spacing-interface
1665                                 staff-spacing-interface))))))
1666
1667     (StaffSymbol
1668      . (
1669         (layer . 0)
1670         (ledger-line-thickness . (1.0 . 0.1))
1671         (line-count . 5)
1672         (stencil . ,ly:staff-symbol::print)
1673         (Y-extent . ,ly:staff-symbol::height)
1674         (meta . ((class . Spanner)
1675                  (interfaces . (staff-symbol-interface))))))
1676
1677     (StanzaNumber
1678      . (
1679         (direction . ,LEFT)
1680         (font-series . bold)
1681         (padding . 1.0)
1682         (side-axis . ,X)
1683         (stencil . ,ly:text-interface::print)
1684         (X-offset . ,ly:side-position-interface::x-aligned-side)
1685         (meta . ((class . Item)
1686                  (interfaces . (font-interface
1687                                 side-position-interface
1688                                 stanza-number-interface
1689                                 text-interface))))))
1690
1691     (Stem
1692      . (
1693         (beamlet-default-length . (1.1 . 1.1))
1694         (beamlet-max-length-proportion . (0.75 . 0.75))
1695         (cross-staff . ,ly:stem::calc-cross-staff)
1696         (default-direction . ,ly:stem::calc-default-direction)
1697         (details
1698          . (
1699             ;; 3.5 (or 3 measured from note head) is standard length
1700             ;; 32nd, 64th, 128th flagged stems should be longer
1701             (lengths . (3.5 3.5 3.5 4.5 5.0 6.0))
1702
1703             ;; FIXME.  3.5 yields too long beams (according to Ross and
1704             ;; looking at Baerenreiter examples) for a number of common
1705             ;; boundary cases.  Subtracting half a beam thickness fixes
1706             ;; this, but the bug may well be somewhere else.
1707
1708             ;; FIXME this should come from 'lengths
1709             (beamed-lengths . (3.26 3.5 3.6))
1710
1711             ;; The 'normal' minima
1712             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1713                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1714
1715             ;; The 'extreme case' minima
1716             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1717
1718             ;; Stems in unnatural (forced) direction should be shortened by
1719             ;; one staff space, according to [Roush & Gourlay].
1720             ;; Flagged stems we shorten only half a staff space.
1721             (stem-shorten . (1.0 0.5))
1722
1723             ))
1724
1725         ;; We use the normal minima as minimum for the ideal lengths,
1726         ;; and the extreme minima as abolute minimum length.
1727
1728         (direction . ,ly:stem::calc-direction)
1729         (duration-log . ,stem::calc-duration-log)
1730         (flag . ,ly:stem::calc-flag)
1731         (length . ,ly:stem::calc-length)
1732         (neutral-direction . ,DOWN)
1733         (positioning-done . ,ly:stem::calc-positioning-done)
1734         (stem-end-position . ,ly:stem::calc-stem-end-position)
1735         (stem-info . ,ly:stem::calc-stem-info)
1736         (stencil . ,ly:stem::print)
1737         (thickness . 1.3)
1738         (X-extent . ,ly:stem::width)
1739         (X-offset . ,ly:stem::offset-callback)
1740         (Y-extent . ,ly:stem::height)
1741         (Y-offset . ,ly:staff-symbol-referencer::callback)
1742         (meta . ((class . Item)
1743                  (interfaces . (font-interface
1744                                 stem-interface))))))
1745
1746     (StemTremolo
1747      . (
1748         (beam-thickness . 0.48) ; staff-space
1749         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1750         (slope . ,ly:stem-tremolo::calc-slope)
1751         (stencil . ,ly:stem-tremolo::print)
1752         (style . ,ly:stem-tremolo::calc-style)
1753         (X-extent . ,ly:stem-tremolo::width)
1754         (Y-extent . ,ly:stem-tremolo::height)
1755         (meta . ((class . Item)
1756                  (interfaces . (stem-tremolo-interface))))))
1757
1758     (StringNumber
1759      . (
1760         (avoid-slur . around)
1761         (font-encoding . fetaText)
1762         (font-size . -5)                ; don't overlap when next to heads.
1763         (padding . 0.5)
1764         (script-priority . 100)
1765         (self-alignment-X . ,CENTER)
1766         (self-alignment-Y . ,CENTER)
1767         (staff-padding . 0.5)
1768         (stencil . ,print-circled-text-callback)
1769         (text . ,string-number::calc-text)
1770         (meta . ((class . Item)
1771                  (interfaces . (font-interface
1772                                 self-alignment-interface
1773                                 side-position-interface
1774                                 string-number-interface
1775                                 text-interface
1776                                 text-script-interface))))))
1777
1778     (StrokeFinger
1779      . (
1780         (digit-names . #("p" "i" "m" "a" "x"))
1781         (font-shape . italic)
1782         (font-size . -4)                ; don't overlap when next to heads.
1783         (padding . 0.5)
1784         (script-priority . 100)
1785         (self-alignment-X . ,CENTER)
1786         (self-alignment-Y . ,CENTER)
1787         (staff-padding . 0.5)
1788         (stencil . ,ly:text-interface::print)
1789         (text . ,stroke-finger::calc-text)
1790         (meta . ((class . Item)
1791                  (interfaces . (font-interface
1792                                 self-alignment-interface
1793                                 side-position-interface
1794                                 stroke-finger-interface
1795                                 text-interface
1796                                 text-script-interface))))))
1797
1798     (SustainPedal
1799      . (
1800         (direction . ,RIGHT)
1801         (extra-spacing-width . (+inf.0 . -inf.0))
1802         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1803         (self-alignment-X . ,CENTER)
1804         (stencil . ,ly:sustain-pedal::print)
1805         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1806         (meta . ((class . Item)
1807                  (interfaces . (font-interface
1808                                 piano-pedal-interface
1809                                 piano-pedal-script-interface
1810                                 self-alignment-interface
1811                                 text-interface))))))
1812
1813     (SustainPedalLineSpanner
1814      . (
1815         (axes . (,Y))
1816         (direction . ,DOWN)
1817         (minimum-space . 1.0)
1818         (outside-staff-priority . 1000)
1819         (padding . 1.2)
1820         (side-axis . ,Y)
1821         (staff-padding . 1.2)
1822         (X-extent . ,ly:axis-group-interface::width)
1823         (Y-extent . ,ly:axis-group-interface::height)
1824         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1825         (meta . ((class . Spanner)
1826                  (interfaces . (axis-group-interface
1827                                 piano-pedal-interface
1828                                 side-position-interface))))))
1829
1830     (System
1831      . (
1832         (axes . (,X ,Y))
1833         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
1834         (X-extent . ,ly:axis-group-interface::width)
1835         (Y-extent . ,ly:axis-group-interface::height)
1836         (meta . ((class . System)
1837                  (interfaces . (axis-group-interface
1838                                 system-interface))))))
1839
1840     (SystemStartBar
1841      . (
1842         (collapse-height . 5.0)
1843         (direction . ,LEFT)
1844
1845         ;; ugh--hardcoded.
1846         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
1847         (stencil . ,ly:system-start-delimiter::print)
1848         (style . bar-line)
1849         (thickness . 1.6)
1850         (X-offset . ,ly:side-position-interface::x-aligned-side)
1851         (Y-extent . #f)
1852         (meta . ((class . Spanner)
1853                  (interfaces . (side-position-interface
1854                                 system-start-delimiter-interface))))))
1855
1856     (SystemStartBrace
1857      . (
1858         (collapse-height . 5.0)
1859         (direction . ,LEFT)
1860         (font-encoding . fetaBraces)
1861         (padding . 0.3)
1862         (stencil . ,ly:system-start-delimiter::print)
1863         (style . brace)
1864         (X-offset . ,ly:side-position-interface::x-aligned-side)
1865         (Y-extent . #f)
1866         (meta . ((class . Spanner)
1867                  (interfaces . (font-interface
1868                                 side-position-interface
1869                                 system-start-delimiter-interface))))))
1870
1871     (SystemStartBracket
1872      . (
1873         (collapse-height . 5.0)
1874         (direction . ,LEFT)
1875         (padding . 0.8)
1876         (stencil . ,ly:system-start-delimiter::print)
1877         (style . bracket)
1878         (thickness . 0.45)
1879         (X-offset . ,ly:side-position-interface::x-aligned-side)
1880         (Y-extent . #f)
1881         (meta . ((class . Spanner)
1882                  (interfaces . (font-interface
1883                                 side-position-interface
1884                                 system-start-delimiter-interface))))))
1885
1886     (SystemStartSquare
1887      . (
1888         (direction . ,LEFT)
1889         (stencil . ,ly:system-start-delimiter::print)
1890         (style . line-bracket)
1891         (thickness . 1.0)
1892         (X-offset . ,ly:side-position-interface::x-aligned-side)
1893         (Y-extent . #f)
1894         (meta . ((class . Spanner)
1895                  (interfaces . (font-interface
1896                                 side-position-interface
1897                                 system-start-delimiter-interface))))))
1898
1899
1900     (TabNoteHead
1901      . (
1902         (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible)
1903                                         (parenthesize . #t)))
1904                     (repeat-tied-properties . ((note-head-visible . #t)
1905                                                (parenthesize . #t)))))
1906         (direction . ,CENTER)
1907         (duration-log . ,note-head::calc-duration-log)
1908         (font-series . bold)
1909         (font-size . -2)
1910         (stem-attachment . (0.0 . 1.35))
1911         (stencil . ,ly:text-interface::print)
1912         (whiteout . #t)
1913         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1914         (Y-offset . ,ly:staff-symbol-referencer::callback)
1915         (meta . ((class . Item)
1916                  (interfaces  . (font-interface
1917                                  note-head-interface
1918                                  rhythmic-grob-interface
1919                                  rhythmic-head-interface
1920                                  staff-symbol-referencer-interface
1921                                  tab-note-head-interface
1922                                  text-interface))))))
1923
1924     (TextScript
1925      . (
1926         (avoid-slur . around)
1927         (cross-staff . ,ly:script-interface::calc-cross-staff)
1928         (direction . ,DOWN)
1929         (direction . ,ly:script-interface::calc-direction)
1930         (extra-spacing-width . (+inf.0 . -inf.0))
1931         (outside-staff-priority . 450)
1932
1933         ;; sync with Fingering ?
1934         (padding . 0.5)
1935
1936         (positioning-done . ,ly:script-interface::calc-positioning-done)
1937         (script-priority . 200)
1938         (side-axis . ,Y)
1939         (slur-padding . 0.5)
1940         (staff-padding . 0.5)
1941         (stencil . ,ly:text-interface::print)
1942         ;; todo: add X self alignment?
1943         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1944         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1945         (meta . ((class . Item)
1946                  (interfaces . (font-interface
1947                                 instrument-specific-markup-interface
1948                                 self-alignment-interface
1949                                 side-position-interface
1950                                 text-interface
1951                                 text-script-interface))))))
1952
1953     (TextSpanner
1954      . (
1955         (bound-details . ((left . ((Y . 0)
1956                                    (padding . 0.25)
1957                                    (attach-dir . ,LEFT)
1958                                    ))
1959                           (left-broken . ((end-on-note . #t)))
1960                           (right . ((Y . 0)
1961                                     (padding . 0.25)
1962                                     ))
1963                           ))
1964         (dash-fraction . 0.2)
1965         (dash-period . 3.0)
1966         (direction . ,UP)
1967         (font-shape . italic)
1968         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1969         (outside-staff-priority . 350)
1970         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1971         (side-axis . ,Y)
1972         (staff-padding . 0.8)
1973         (stencil . ,ly:line-spanner::print)
1974         (style . dashed-line)
1975         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1976
1977         (meta . ((class . Spanner)
1978                  (interfaces . (font-interface
1979                                 line-interface
1980                                 line-spanner-interface
1981                                 side-position-interface))))))
1982
1983     (Tie
1984      . (
1985         (avoid-slur . inside)
1986         (control-points . ,ly:tie::calc-control-points)
1987         (details . (
1988                     ;; for a full list, see tie-details.cc
1989                     (ratio . 0.333)
1990                     (center-staff-line-clearance . 0.6)
1991                     (tip-staff-line-clearance . 0.45)
1992                     (note-head-gap . 0.2)
1993                     (stem-gap . 0.35)
1994                     (height-limit . 1.0)
1995                     (horizontal-distance-penalty-factor . 10)
1996                     (same-dir-as-stem-penalty . 8)
1997                     (min-length-penalty-factor . 26)
1998                     (tie-tie-collision-distance . 0.45)
1999                     (tie-tie-collision-penalty . 25.0)
2000                     (intra-space-threshold . 1.25)
2001                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2002                     (outer-tie-length-symmetry-penalty-factor . 10)
2003                     (vertical-distance-penalty-factor . 7)
2004                     (outer-tie-vertical-gap . 0.25)
2005                     (multi-tie-region-size . 3)
2006                     (single-tie-region-size . 4)
2007                     (between-length-limit . 1.0)))
2008
2009         (direction . ,ly:tie::calc-direction)
2010         (font-size . -6)
2011         (line-thickness . 0.8)
2012         (neutral-direction . ,UP)
2013         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2014         (stencil . ,ly:tie::print)
2015         (thickness . 1.2)
2016         (meta . ((class . Spanner)
2017                  (interfaces . (tie-interface))))))
2018
2019     (TieColumn
2020      . (
2021         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2022         (positioning-done . ,ly:tie-column::calc-positioning-done)
2023         (X-extent . #f)
2024         (Y-extent . #f)
2025         (meta . ((class . Spanner)
2026                  (interfaces . (tie-column-interface))))))
2027
2028     (TimeSignature
2029      . (
2030         (avoid-slur . inside)
2031         (break-align-anchor
2032          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2033         (break-align-symbol . time-signature)
2034         (break-visibility . ,all-visible)
2035         (extra-spacing-height . (-1.0 . 1.0))
2036         (non-musical . #t)
2037         (space-alist . (
2038                         (first-note . (fixed-space . 2.0))
2039                         (right-edge . (extra-space . 0.5))
2040                         (staff-bar . (minimum-space . 2.0))))
2041         (stencil . ,ly:time-signature::print)
2042         (style . C)
2043         (meta . ((class . Item)
2044                  (interfaces . (break-aligned-interface
2045                                 font-interface
2046                                 time-signature-interface))))))
2047
2048     (TrillPitchAccidental
2049      . (
2050         (direction . ,LEFT)
2051         (font-size . -4)
2052         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2053         (padding . 0.2)
2054         (side-axis . ,X)
2055         (stencil . ,ly:accidental-interface::print)
2056         (X-offset . ,ly:side-position-interface::x-aligned-side)
2057         (Y-extent . ,ly:accidental-interface::height)
2058         (meta . ((class . Item)
2059                  (interfaces . (accidental-interface
2060                                 font-interface
2061                                 side-position-interface
2062                                 trill-pitch-accidental-interface))))))
2063
2064     (TrillPitchGroup
2065      . (
2066         (axes . (,X))
2067         (direction . ,RIGHT)
2068         (font-size . -4)
2069         (padding . 0.3)
2070         (side-axis . ,X)
2071         (stencil . ,parenthesize-elements)
2072         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2073         (X-offset . ,ly:side-position-interface::x-aligned-side)
2074         (meta . ((class . Item)
2075                  (interfaces . (axis-group-interface
2076                                 font-interface
2077                                 note-head-interface
2078                                 parentheses-interface
2079                                 side-position-interface))))))
2080
2081     (TrillPitchHead
2082      . (
2083         (duration-log . 2)
2084         (font-size . -4)
2085         (stencil . ,ly:note-head::print)
2086         (Y-offset . ,ly:staff-symbol-referencer::callback)
2087         (meta . ((class . Item)
2088                  (interfaces . (font-interface
2089                                 ledgered-interface
2090                                 pitched-trill-interface
2091                                 rhythmic-head-interface
2092                                 staff-symbol-referencer-interface))))))
2093
2094     (TrillSpanner
2095      . (
2096         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2097         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2098                                    (Y . 0)
2099                                    (stencil-offset . (-0.5 . -1))
2100                                    (padding . 0.5)
2101                                    (attach-dir . ,CENTER)
2102                                    ))
2103                           (left-broken . ((end-on-note . #t)))
2104                           (right . ((Y . 0)))
2105                           ))
2106         (direction . ,UP)
2107         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2108         (outside-staff-priority . 50)
2109         (padding . 0.5)
2110         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2111         (side-axis . ,Y)
2112         (staff-padding . 1.0)
2113         (stencil . ,ly:line-spanner::print)
2114         (style . trill)
2115         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2116         (meta . ((class . Spanner)
2117                  (interfaces . (font-interface
2118                                 line-interface
2119                                 line-spanner-interface
2120                                 side-position-interface
2121                                 trill-spanner-interface))))))
2122
2123     (TupletBracket
2124      . (
2125         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2126         (control-points . ,ly:tuplet-bracket::calc-control-points)
2127         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2128         (direction  . ,ly:tuplet-bracket::calc-direction)
2129         (edge-height . (0.7 . 0.7))
2130         (full-length-to-extent . #t)
2131         (padding . 1.1)
2132         (positions . ,ly:tuplet-bracket::calc-positions)
2133         (shorten-pair . (-0.2 . -0.2))
2134         (staff-padding . 0.25)
2135         (stencil . ,ly:tuplet-bracket::print)
2136         (thickness . 1.6)
2137
2138         (meta . ((class . Spanner)
2139                  (interfaces . (line-interface
2140                                 tuplet-bracket-interface))))))
2141
2142     (TupletNumber
2143      . (
2144         (avoid-slur . inside)
2145         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2146         (font-shape . italic)
2147         (font-size . -2)
2148         (stencil . ,ly:tuplet-number::print)
2149         (text . ,tuplet-number::calc-denominator-text)
2150         (meta . ((class . Spanner)
2151                  (interfaces . (font-interface
2152                                 text-interface
2153                                 tuplet-number-interface))))))
2154
2155
2156     (UnaCordaPedal
2157      . (
2158         (direction . ,RIGHT)
2159         (extra-spacing-width . (+inf.0 . -inf.0))
2160         (font-shape . italic)
2161         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2162         (self-alignment-X . ,CENTER)
2163         (stencil . ,ly:text-interface::print)
2164         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2165         (meta . ((class . Item)
2166                  (interfaces . (font-interface
2167                                 piano-pedal-script-interface
2168                                 self-alignment-interface
2169                                 text-interface))))))
2170
2171     (UnaCordaPedalLineSpanner
2172      . (
2173         (axes . (,Y))
2174         (direction . ,DOWN)
2175         (minimum-space . 1.0)
2176         (outside-staff-priority . 1000)
2177         (padding . 1.2)
2178         (side-axis . ,Y)
2179         (staff-padding . 1.2)
2180         (X-extent . ,ly:axis-group-interface::width)
2181         (Y-extent . ,ly:axis-group-interface::height)
2182         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2183         (meta . ((class . Spanner)
2184                  (interfaces . (axis-group-interface
2185                                 piano-pedal-interface
2186                                 side-position-interface))))))
2187
2188
2189     (VaticanaLigature
2190      . (
2191         (flexa-width . 2.0)
2192         (stencil . ,ly:vaticana-ligature::print)
2193         (thickness . 0.6)
2194         (meta . ((class . Spanner)
2195                  (interfaces . (font-interface
2196                                 vaticana-ligature-interface))))))
2197
2198     (VerticalAlignment
2199      . (
2200         (axes . (,Y))
2201         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2202         (stacking-dir . -1)
2203         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2204         (X-extent . ,ly:axis-group-interface::width)
2205         (Y-extent . ,ly:axis-group-interface::height)
2206         (meta . ((class . Spanner)
2207                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)))
2208                  (interfaces . (align-interface
2209                                 axis-group-interface))))))
2210
2211     (VerticalAxisGroup
2212      . (
2213         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2214         (axes . (,Y))
2215         (default-next-staff-spacing . ((space . 9)
2216                                        (minimum-distance . 8)
2217                                        (padding . 1)))
2218         (next-staff-spacing . ,ly:axis-group-interface::calc-next-staff-spacing)
2219         (non-affinity-spacing . ((padding . 0.5)))
2220         (stencil . ,ly:axis-group-interface::print)
2221         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2222         (X-extent . ,ly:axis-group-interface::width)
2223         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2224         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2225         (meta . ((class . Spanner)
2226                  (object-callbacks . ((X-common . ,ly:axis-group-interface::calc-x-common)))
2227                  (interfaces . (axis-group-interface
2228                                 hara-kiri-group-spanner-interface
2229                                 vertically-spaceable-interface))))))
2230
2231     (VoiceFollower
2232      . (
2233         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2234         (bound-details . ((right . ((attach-dir .  ,CENTER)
2235                                     (padding . 1.5)
2236                                       ))
2237                           (left . ((attach-dir .  ,CENTER)
2238                                    (padding . 1.5)
2239                                       ))
2240                           ))
2241         (gap . 0.5)
2242         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2243         (non-musical . #t)
2244         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2245         (stencil . ,ly:line-spanner::print)
2246         (style . line)
2247         (X-extent . #f)
2248         (Y-extent . #f)
2249         (meta . ((class . Spanner)
2250                  (interfaces . (line-interface
2251                                 line-spanner-interface))))))
2252
2253     (VoltaBracket
2254      . (
2255         (direction . ,UP)
2256         (edge-height . (2.0 . 2.0)) ;; staff-space;
2257         (font-encoding . fetaText)
2258         (font-size . -4)
2259         (stencil . ,ly:volta-bracket-interface::print)
2260         (thickness . 1.6) ;; line-thickness
2261         (word-space . 0.6)
2262         (meta . ((class . Spanner)
2263                  (interfaces . (font-interface
2264                                 horizontal-bracket-interface
2265                                 line-interface
2266                                 side-position-interface
2267                                 text-interface
2268                                 volta-bracket-interface
2269                                 volta-interface))))))
2270
2271     (VoltaBracketSpanner
2272      . (
2273         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2274         (axes . (,Y))
2275         (direction . ,UP)
2276         (no-alignment . #t)
2277         (outside-staff-priority . 600)
2278         (padding . 1)
2279         (side-axis . ,Y)
2280         (X-extent . ,ly:axis-group-interface::width)
2281         (Y-extent . ,ly:axis-group-interface::height)
2282         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2283         (meta . ((class . Spanner)
2284                  (interfaces . (axis-group-interface
2285                                 side-position-interface
2286                                 volta-interface))))))
2287
2288 ))
2289
2290 (define (completize-grob-entry x)
2291   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2292 "
2293   ;;  (display (car x))
2294   ;;  (newline)
2295   (let* ((name-sym  (car x))
2296          (grob-entry (cdr x))
2297          (meta-entry (assoc-get 'meta grob-entry))
2298          (class (assoc-get 'class meta-entry))
2299          (ifaces-entry
2300           (assoc-get 'interfaces meta-entry)))
2301
2302     (cond
2303      ((eq? 'Item class)
2304       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2305      ((eq? 'Spanner class)
2306       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2307      ((eq? 'Paper_column class)
2308       (set! ifaces-entry (cons 'item-interface
2309                                (cons 'paper-column-interface ifaces-entry))))
2310      ((eq? 'System class)
2311       (set! ifaces-entry (cons 'system-interface
2312                                (cons 'spanner-interface ifaces-entry))))
2313      (else
2314       (ly:warning "Unknown class ~a" class)))
2315
2316     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2317     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2318
2319     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2320     (set! meta-entry (assoc-set! meta-entry 'interfaces
2321                                  ifaces-entry))
2322     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2323     (cons name-sym grob-entry)))
2324
2325 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2326
2327 ;;  (display (map pair? all-grob-descriptions))
2328
2329 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2330
2331 (map (lambda (x)
2332        ;; (display (car x)) (newline)
2333
2334        (set-object-property! (car x) 'translation-type? list?)
2335        (set-object-property! (car x) 'is-grob? #t))
2336      all-grob-descriptions)
2337
2338 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2339
2340 (define (volta-bracket-interface::pure-height grob start end)
2341   (let ((edge-height (ly:grob-property grob 'edge-height)))
2342     (if (number-pair? edge-height)
2343         (let ((smaller (min (car edge-height) (cdr edge-height)))
2344               (larger (max (car edge-height) (cdr edge-height))))
2345           (interval-union '(0 . 0) (cons smaller larger)))
2346         '(0 . 0))))
2347
2348 (define pure-print-callbacks
2349   (list
2350    fret-board::calc-stencil
2351    note-head::brew-ez-stencil
2352    print-circled-text-callback
2353    laissez-vibrer::print
2354    lyric-text::print
2355    ly:bar-line::print
2356    ly:mensural-ligature::brew-ligature-primitive
2357    ly:note-head::print
2358    ly:dots::print
2359    ly:clef::print
2360    ly:text-interface::print
2361    ly:script-interface::print))
2362
2363 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2364 ;; and the print function is not pure, but there is a easy way to
2365 ;; figure out the Y-extent from the print function.
2366 (define pure-print-to-height-conversions
2367   `(
2368     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2369     (,ly:arpeggio::brew-chord-bracket . ,ly:arpeggio::pure-height)
2370     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2371     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2372
2373 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2374 (define (pure-stencil-height grob start stop)
2375   (let* ((sten (ly:grob-property-data grob 'stencil))
2376          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2377     (cond ((or
2378             (ly:stencil? sten)
2379             (memq sten pure-print-callbacks))
2380            (ly:grob::stencil-height grob))
2381           ((procedure? pure-height-callback)
2382            (pure-height-callback grob start stop))
2383           (else
2384            '(0 . 0)))))
2385
2386 (define pure-conversions-alist
2387   `(
2388     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2389     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2390     (,ly:stem::height . ,ly:stem::pure-height)
2391     (,ly:rest::height . ,ly:rest::pure-height)
2392     (,ly:grob::stencil-height . ,pure-stencil-height)
2393     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2394     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2395     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2396     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2397     (,ly:slur::height . ,ly:slur::pure-height)
2398     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)))
2399
2400 (define pure-functions
2401   (list
2402    parenthesize-elements
2403    laissez-vibrer::print
2404    ly:rest::y-offset-callback
2405    ly:staff-symbol-referencer::callback
2406    ly:staff-symbol::height))
2407
2408 (define-public (pure-relevant? grob)
2409   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2410     (not (eq? #f
2411               (or
2412                (pair? extent-callback)
2413                (memq extent-callback pure-functions)
2414                (and
2415                 (pair? (assq extent-callback pure-conversions-alist))
2416                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2417                   (or
2418                    (not (eq? extent-callback ly:grob::stencil-height))
2419                    (memq stencil pure-print-callbacks)
2420                    (assq stencil pure-print-to-height-conversions)
2421                    (ly:stencil? stencil)))))))))
2422
2423 (define-public (call-pure-function unpure args start end)
2424   (if (ly:simple-closure? unpure)
2425       (ly:eval-simple-closure (car args) unpure start end)
2426       (if (not (procedure? unpure))
2427           unpure
2428           (if (memq unpure pure-functions)
2429               (apply unpure args)
2430               (let ((pure (assq unpure pure-conversions-alist)))
2431                 (if pure
2432                     (apply (cdr pure)
2433                            (append
2434                             (list (car args) start end)
2435                             (cdr args)))))))))