]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Fix 932.
[lilypond.git] / scm / define-grobs.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 1998--2009 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         (padding . 0.5)
537         (script-priority . 200)
538         (side-axis . ,Y)
539         (staff-padding . 0.5)
540         ;; todo: add X self alignment?
541         (stencil . ,ly:text-interface::print)
542         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
543         (Y-offset . ,ly:side-position-interface::y-aligned-side)
544         (meta . ((class . Item)
545                  (interfaces . (font-interface
546                                 side-position-interface
547                                 text-interface
548                                 text-script-interface))))))
549
550     (Custos
551      . (
552         (break-align-symbol . custos)
553         (break-visibility . ,end-of-line-visible)
554         (neutral-direction . ,DOWN)
555         (non-musical . #t)
556         (space-alist . (
557                         (first-note . (minimum-fixed-space . 0.0))
558                         (right-edge . (extra-space . 0.1))))
559         (stencil . ,ly:custos::print)
560         (style . vaticana)
561         (Y-offset . ,ly:staff-symbol-referencer::callback)
562         (meta . ((class . Item)
563                  (interfaces  . (break-aligned-interface
564                                  custos-interface
565                                  font-interface
566                                  staff-symbol-referencer-interface))))))
567
568     (DotColumn
569      . (
570         (axes . (,X))
571         (direction . ,RIGHT)
572         (positioning-done . ,ly:dot-column::calc-positioning-done)
573         (X-extent . ,ly:axis-group-interface::width)
574         (meta . ((class . Item)
575                  (interfaces . (axis-group-interface
576                                 dot-column-interface))))))
577
578     (Dots
579      . (
580         (dot-count . ,dots::calc-dot-count)
581         (staff-position . ,dots::calc-staff-position)
582         (stencil . ,ly:dots::print)
583         (meta . ((class . Item)
584                  (interfaces . (dots-interface
585                                 font-interface
586                                 staff-symbol-referencer-interface))))))
587
588     (DoublePercentRepeat
589      . (
590         (break-align-symbol . staff-bar)
591         (break-visibility . ,begin-of-line-invisible)
592         (dot-negative-kern . 0.75)
593         (font-encoding . fetaMusic)
594         (non-musical . #t)
595         (slash-negative-kern . 1.6)
596         (slope . 1.0)
597         (stencil . ,ly:percent-repeat-item-interface::double-percent)
598         (thickness . 0.48)
599         (width . 2.0)
600         (meta . ((class . Item)
601                  (interfaces . (break-aligned-interface
602                                 font-interface
603                                 percent-repeat-interface
604                                 percent-repeat-item-interface))))))
605
606     (DoublePercentRepeatCounter
607      . (
608         (direction . ,UP)
609         (font-encoding . fetaNumber)
610         (font-size . -2)
611         (padding . 0.2)
612         (self-alignment-X . ,CENTER)
613         (side-axis . ,Y)
614         (staff-padding . 0.25)
615         (stencil . ,ly:text-interface::print)
616         (X-offset . ,(ly:make-simple-closure
617                       `(,+
618                         ,(ly:make-simple-closure
619                           (list ly:self-alignment-interface::centered-on-y-parent))
620                         ,(ly:make-simple-closure
621                           (list ly:self-alignment-interface::x-aligned-on-self)))))
622         (Y-offset . ,ly:side-position-interface::y-aligned-side)
623         (meta . ((class . Item)
624                  (interfaces . (font-interface
625                                 percent-repeat-interface
626                                 percent-repeat-item-interface
627                                 self-alignment-interface
628                                 side-position-interface
629                                 text-interface))))))
630
631     (DynamicLineSpanner
632      . (
633         (axes . (,Y))
634         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
635         (direction . ,DOWN)
636         (minimum-space . 1.2)
637         (outside-staff-priority . 250)
638         (padding . 0.6)
639         (side-axis . ,Y)
640         (slur-padding . 0.3)
641         (staff-padding . 0.1)
642         (X-extent . ,ly:axis-group-interface::width)
643         (Y-extent . ,ly:axis-group-interface::height)
644         (Y-offset . ,ly:side-position-interface::y-aligned-side)
645         (meta . ((class . Spanner)
646                  (interfaces . (axis-group-interface
647                                 dynamic-interface
648                                 dynamic-line-spanner-interface
649                                 side-position-interface))))))
650
651     (DynamicText
652      . (
653
654         ;; todo.
655
656         (direction . ,ly:script-interface::calc-direction)
657         (extra-spacing-width . (+inf.0 . -inf.0))
658         (font-encoding . fetaDynamic)
659         (font-series . bold)
660         (font-shape . italic)
661         (outside-staff-priority . 250)
662         (positioning-done . ,ly:script-interface::calc-positioning-done)
663         (self-alignment-X . ,CENTER)
664         (self-alignment-Y . ,CENTER)
665         (stencil . ,ly:text-interface::print)
666         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
667         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
668         (meta . ((class . Item)
669                  (interfaces . (dynamic-interface
670                                 font-interface
671                                 script-interface
672                                 self-alignment-interface
673                                 text-interface))))))
674
675     (DynamicTextSpanner
676      . (
677         (bound-details . ((right . ((attach-dir .  ,LEFT)
678                                     (Y . 0)
679                                     (padding . 0.75)
680                                     ))
681                           (right-broken . ((attach-dir .  ,RIGHT)
682                                     (padding . 0.0)
683                                     ))
684
685                           (left . ((attach-dir .  ,LEFT)
686                                    (Y . 0)
687                                    (stencil-offset . (0 . -0.5))
688                                    (padding . 0.5)
689                                    ))
690                           (left-broken . ((attach-dir .  ,RIGHT)
691                                    ))
692                           ))
693         (dash-fraction . 0.2)
694         (dash-period . 3.0)
695
696         ;; rather ugh with NCSB
697         ;; (font-series . bold)
698         (font-shape . italic)
699
700         ;; need to blend with dynamic texts.
701         (font-size . 1)
702
703         (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
704
705         ;; make sure the spanner doesn't get too close to notes
706         (minimum-Y-extent . (-1 . 1))
707
708         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
709         (stencil . ,ly:line-spanner::print)
710         (style . dashed-line)
711         (meta . ((class . Spanner)
712                  (interfaces . (dynamic-interface
713                                 dynamic-text-spanner-interface
714                                 font-interface
715                                 line-interface
716                                 line-spanner-interface
717                                 spanner-interface
718                                 text-interface))))))
719
720
721     (Fingering
722      . (
723
724         ;; sync with TextScript (?)
725
726         (avoid-slur . around)
727         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
728         (direction . ,ly:script-interface::calc-direction)
729         (font-encoding . fetaNumber)
730         (font-size . -5)                ; don't overlap when next to heads.
731         (padding . 0.5)
732         (positioning-done . ,ly:script-interface::calc-positioning-done)
733         (script-priority . 100)
734         (self-alignment-X . ,CENTER)
735         (self-alignment-Y . ,CENTER)
736         (slur-padding . 0.2)
737         (staff-padding . 0.5)
738         (stencil . ,ly:text-interface::print)
739         (text . ,fingering::calc-text)
740         (meta . ((class . Item)
741                  (interfaces . (finger-interface
742                                 font-interface
743                                 self-alignment-interface
744                                 side-position-interface
745                                 text-interface
746                                 text-script-interface))))))
747
748     (FretBoard
749      . (
750         (after-line-breaking . ,ly:chord-name::after-line-breaking)
751         (fret-diagram-details . ((finger-code . below-string)))
752         (stencil . ,fret-board::calc-stencil)
753         (meta . ((class . Item)
754                  (interfaces . (chord-name-interface
755                                 font-interface
756                                 fret-diagram-interface
757                                 rhythmic-grob-interface))))))
758
759
760     (Glissando
761      . (
762         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
763         (bound-details . ((right . ((attach-dir .  ,CENTER)
764                                     (padding . 1.5)
765                                       ))
766                           (left . ((attach-dir .  ,CENTER)
767                                    (padding . 1.5)
768                                       ))
769                           ))
770         (gap . 0.5)
771         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
772         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
773         (stencil . ,ly:line-spanner::print)
774         (style . line)
775         (X-extent . #f)
776         (Y-extent . #f)
777         (zigzag-width . 0.75)
778         (meta . ((class . Spanner)
779                  (interfaces . (line-interface
780                                 line-spanner-interface
781                                 unbreakable-spanner-interface))))))
782
783     (GraceSpacing
784      . (
785         (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
786         (shortest-duration-space . 1.6)
787         (spacing-increment . 0.8)
788         (meta . ((class . Spanner)
789                  (interfaces . (grace-spacing-interface
790                                 spacing-options-interface
791                                 spanner-interface))))))
792
793     (GridLine
794      . (
795         (layer . 0)
796         (self-alignment-X . ,CENTER)
797         (stencil . ,ly:grid-line-interface::print)
798         (X-extent  . ,ly:grid-line-interface::width)
799         (X-offset . ,(ly:make-simple-closure
800                       `(,+
801                         ,(ly:make-simple-closure
802                           (list ly:self-alignment-interface::centered-on-x-parent))
803                         ,(ly:make-simple-closure
804                           (list ly:self-alignment-interface::x-aligned-on-self)))))
805         (meta . ((class . Item)
806                  (interfaces . (grid-line-interface
807                                 self-alignment-interface))))))
808
809     (GridPoint
810      . (
811         (X-extent . (0 . 0))
812         (Y-extent . (0 . 0))
813         (meta . ((class . Item)
814                  (interfaces . (grid-point-interface))))))
815
816
817     (Hairpin
818      . (
819         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
820         (bound-padding . 1.0)
821         (circled-tip . #f)
822         (grow-direction . ,hairpin::calc-grow-direction)
823         (height . 0.6666)
824         (minimum-length . 2.0)
825         (self-alignment-Y . ,CENTER)
826         (springs-and-rods . ,ly:spanner::set-spacing-rods)
827         (stencil . ,ly:hairpin::print)
828         (thickness . 1.0)
829         (to-barline . #t)
830         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
831         (meta . ((class . Spanner)
832                  (interfaces . (dynamic-interface
833                                 hairpin-interface
834                                 line-interface
835                                 self-alignment-interface
836                                 spanner-interface))))))
837
838     (HarmonicParenthesesItem
839      . (
840         (padding . 0)
841         (stencil . ,parentheses-item::print)
842         (stencils . ,parentheses-item::calc-angled-bracket-stencils)
843         (meta . ((class . Item)
844                  (interfaces . (font-interface
845                                 parentheses-interface))))))
846
847     (HorizontalBracket
848      . (
849         (bracket-flare . (0.5 . 0.5))
850         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
851         (direction . ,DOWN)
852         (padding . 0.2)
853         (side-axis . ,Y)
854         (staff-padding . 0.2)
855         (stencil . ,ly:horizontal-bracket::print)
856         (thickness . 1.0)
857         (Y-offset . ,ly:side-position-interface::y-aligned-side)
858         (meta . ((class . Spanner)
859                  (interfaces . (horizontal-bracket-interface
860                                 line-interface
861                                 side-position-interface
862                                 spanner-interface))))))
863
864
865     (InstrumentName
866      . (
867         (direction . ,LEFT)
868         (padding . 0.3)
869         (self-alignment-X . ,CENTER)
870         (self-alignment-Y . ,CENTER)
871         (stencil . ,system-start-text::print)
872         (X-offset . ,system-start-text::calc-x-offset)
873         (Y-offset . ,system-start-text::calc-y-offset)
874         (meta . ((class . Spanner)
875                  (interfaces . (font-interface
876                                 self-alignment-interface
877                                 side-position-interface
878                                 system-start-text-interface))))))
879
880     (InstrumentSwitch
881      . (
882         (direction . ,UP)
883         (extra-spacing-width . (+inf.0 . -inf.0))
884         (outside-staff-priority . 500)
885         (padding . 0.5)
886         (self-alignment-X . ,LEFT)
887         (side-axis . ,Y)
888         (staff-padding . 0.5)
889         (stencil . ,ly:text-interface::print)
890         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
891         (Y-offset . ,ly:side-position-interface::y-aligned-side)
892         (meta . ((class . Item)
893                  (interfaces . (font-interface
894                                 self-alignment-interface
895                                 side-position-interface
896                                 text-interface))))))
897
898
899     (KeyCancellation
900      . (
901         (break-align-symbol . key-cancellation)
902         (break-visibility . ,begin-of-line-invisible)
903         (glyph-name-alist . ,cancellation-glyph-name-alist)
904         (non-musical . #t)
905         (space-alist . (
906                         (time-signature . (extra-space . 1.25))
907                         (staff-bar . (extra-space . 0.6))
908                         (key-signature . (extra-space . 0.5))
909                         (right-edge . (extra-space . 0.5))
910                         (first-note . (fixed-space . 2.5))))
911         (stencil . ,ly:key-signature-interface::print)
912         (Y-offset . ,ly:staff-symbol-referencer::callback)
913         (meta . ((class . Item)
914                  (interfaces . (break-aligned-interface
915                                 font-interface
916                                 key-cancellation-interface
917                                 key-signature-interface
918                                 staff-symbol-referencer-interface))))))
919
920     (KeySignature
921      . (
922         (avoid-slur . inside)
923         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
924         (break-align-symbol . key-signature)
925         (break-visibility . ,begin-of-line-visible)
926         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
927         (non-musical . #t)
928         (space-alist . (
929                         (time-signature . (extra-space . 1.15))
930                         (staff-bar . (extra-space . 1.1))
931                         (right-edge . (extra-space . 0.5))
932                         (first-note . (fixed-space . 2.5))))
933         (stencil . ,ly:key-signature-interface::print)
934         (Y-offset . ,ly:staff-symbol-referencer::callback)
935         (meta . ((class . Item)
936                  (interfaces . (break-aligned-interface
937                                 font-interface
938                                 key-signature-interface
939                                 staff-symbol-referencer-interface))))))
940
941
942    (LaissezVibrerTie
943      . (
944         (control-points . ,ly:semi-tie::calc-control-points)
945         (details . ((ratio . 0.333)
946                     (height-limit . 1.0)))
947         (direction . ,ly:tie::calc-direction)
948         (head-direction . ,LEFT)
949         (stencil  . ,ly:tie::print)
950         (thickness . 1.0)
951         (meta . ((class . Item)
952                  (interfaces . (semi-tie-interface))))))
953
954     (LaissezVibrerTieColumn
955      . (
956         (head-direction . ,LEFT)
957         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
958         (X-extent . #f)
959         (Y-extent . #f)
960         (meta . ((class . Item)
961                  (interfaces . (semi-tie-column-interface))))))
962
963     (LedgerLineSpanner
964      . (
965         (layer . 0)
966         (length-fraction . 0.25)
967         (minimum-length-fraction . 0.25)
968         (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
969         (stencil . ,ly:ledger-line-spanner::print)
970         (X-extent . #f)
971         (Y-extent . #f)
972         (meta . ((class . Spanner)
973                  (interfaces . (ledger-line-spanner-interface))))))
974
975     (LeftEdge
976      . (
977         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
978         (break-align-symbol . left-edge)
979         (break-visibility . ,center-invisible)
980         (non-musical . #t)
981         (space-alist . (
982                         (custos . (extra-space . 0.0))
983                         (ambitus . (extra-space . 2.0))
984                         (time-signature . (extra-space . 1.0))
985                         (staff-bar . (extra-space . 0.0))
986                         (breathing-sign . (minimum-space . 0.0))
987                         (clef . (extra-space . 0.8))
988                         (first-note . (fixed-space . 2.0))
989                         (right-edge . (extra-space . 0.0))
990                         (key-signature . (extra-space . 0.8))
991                         (key-cancellation . (extra-space . 0.0))
992                         ))
993         (X-extent . (0 . 0))
994         (meta . ((class . Item)
995                  (interfaces . (break-aligned-interface))))))
996
997     (LigatureBracket
998      . (
999         ;; ugh.  A ligature bracket is totally different from
1000         ;; a tuplet bracket.
1001
1002         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1003         (control-points . ,ly:tuplet-bracket::calc-control-points)
1004         (direction . ,UP)
1005         (edge-height . (0.7 . 0.7))
1006         (padding . 2.0)
1007         (positions . ,ly:tuplet-bracket::calc-positions)
1008         (shorten-pair . (-0.2 . -0.2))
1009         (staff-padding . 0.25)
1010         (stencil . ,ly:tuplet-bracket::print)
1011         (thickness . 1.6)
1012         (meta . ((class . Spanner)
1013                  (interfaces . (line-interface
1014                                 tuplet-bracket-interface))))))
1015
1016     (LyricExtender
1017      . (
1018         (minimum-length . 1.5)
1019         (stencil . ,ly:lyric-extender::print)
1020         (thickness . 0.8) ; line-thickness
1021         (Y-extent . (0 . 0))
1022         (meta . ((class . Spanner)
1023                  (interfaces . (lyric-extender-interface
1024                                 lyric-interface))))))
1025
1026     (LyricHyphen
1027      . (
1028         (dash-period . 10.0)
1029         (height . 0.42)
1030         (length . 0.66)
1031         (minimum-distance . 0.1)
1032         (minimum-length . 0.3)
1033         (padding . 0.07)
1034         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1035         (stencil . ,ly:lyric-hyphen::print)
1036         (thickness . 1.3)
1037         (Y-extent . (0 . 0))
1038         (meta . ((class . Spanner)
1039                  (interfaces . (font-interface
1040                                 lyric-hyphen-interface
1041                                 lyric-interface
1042                                 spanner-interface))))))
1043
1044     (LyricSpace
1045      . (
1046         (minimum-distance . 0.45)
1047         (padding . 0.0)
1048         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1049         (X-extent . #f)
1050         (Y-extent . #f)
1051         (meta . ((class . Spanner)
1052                  (interfaces . (lyric-hyphen-interface
1053                                 spanner-interface))))))
1054
1055     (LyricText
1056      . (
1057         (extra-spacing-width . (0.0 . 0.0))
1058         (font-series . bold-narrow)
1059         (font-size . 1.0)
1060         (self-alignment-X . ,CENTER)
1061         (stencil . ,lyric-text::print)
1062         (text . ,(grob::calc-property-by-copy 'text))
1063         (word-space . 0.6)
1064         (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1065         (meta . ((class . Item)
1066                  (interfaces . (font-interface
1067                                 lyric-syllable-interface
1068                                 rhythmic-grob-interface
1069                                 self-alignment-interface
1070                                 text-interface))))))
1071
1072
1073     (MeasureGrouping
1074      . (
1075         (direction . ,UP)
1076         (height . 2.0)
1077         (padding . 2)
1078         (side-axis . ,Y)
1079         (staff-padding . 3)
1080         (stencil . ,ly:measure-grouping::print)
1081         (thickness . 1)
1082         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1083         (meta . ((class . Spanner)
1084                  (interfaces . (measure-grouping-interface
1085                                 side-position-interface))))))
1086
1087     (MelodyItem
1088      . (
1089         (neutral-direction . ,DOWN)
1090         (meta . ((class . Item)
1091                  (interfaces . (melody-spanner-interface))))))
1092
1093     (MensuralLigature
1094      . (
1095         (flexa-width . 2.0)
1096         (stencil . ,ly:mensural-ligature::print)
1097         (thickness . 1.4)
1098         (meta . ((class . Spanner)
1099                  (interfaces . (font-interface
1100                                 mensural-ligature-interface))))))
1101
1102     (MetronomeMark
1103      . (
1104         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1105         (direction . ,UP)
1106         (extra-spacing-width . (+inf.0 . -inf.0))
1107         (outside-staff-priority . 1000)
1108         (padding . 0.8)
1109         (side-axis . ,Y)
1110         (stencil . ,ly:text-interface::print)
1111         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1112         (meta . ((class . Item)
1113                  (interfaces . (font-interface
1114                                 metronome-mark-interface
1115                                 side-position-interface
1116                                 text-interface))))))
1117
1118     (MultiMeasureRest
1119      . (
1120         (expand-limit . 10)
1121         (hair-thickness . 2.0)
1122         (padding . 1)
1123         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1124         (staff-position . 0)
1125         (stencil . ,ly:multi-measure-rest::print)
1126         (thick-thickness . 6.6)
1127         (Y-offset . ,ly:staff-symbol-referencer::callback)
1128         (meta . ((class . Spanner)
1129                  (interfaces . (font-interface
1130                                 multi-measure-interface
1131                                 multi-measure-rest-interface
1132                                 rest-interface
1133                                 staff-symbol-referencer-interface))))))
1134
1135     (MultiMeasureRestNumber
1136      . (
1137         (bound-padding  . 2.0)
1138         (direction . ,UP)
1139         (font-encoding . fetaNumber)
1140         (padding . 0.4)
1141         (self-alignment-X . ,CENTER)
1142         (side-axis . ,Y)
1143         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1144         (staff-padding . 0.4)
1145         (stencil . ,ly:text-interface::print)
1146         (X-offset . ,(ly:make-simple-closure
1147                       `(,+
1148                         ,(ly:make-simple-closure
1149                           (list ly:self-alignment-interface::x-aligned-on-self))
1150                         ,(ly:make-simple-closure
1151                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1152         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1153         (meta . ((class . Spanner)
1154                  (interfaces . (font-interface
1155                                 multi-measure-interface
1156                                 self-alignment-interface
1157                                 side-position-interface
1158                                 text-interface))))))
1159
1160     (MultiMeasureRestText
1161      . (
1162         (direction . ,UP)
1163         (outside-staff-priority . 450)
1164         (padding . 0.2)
1165         (self-alignment-X . ,CENTER)
1166         (staff-padding . 0.25)
1167         (stencil . ,ly:text-interface::print)
1168         (X-offset . ,(ly:make-simple-closure
1169                       `(,+
1170                         ,(ly:make-simple-closure
1171                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1172                         ,(ly:make-simple-closure
1173                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1174         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1175         (meta . ((class . Spanner)
1176                  (interfaces . (font-interface
1177                                 multi-measure-interface
1178                                 self-alignment-interface
1179                                 side-position-interface
1180                                 text-interface))))))
1181
1182
1183     (NonMusicalPaperColumn
1184      . (
1185         (allow-loose-spacing . #t)
1186         (axes . (,X))
1187         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1188         (full-measure-extra-space . 1.0)
1189         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1190         ;;                    (stencil . ,ly:paper-column::print)
1191
1192         (line-break-permission . allow)
1193         (non-musical . #t)
1194         (page-break-permission . allow)
1195
1196         ;; debugging stuff: print column number.
1197         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1198
1199         (X-extent . ,ly:axis-group-interface::width)
1200         (meta . ((class . Paper_column)
1201                  (interfaces . (axis-group-interface
1202                                 font-interface
1203                                 paper-column-interface
1204                                 separation-item-interface
1205                                 spaceable-grob-interface))))))
1206
1207     (NoteCollision
1208      . (
1209         (axes . (,X ,Y))
1210         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1211         (prefer-dotted-right . #t)
1212         (X-extent . ,ly:axis-group-interface::width)
1213         (Y-extent . ,ly:axis-group-interface::height)
1214         (meta . ((class . Item)
1215                  (interfaces . (axis-group-interface
1216                                 note-collision-interface))))))
1217
1218     (NoteColumn
1219      . (
1220         (axes . (,X ,Y))
1221         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1222         (X-extent . ,ly:axis-group-interface::width)
1223         (Y-extent . ,ly:axis-group-interface::height)
1224         (meta . ((class . Item)
1225                  (interfaces . (axis-group-interface
1226                                 note-column-interface
1227                                 separation-item-interface))))))
1228
1229     (NoteHead
1230      . (
1231         (duration-log . ,note-head::calc-duration-log)
1232         (glyph-name . ,note-head::calc-glyph-name)
1233         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1234         (stencil . ,ly:note-head::print)
1235         (X-offset . ,ly:note-head::stem-x-shift)
1236         (Y-offset . ,ly:staff-symbol-referencer::callback)
1237         (meta . ((class . Item)
1238                  (interfaces . (font-interface
1239                                 gregorian-ligature-interface
1240                                 ledgered-interface
1241                                 mensural-ligature-interface
1242                                 note-head-interface
1243                                 rhythmic-grob-interface
1244                                 rhythmic-head-interface
1245                                 staff-symbol-referencer-interface
1246                                 vaticana-ligature-interface))))))
1247
1248     (NoteName
1249      . (
1250         (stencil . ,ly:text-interface::print)
1251         (meta . ((class . Item)
1252                  (interfaces . (font-interface
1253                                 note-name-interface
1254                                 text-interface))))))
1255
1256     (NoteSpacing
1257      . (
1258         ;; Changed this from 0.75.
1259         ;; If you ever change this back, please document! --hwn
1260         (knee-spacing-correction . 1.0)
1261         (same-direction-correction . 0.25)
1262         (space-to-barline . #t)
1263         (stem-spacing-correction . 0.5)
1264         (meta . ((class . Item)
1265                  (interfaces . (note-spacing-interface
1266                                 spacing-interface))))))
1267
1268
1269     (OctavateEight
1270      . (
1271         (break-visibility . ,begin-of-line-visible)
1272         (font-shape . italic)
1273         (font-size . -4)
1274         (self-alignment-X . ,CENTER)
1275         (staff-padding . 0.2)
1276         (stencil . ,ly:text-interface::print)
1277         (X-offset . ,(ly:make-simple-closure
1278                       `(,+
1279                         ,(ly:make-simple-closure
1280                           (list ly:self-alignment-interface::x-aligned-on-self))
1281                         ,(ly:make-simple-closure
1282                           (list ly:self-alignment-interface::centered-on-x-parent)))))
1283         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1284         (meta . ((class . Item)
1285                  (interfaces . (font-interface
1286                                 self-alignment-interface
1287                                 side-position-interface
1288                                 text-interface))))))
1289
1290     (OttavaBracket
1291      . (
1292         (dash-fraction . 0.3)
1293         (direction . ,UP)
1294         (edge-height . (0 . 1.2))
1295         (font-shape . italic)
1296         (minimum-length . 1.0)
1297         (outside-staff-priority . 400)
1298         (padding . 0.5)
1299         (shorten-pair . (0.0 . -0.6))
1300         (staff-padding . 1.0)
1301         (stencil . ,ly:ottava-bracket::print)
1302         (style . dashed-line)
1303         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1304         (meta . ((class . Spanner)
1305                  (interfaces . (font-interface
1306                                 horizontal-bracket-interface
1307                                 line-interface
1308                                 ottava-bracket-interface
1309                                 side-position-interface
1310                                 text-interface))))))
1311
1312
1313     (PaperColumn
1314      . (
1315         (allow-loose-spacing . #t)
1316         (axes . (,X))
1317         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1318         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1319         ;; (stencil . ,ly:paper-column::print)
1320         (X-extent . ,ly:axis-group-interface::width)
1321
1322         ;; debugging
1323         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1324         (meta . ((class . Paper_column)
1325                  (interfaces . (axis-group-interface
1326                                 font-interface
1327                                 paper-column-interface
1328                                 separation-item-interface
1329                                 spaceable-grob-interface))))))
1330
1331     (ParenthesesItem
1332      . (
1333         (font-size . -6)
1334         (padding . 0.2)
1335         (stencil . ,parentheses-item::print)
1336         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1337         (meta . ((class . Item)
1338                  (interfaces . (font-interface
1339                                 parentheses-interface))))))
1340
1341     (PercentRepeat
1342      . (
1343         (dot-negative-kern . 0.75)
1344         (font-encoding . fetaMusic)
1345         (slope . 1.0)
1346         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1347         (stencil . ,ly:multi-measure-rest::percent)
1348         (thickness . 0.48)
1349         (meta . ((class . Spanner)
1350                  (interfaces . (font-interface
1351                                 multi-measure-rest-interface
1352                                 percent-repeat-interface))))))
1353
1354     (PercentRepeatCounter
1355      . (
1356         (direction . ,UP)
1357         (font-encoding . fetaNumber)
1358         (font-size . -2)
1359         (padding . 0.2)
1360         (self-alignment-X . ,CENTER)
1361         (staff-padding . 0.25)
1362         (stencil . ,ly:text-interface::print)
1363         (X-offset . ,(ly:make-simple-closure
1364                       `(,+
1365                         ,(ly:make-simple-closure
1366                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1367                         ,(ly:make-simple-closure
1368                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1369         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1370         (meta . ((class . Spanner)
1371                  (interfaces . (font-interface
1372                                 percent-repeat-interface
1373                                 self-alignment-interface
1374                                 side-position-interface
1375                                 text-interface))))))
1376
1377     (PhrasingSlur
1378      . (
1379         (control-points . ,ly:slur::calc-control-points)
1380         (cross-staff . ,ly:slur::calc-cross-staff)
1381         (details . ,default-slur-details)
1382         (direction . ,ly:slur::calc-direction)
1383         (height-limit . 2.0)
1384         (minimum-length . 1.5)
1385         (ratio . 0.333)
1386         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1387         (stencil . ,ly:slur::print)
1388         (thickness . 1.1)
1389         (Y-extent . ,ly:slur::height)
1390         (meta . ((class . Spanner)
1391                  (interfaces . (slur-interface))))))
1392
1393     ;; an example of a text spanner
1394     (PianoPedalBracket
1395      . (
1396         (bound-padding . 1.0)
1397         (bracket-flare . (0.5 . 0.5))
1398         (direction . ,DOWN)
1399         (edge-height . (1.0 . 1.0))
1400         (shorten-pair . (0.0 . 0.0))
1401         (stencil . ,ly:piano-pedal-bracket::print)
1402         (style . line)
1403         (thickness .  1.0)
1404         (meta . ((class . Spanner)
1405                  (interfaces . (line-interface
1406                                 piano-pedal-bracket-interface
1407                                 piano-pedal-interface))))))
1408
1409
1410     (RehearsalMark
1411      . (
1412         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1413         (baseline-skip . 2)
1414         (break-align-symbols . (staff-bar clef))
1415         (break-visibility . ,end-of-line-invisible)
1416         (direction . ,UP)
1417         (extra-spacing-width . (+inf.0 . -inf.0))
1418         (font-size . 2)
1419         (non-musical . #t)
1420         (outside-staff-priority . 1500)
1421         (padding . 0.8)
1422         (self-alignment-X . ,CENTER)
1423         (stencil . ,ly:text-interface::print)
1424         (X-offset . ,(ly:make-simple-closure
1425                       `(,+
1426                         ,(ly:make-simple-closure
1427                           (list ly:break-alignable-interface::self-align-callback))
1428                         ,(ly:make-simple-closure
1429                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1430         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1431         (meta . ((class . Item)
1432                  (interfaces . (break-alignable-interface
1433                                 font-interface
1434                                 mark-interface
1435                                 self-alignment-interface
1436                                 side-position-interface
1437                                 text-interface))))))
1438
1439     (RepeatSlash
1440      . (
1441         (slope . 1.7)
1442         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1443         (thickness . 0.48)
1444         (meta . ((class . Item)
1445                  (interfaces . (percent-repeat-interface
1446                                 percent-repeat-item-interface
1447                                 rhythmic-grob-interface))))))
1448
1449     (RepeatTie
1450      . (
1451         (control-points . ,ly:semi-tie::calc-control-points)
1452         (details . ((ratio . 0.333)
1453                     (height-limit . 1.0)))
1454         (direction . ,ly:tie::calc-direction)
1455         (head-direction . ,RIGHT)
1456         (stencil  . ,ly:tie::print)
1457         (thickness . 1.0)
1458         (meta . ((class . Item)
1459                  (interfaces . (semi-tie-interface))))))
1460
1461     (RepeatTieColumn
1462      . (
1463         (direction . ,ly:tie::calc-direction)
1464         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1465         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1466         (X-extent . #f)
1467         (Y-extent . #f)
1468         (meta . ((class . Item)
1469                  (interfaces . (semi-tie-column-interface))))))
1470
1471     (Rest
1472      . (
1473         (cross-staff . ,ly:rest::calc-cross-staff)
1474         (duration-log . ,stem::calc-duration-log)
1475         (minimum-distance . 0.25)
1476         (stencil . ,ly:rest::print)
1477         (X-extent . ,ly:rest::width)
1478         (Y-extent . ,ly:rest::height)
1479         (Y-offset . ,ly:rest::y-offset-callback)
1480         (meta . ((class . Item)
1481                  (interfaces . (font-interface
1482                                 rest-interface
1483                                 rhythmic-grob-interface
1484                                 rhythmic-head-interface
1485                                 staff-symbol-referencer-interface))))))
1486
1487     (RestCollision
1488      . (
1489         (minimum-distance . 0.75)
1490         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1491         (meta . ((class . Item)
1492                  (interfaces . (rest-collision-interface))))))
1493
1494
1495     (Script
1496      . (
1497         (cross-staff . ,ly:script-interface::calc-cross-staff)
1498         (direction . ,ly:script-interface::calc-direction)
1499         (font-encoding . fetaMusic)
1500         (positioning-done . ,ly:script-interface::calc-positioning-done)
1501         (side-axis . ,Y)
1502
1503         ;; padding set in script definitions.
1504         (staff-padding . 0.25)
1505
1506         (stencil . ,ly:script-interface::print)
1507         (X-offset . ,script-interface::calc-x-offset)
1508         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1509         (meta . ((class . Item)
1510                  (interfaces . (font-interface
1511                                 script-interface
1512                                 side-position-interface))))))
1513
1514     (ScriptColumn
1515      . (
1516         (before-line-breaking . ,ly:script-column::before-line-breaking)
1517         (meta . ((class . Item)
1518                  (interfaces . (script-column-interface))))))
1519
1520     (ScriptRow
1521      . (
1522         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1523         (meta . ((class . Item)
1524                  (interfaces . (script-column-interface))))))
1525
1526     (SeparationItem
1527      . (
1528         (avoid-slur . inside)
1529         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1530         (stencil . ,ly:separation-item::print)
1531         (X-extent . ,ly:axis-group-interface::width)
1532         (Y-extent . ,ly:axis-group-interface::height)
1533         (meta . ((class . Item)
1534                  (interfaces . (separation-item-interface))))))
1535
1536     (Slur
1537      . (
1538         (avoid-slur . inside)
1539         (control-points . ,ly:slur::calc-control-points)
1540         (cross-staff . ,ly:slur::calc-cross-staff)
1541         (details . ,default-slur-details)
1542         (direction . ,ly:slur::calc-direction)
1543         (height-limit . 2.0)
1544         (line-thickness . 0.8)
1545         (minimum-length . 1.5)
1546         (ratio . 0.25)
1547         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1548         (stencil . ,ly:slur::print)
1549         (thickness . 1.2)
1550         (Y-extent . ,ly:slur::height)
1551         (meta . ((class . Spanner)
1552                  (interfaces . (slur-interface))))))
1553
1554     (SostenutoPedal
1555      . (
1556         (direction . ,RIGHT)
1557         (extra-spacing-width . (+inf.0 . -inf.0))
1558         (font-shape . italic)
1559         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1560         (self-alignment-X . ,CENTER)
1561         (stencil . ,ly:text-interface::print)
1562         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1563         (meta . ((class . Item)
1564                  (interfaces . (font-interface
1565                                 piano-pedal-script-interface
1566                                 self-alignment-interface
1567                                 text-interface))))))
1568
1569     (SostenutoPedalLineSpanner
1570      . (
1571         (axes . (,Y))
1572         (direction . ,DOWN)
1573         (minimum-space . 1.0)
1574         (outside-staff-priority . 1000)
1575         (padding . 1.2)
1576         (side-axis . ,Y)
1577         (staff-padding . 1.0)
1578         (X-extent . ,ly:axis-group-interface::width)
1579         (Y-extent . ,ly:axis-group-interface::height)
1580         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1581         (meta . ((class . Spanner)
1582                  (interfaces . (axis-group-interface
1583                                 piano-pedal-interface
1584                                 side-position-interface))))))
1585
1586     (SpacingSpanner
1587      . (
1588         (average-spacing-wishes . #t)
1589         (base-shortest-duration . ,(ly:make-moment 3 16))
1590         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1591         (shortest-duration-space . 2.0)
1592         (spacing-increment . 1.2)
1593         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1594         (meta . ((class . Spanner)
1595                  (interfaces . (spacing-options-interface
1596                                 spacing-spanner-interface))))))
1597
1598     (SpanBar
1599      . (
1600         (allow-span-bar . #t)
1601         (bar-extent . ,ly:axis-group-interface::height)
1602         (bar-size . ,ly:span-bar::calc-bar-size)
1603         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1604         (break-align-symbol . staff-bar)
1605         (cross-staff . #t)
1606         (glyph-name . ,ly:span-bar::calc-glyph-name)
1607
1608         ;; ugh duplication! (these 4 properties were copied from Barline)
1609         ;;
1610         ;; Ross. page 151 lists other values, we opt for a leaner look
1611         ;;
1612         (kern . 3.0)
1613         (thin-kern . 3.0)
1614         (hair-thickness . 1.6)
1615         (thick-thickness . 6.0)
1616
1617         (layer . 0)
1618         (non-musical . #t)
1619         (stencil . ,ly:span-bar::print)
1620         (X-extent . ,ly:span-bar::width)
1621         (Y-extent . ,ly:axis-group-interface::height)
1622         (meta . ((class . Item)
1623                  (interfaces . (bar-line-interface
1624                                 font-interface
1625                                 span-bar-interface))))))
1626
1627     (StaffGrouper
1628      . (
1629         (between-staff-spacing . ((space . 9)
1630                                   (minimum-distance . 7)
1631                                   (padding . 1)))
1632         (after-last-staff-spacing . ((space . 10.5)
1633                                      (minimum-distance . 8)
1634                                      (padding . 1)))
1635         (meta . ((class . Spanner)
1636                  (interfaces . (staff-grouper-interface))))))
1637
1638     (StaffSpacing
1639      . (
1640         (non-musical . #t)
1641         (stem-spacing-correction . 0.4)
1642         (meta . ((class . Item)
1643                  (interfaces . (spacing-interface
1644                                 staff-spacing-interface))))))
1645
1646     (StaffSymbol
1647      . (
1648         (layer . 0)
1649         (ledger-line-thickness . (1.0 . 0.1))
1650         (line-count . 5)
1651         (stencil . ,ly:staff-symbol::print)
1652         (Y-extent . ,ly:staff-symbol::height)
1653         (meta . ((class . Spanner)
1654                  (interfaces . (staff-symbol-interface))))))
1655
1656     (StanzaNumber
1657      . (
1658         (direction . ,LEFT)
1659         (font-series . bold)
1660         (padding . 1.0)
1661         (side-axis . ,X)
1662         (stencil . ,ly:text-interface::print)
1663         (X-offset . ,ly:side-position-interface::x-aligned-side)
1664         (meta . ((class . Item)
1665                  (interfaces . (font-interface
1666                                 side-position-interface
1667                                 stanza-number-interface
1668                                 text-interface))))))
1669
1670     (Stem
1671      . (
1672         (beamlet-default-length . (1.1 . 1.1))
1673         (beamlet-max-length-proportion . (0.75 . 0.75))
1674         (cross-staff . ,ly:stem::calc-cross-staff)
1675         (default-direction . ,ly:stem::calc-default-direction)
1676         (details
1677          . (
1678             ;; 3.5 (or 3 measured from note head) is standard length
1679             ;; 32nd, 64th, 128th flagged stems should be longer
1680             (lengths . (3.5 3.5 3.5 4.5 5.0 6.0))
1681
1682             ;; FIXME.  3.5 yields too long beams (according to Ross and
1683             ;; looking at Baerenreiter examples) for a number of common
1684             ;; boundary cases.  Subtracting half a beam thickness fixes
1685             ;; this, but the bug may well be somewhere else.
1686
1687             ;; FIXME this should come from 'lengths
1688             (beamed-lengths . (3.26 3.5 3.6))
1689
1690             ;; The 'normal' minima
1691             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1692                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1693
1694             ;; The 'extreme case' minima
1695             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1696
1697             ;; Stems in unnatural (forced) direction should be shortened by
1698             ;; one staff space, according to [Roush & Gourlay].
1699             ;; Flagged stems we shorten only half a staff space.
1700             (stem-shorten . (1.0 0.5))
1701
1702             ))
1703
1704         ;; We use the normal minima as minimum for the ideal lengths,
1705         ;; and the extreme minima as abolute minimum length.
1706
1707         (direction . ,ly:stem::calc-direction)
1708         (duration-log . ,stem::calc-duration-log)
1709         (flag . ,ly:stem::calc-flag)
1710         (length . ,ly:stem::calc-length)
1711         (neutral-direction . ,DOWN)
1712         (positioning-done . ,ly:stem::calc-positioning-done)
1713         (stem-end-position . ,ly:stem::calc-stem-end-position)
1714         (stem-info . ,ly:stem::calc-stem-info)
1715         (stencil . ,ly:stem::print)
1716         (thickness . 1.3)
1717         (X-extent . ,ly:stem::width)
1718         (X-offset . ,ly:stem::offset-callback)
1719         (Y-extent . ,ly:stem::height)
1720         (Y-offset . ,ly:staff-symbol-referencer::callback)
1721         (meta . ((class . Item)
1722                  (interfaces . (font-interface
1723                                 stem-interface))))))
1724
1725     (StemTremolo
1726      . (
1727         (beam-thickness . 0.48) ; staff-space
1728         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1729         (slope . ,ly:stem-tremolo::calc-slope)
1730         (stencil . ,ly:stem-tremolo::print)
1731         (style . ,ly:stem-tremolo::calc-style)
1732         (X-extent . ,ly:stem-tremolo::width)
1733         (Y-extent . ,ly:stem-tremolo::height)
1734         (meta . ((class . Item)
1735                  (interfaces . (stem-tremolo-interface))))))
1736
1737     (StringNumber
1738      . (
1739         (avoid-slur . around)
1740         (font-encoding . fetaNumber)
1741         (font-size . -5)                ; don't overlap when next to heads.
1742         (padding . 0.5)
1743         (script-priority . 100)
1744         (self-alignment-X . ,CENTER)
1745         (self-alignment-Y . ,CENTER)
1746         (staff-padding . 0.5)
1747         (stencil . ,print-circled-text-callback)
1748         (text . ,string-number::calc-text)
1749         (meta . ((class . Item)
1750                  (interfaces . (font-interface
1751                                 self-alignment-interface
1752                                 side-position-interface
1753                                 string-number-interface
1754                                 text-interface
1755                                 text-script-interface))))))
1756
1757     (StrokeFinger
1758      . (
1759         (digit-names . #("p" "i" "m" "a" "x"))
1760         (font-shape . italic)
1761         (font-size . -4)                ; don't overlap when next to heads.
1762         (padding . 0.5)
1763         (script-priority . 100)
1764         (self-alignment-X . ,CENTER)
1765         (self-alignment-Y . ,CENTER)
1766         (staff-padding . 0.5)
1767         (stencil . ,ly:text-interface::print)
1768         (text . ,stroke-finger::calc-text)
1769         (meta . ((class . Item)
1770                  (interfaces . (font-interface
1771                                 self-alignment-interface
1772                                 side-position-interface
1773                                 stroke-finger-interface
1774                                 text-interface
1775                                 text-script-interface))))))
1776
1777     (SustainPedal
1778      . (
1779         (direction . ,RIGHT)
1780         (extra-spacing-width . (+inf.0 . -inf.0))
1781         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1782         (self-alignment-X . ,CENTER)
1783         (stencil . ,ly:sustain-pedal::print)
1784         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1785         (meta . ((class . Item)
1786                  (interfaces . (font-interface
1787                                 piano-pedal-interface
1788                                 piano-pedal-script-interface
1789                                 self-alignment-interface
1790                                 text-interface))))))
1791
1792     (SustainPedalLineSpanner
1793      . (
1794         (axes . (,Y))
1795         (direction . ,DOWN)
1796         (minimum-space . 1.0)
1797         (outside-staff-priority . 1000)
1798         (padding . 1.2)
1799         (side-axis . ,Y)
1800         (staff-padding . 1.2)
1801         (X-extent . ,ly:axis-group-interface::width)
1802         (Y-extent . ,ly:axis-group-interface::height)
1803         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1804         (meta . ((class . Spanner)
1805                  (interfaces . (axis-group-interface
1806                                 piano-pedal-interface
1807                                 side-position-interface))))))
1808
1809     (System
1810      . (
1811         (axes . (,X ,Y))
1812         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
1813         (X-extent . ,ly:axis-group-interface::width)
1814         (Y-extent . ,ly:axis-group-interface::height)
1815         (meta . ((class . System)
1816                  (interfaces . (axis-group-interface
1817                                 system-interface))))))
1818
1819     (SystemStartBar
1820      . (
1821         (collapse-height . 5.0)
1822         (direction . ,LEFT)
1823
1824         ;; ugh--hardcoded.
1825         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
1826         (stencil . ,ly:system-start-delimiter::print)
1827         (style . bar-line)
1828         (thickness . 1.6)
1829         (X-offset . ,ly:side-position-interface::x-aligned-side)
1830         (Y-extent . #f)
1831         (meta . ((class . Spanner)
1832                  (interfaces . (side-position-interface
1833                                 system-start-delimiter-interface))))))
1834
1835     (SystemStartBrace
1836      . (
1837         (collapse-height . 5.0)
1838         (direction . ,LEFT)
1839         (font-encoding . fetaBraces)
1840         (padding . 0.3)
1841         (stencil . ,ly:system-start-delimiter::print)
1842         (style . brace)
1843         (X-offset . ,ly:side-position-interface::x-aligned-side)
1844         (Y-extent . #f)
1845         (meta . ((class . Spanner)
1846                  (interfaces . (font-interface
1847                                 side-position-interface
1848                                 system-start-delimiter-interface))))))
1849
1850     (SystemStartBracket
1851      . (
1852         (collapse-height . 5.0)
1853         (direction . ,LEFT)
1854         (padding . 0.8)
1855         (stencil . ,ly:system-start-delimiter::print)
1856         (style . bracket)
1857         (thickness . 0.45)
1858         (X-offset . ,ly:side-position-interface::x-aligned-side)
1859         (Y-extent . #f)
1860         (meta . ((class . Spanner)
1861                  (interfaces . (font-interface
1862                                 side-position-interface
1863                                 system-start-delimiter-interface))))))
1864
1865     (SystemStartSquare
1866      . (
1867         (direction . ,LEFT)
1868         (stencil . ,ly:system-start-delimiter::print)
1869         (style . line-bracket)
1870         (thickness . 1.0)
1871         (X-offset . ,ly:side-position-interface::x-aligned-side)
1872         (Y-extent . #f)
1873         (meta . ((class . Spanner)
1874                  (interfaces . (font-interface
1875                                 side-position-interface
1876                                 system-start-delimiter-interface))))))
1877
1878
1879     (TabNoteHead
1880      . (
1881         (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible)
1882                                         (parenthesize . #t)))
1883                     (repeat-tied-properties . ((note-head-visible . #t)
1884                                                (parenthesize . #t)))))
1885         (direction . ,CENTER)
1886         (duration-log . ,note-head::calc-duration-log)
1887         (font-series . bold)
1888         (font-size . -2)
1889         (stem-attachment . (0.0 . 1.35))
1890         (stencil . ,ly:text-interface::print)
1891         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1892         (Y-offset . ,ly:staff-symbol-referencer::callback)
1893         (meta . ((class . Item)
1894                  (interfaces  . (font-interface
1895                                  note-head-interface
1896                                  rhythmic-grob-interface
1897                                  rhythmic-head-interface
1898                                  staff-symbol-referencer-interface
1899                                  tab-note-head-interface
1900                                  text-interface))))))
1901
1902     (TextScript
1903      . (
1904         (avoid-slur . around)
1905         (cross-staff . ,ly:script-interface::calc-cross-staff)
1906         (direction . ,DOWN)
1907         (direction . ,ly:script-interface::calc-direction)
1908         (extra-spacing-width . (+inf.0 . -inf.0))
1909         (outside-staff-priority . 450)
1910
1911         ;; sync with Fingering ?
1912         (padding . 0.5)
1913
1914         (positioning-done . ,ly:script-interface::calc-positioning-done)
1915         (script-priority . 200)
1916         (side-axis . ,Y)
1917         (slur-padding . 0.5)
1918         (staff-padding . 0.5)
1919         (stencil . ,ly:text-interface::print)
1920         ;; todo: add X self alignment?
1921         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1922         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1923         (meta . ((class . Item)
1924                  (interfaces . (font-interface
1925                                 instrument-specific-markup-interface
1926                                 self-alignment-interface
1927                                 side-position-interface
1928                                 text-interface
1929                                 text-script-interface))))))
1930
1931     (TextSpanner
1932      . (
1933         (bound-details . ((left . ((Y . 0)
1934                                    (padding . 0.25)
1935                                    (attach-dir . ,LEFT)
1936                                    ))
1937                           (left-broken . ((end-on-note . #t)))
1938                           (right . ((Y . 0)
1939                                     (padding . 0.25)
1940                                     ))
1941                           ))
1942         (dash-fraction . 0.2)
1943         (dash-period . 3.0)
1944         (direction . ,UP)
1945         (font-shape . italic)
1946         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1947         (outside-staff-priority . 350)
1948         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1949         (side-axis . ,Y)
1950         (staff-padding . 0.8)
1951         (stencil . ,ly:line-spanner::print)
1952         (style . dashed-line)
1953         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1954
1955         (meta . ((class . Spanner)
1956                  (interfaces . (font-interface
1957                                 line-interface
1958                                 line-spanner-interface
1959                                 side-position-interface))))))
1960
1961     (Tie
1962      . (
1963         (avoid-slur . inside)
1964         (control-points . ,ly:tie::calc-control-points)
1965         (details . (
1966                     ;; for a full list, see tie-details.cc
1967                     (ratio . 0.333)
1968                     (center-staff-line-clearance . 0.6)
1969                     (tip-staff-line-clearance . 0.45)
1970                     (note-head-gap . 0.2)
1971                     (stem-gap . 0.35)
1972                     (height-limit . 1.0)
1973                     (horizontal-distance-penalty-factor . 10)
1974                     (same-dir-as-stem-penalty . 8)
1975                     (min-length-penalty-factor . 26)
1976                     (tie-tie-collision-distance . 0.45)
1977                     (tie-tie-collision-penalty . 25.0)
1978                     (intra-space-threshold . 1.25)
1979                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
1980                     (outer-tie-length-symmetry-penalty-factor . 10)
1981                     (vertical-distance-penalty-factor . 7)
1982                     (outer-tie-vertical-gap . 0.25)
1983                     (multi-tie-region-size . 3)
1984                     (single-tie-region-size . 4)
1985                     (between-length-limit . 1.0)))
1986
1987         (direction . ,ly:tie::calc-direction)
1988         (font-size . -6)
1989         (line-thickness . 0.8)
1990         (neutral-direction . ,UP)
1991         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1992         (stencil . ,ly:tie::print)
1993         (thickness . 1.2)
1994         (meta . ((class . Spanner)
1995                  (interfaces . (tie-interface))))))
1996
1997     (TieColumn
1998      . (
1999         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2000         (positioning-done . ,ly:tie-column::calc-positioning-done)
2001         (X-extent . #f)
2002         (Y-extent . #f)
2003         (meta . ((class . Spanner)
2004                  (interfaces . (tie-column-interface))))))
2005
2006     (TimeSignature
2007      . (
2008         (avoid-slur . inside)
2009         (break-align-anchor
2010          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2011         (break-align-symbol . time-signature)
2012         (break-visibility . ,all-visible)
2013         (extra-spacing-height . (-1.0 . 1.0))
2014         (non-musical . #t)
2015         (space-alist . (
2016                         (first-note . (fixed-space . 2.0))
2017                         (right-edge . (extra-space . 0.5))
2018                         (staff-bar . (minimum-space . 2.0))))
2019         (stencil . ,ly:time-signature::print)
2020         (style . C)
2021         (meta . ((class . Item)
2022                  (interfaces . (break-aligned-interface
2023                                 font-interface
2024                                 time-signature-interface))))))
2025
2026     (TrillPitchAccidental
2027      . (
2028         (direction . ,LEFT)
2029         (font-size . -4)
2030         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2031         (padding . 0.2)
2032         (side-axis . ,X)
2033         (stencil . ,ly:accidental-interface::print)
2034         (X-offset . ,ly:side-position-interface::x-aligned-side)
2035         (Y-extent . ,ly:accidental-interface::height)
2036         (meta . ((class . Item)
2037                  (interfaces . (accidental-interface
2038                                 font-interface
2039                                 side-position-interface
2040                                 trill-pitch-accidental-interface))))))
2041
2042     (TrillPitchGroup
2043      . (
2044         (axes . (,X))
2045         (direction . ,RIGHT)
2046         (font-size . -4)
2047         (padding . 0.3)
2048         (side-axis . ,X)
2049         (stencil . ,parenthesize-elements)
2050         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2051         (X-offset . ,ly:side-position-interface::x-aligned-side)
2052         (meta . ((class . Item)
2053                  (interfaces . (axis-group-interface
2054                                 font-interface
2055                                 note-head-interface
2056                                 parentheses-interface
2057                                 side-position-interface))))))
2058
2059     (TrillPitchHead
2060      . (
2061         (duration-log . 2)
2062         (font-size . -4)
2063         (stencil . ,ly:note-head::print)
2064         (Y-offset . ,ly:staff-symbol-referencer::callback)
2065         (meta . ((class . Item)
2066                  (interfaces . (font-interface
2067                                 ledgered-interface
2068                                 pitched-trill-interface
2069                                 rhythmic-head-interface
2070                                 staff-symbol-referencer-interface))))))
2071
2072     (TrillSpanner
2073      . (
2074         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2075         (bound-details . ((left . ((text . ,(make-translate-scaled-markup
2076                                              '(0.0 . -1.0)
2077                                              (make-musicglyph-markup "scripts.trill")))
2078                                    (Y . 0)
2079                                    (stencil-offset . (-0.5 . 0))
2080                                    (padding . 1.5)
2081                                    (attach-dir . ,CENTER)
2082                                    ;; this isn't CENTER because the trill glyph's origin
2083                                    ;; is not centered in its extent; to have the trill
2084                                    ;; spanner aligned the same as a trill, we need a slight offset
2085                                    (anchor-alignment . 0.15)
2086                                    ))
2087                           (left-broken . ((end-on-note . #t)))
2088                           (right . ((Y . 0)))
2089                           ))
2090         (direction . ,UP)
2091         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2092         (outside-staff-priority . 50)
2093         (padding . 0.5)
2094         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2095         (side-axis . ,Y)
2096         (staff-padding . 1.0)
2097         (stencil . ,ly:line-spanner::print)
2098         (style . trill)
2099         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2100         (meta . ((class . Spanner)
2101                  (interfaces . (font-interface
2102                                 line-interface
2103                                 line-spanner-interface
2104                                 side-position-interface
2105                                 trill-spanner-interface))))))
2106
2107     (TupletBracket
2108      . (
2109         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2110         (control-points . ,ly:tuplet-bracket::calc-control-points)
2111         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2112         (direction  . ,ly:tuplet-bracket::calc-direction)
2113         (edge-height . (0.7 . 0.7))
2114         (full-length-to-extent . #t)
2115         (padding . 1.1)
2116         (positions . ,ly:tuplet-bracket::calc-positions)
2117         (shorten-pair . (-0.2 . -0.2))
2118         (staff-padding . 0.25)
2119         (stencil . ,ly:tuplet-bracket::print)
2120         (thickness . 1.6)
2121
2122         (meta . ((class . Spanner)
2123                  (interfaces . (line-interface
2124                                 tuplet-bracket-interface))))))
2125
2126     (TupletNumber
2127      . (
2128         (avoid-slur . inside)
2129         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2130         (font-shape . italic)
2131         (font-size . -2)
2132         (stencil . ,ly:tuplet-number::print)
2133         (text . ,tuplet-number::calc-denominator-text)
2134         (meta . ((class . Spanner)
2135                  (interfaces . (font-interface
2136                                 text-interface
2137                                 tuplet-number-interface))))))
2138
2139
2140     (UnaCordaPedal
2141      . (
2142         (direction . ,RIGHT)
2143         (extra-spacing-width . (+inf.0 . -inf.0))
2144         (font-shape . italic)
2145         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2146         (self-alignment-X . ,CENTER)
2147         (stencil . ,ly:text-interface::print)
2148         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2149         (meta . ((class . Item)
2150                  (interfaces . (font-interface
2151                                 piano-pedal-script-interface
2152                                 self-alignment-interface
2153                                 text-interface))))))
2154
2155     (UnaCordaPedalLineSpanner
2156      . (
2157         (axes . (,Y))
2158         (direction . ,DOWN)
2159         (minimum-space . 1.0)
2160         (outside-staff-priority . 1000)
2161         (padding . 1.2)
2162         (side-axis . ,Y)
2163         (staff-padding . 1.2)
2164         (X-extent . ,ly:axis-group-interface::width)
2165         (Y-extent . ,ly:axis-group-interface::height)
2166         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2167         (meta . ((class . Spanner)
2168                  (interfaces . (axis-group-interface
2169                                 piano-pedal-interface
2170                                 side-position-interface))))))
2171
2172
2173     (VaticanaLigature
2174      . (
2175         (flexa-width . 2.0)
2176         (stencil . ,ly:vaticana-ligature::print)
2177         (thickness . 0.6)
2178         (meta . ((class . Spanner)
2179                  (interfaces . (font-interface
2180                                 vaticana-ligature-interface))))))
2181
2182     (VerticalAlignment
2183      . (
2184         (axes . (,Y))
2185         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2186         (stacking-dir . -1)
2187         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2188         (X-extent . ,ly:axis-group-interface::width)
2189         (Y-extent . ,ly:axis-group-interface::height)
2190         (meta . ((class . Spanner)
2191                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)))
2192                  (interfaces . (align-interface
2193                                 axis-group-interface))))))
2194
2195     (VerticalAxisGroup
2196      . (
2197         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2198         (axes . (,Y))
2199         (default-next-staff-spacing . ((space . 9)
2200                                        (minimum-distance . 8)
2201                                        (padding . 1)))
2202         (next-staff-spacing . ,ly:axis-group-interface::calc-next-staff-spacing)
2203         (non-affinity-spacing . ((padding . 0.5)))
2204         (stencil . ,ly:axis-group-interface::print)
2205         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2206         (X-extent . ,ly:axis-group-interface::width)
2207         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2208         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2209         (meta . ((class . Spanner)
2210                  (object-callbacks . ((X-common . ,ly:axis-group-interface::calc-x-common)))
2211                  (interfaces . (axis-group-interface
2212                                 hara-kiri-group-spanner-interface
2213                                 vertically-spaceable-interface))))))
2214
2215     (VoiceFollower
2216      . (
2217         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2218         (bound-details . ((right . ((attach-dir .  ,CENTER)
2219                                     (padding . 1.5)
2220                                       ))
2221                           (left . ((attach-dir .  ,CENTER)
2222                                    (padding . 1.5)
2223                                       ))
2224                           ))
2225         (gap . 0.5)
2226         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2227         (non-musical . #t)
2228         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2229         (stencil . ,ly:line-spanner::print)
2230         (style . line)
2231         (X-extent . #f)
2232         (Y-extent . #f)
2233         (meta . ((class . Spanner)
2234                  (interfaces . (line-interface
2235                                 line-spanner-interface))))))
2236
2237     (VoltaBracket
2238      . (
2239         (direction . ,UP)
2240         (edge-height . (2.0 . 2.0)) ;; staff-space;
2241         (font-encoding . fetaNumber)
2242         (font-size . -4)
2243         (stencil . ,ly:volta-bracket-interface::print)
2244         (thickness . 1.6) ;; line-thickness
2245         (word-space . 0.6)
2246         (meta . ((class . Spanner)
2247                  (interfaces . (font-interface
2248                                 horizontal-bracket-interface
2249                                 line-interface
2250                                 side-position-interface
2251                                 text-interface
2252                                 volta-bracket-interface
2253                                 volta-interface))))))
2254
2255     (VoltaBracketSpanner
2256      . (
2257         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2258         (axes . (,Y))
2259         (direction . ,UP)
2260         (no-alignment . #t)
2261         (outside-staff-priority . 600)
2262         (padding . 1)
2263         (side-axis . ,Y)
2264         (X-extent . ,ly:axis-group-interface::width)
2265         (Y-extent . ,ly:axis-group-interface::height)
2266         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2267         (meta . ((class . Spanner)
2268                  (interfaces . (axis-group-interface
2269                                 side-position-interface
2270                                 volta-interface))))))
2271
2272 ))
2273
2274 (define (completize-grob-entry x)
2275   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2276 "
2277   ;;  (display (car x))
2278   ;;  (newline)
2279   (let* ((name-sym  (car x))
2280          (grob-entry (cdr x))
2281          (meta-entry (assoc-get 'meta grob-entry))
2282          (class (assoc-get 'class meta-entry))
2283          (ifaces-entry
2284           (assoc-get 'interfaces meta-entry)))
2285
2286     (cond
2287      ((eq? 'Item class)
2288       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2289      ((eq? 'Spanner class)
2290       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2291      ((eq? 'Paper_column class)
2292       (set! ifaces-entry (cons 'item-interface
2293                                (cons 'paper-column-interface ifaces-entry))))
2294      ((eq? 'System class)
2295       (set! ifaces-entry (cons 'system-interface
2296                                (cons 'spanner-interface ifaces-entry))))
2297      (else
2298       (ly:warning "Unknown class ~a" class)))
2299
2300     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2301     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2302
2303     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2304     (set! meta-entry (assoc-set! meta-entry 'interfaces
2305                                  ifaces-entry))
2306     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2307     (cons name-sym grob-entry)))
2308
2309 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2310
2311 ;;  (display (map pair? all-grob-descriptions))
2312
2313 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2314
2315 (map (lambda (x)
2316        ;; (display (car x)) (newline)
2317
2318        (set-object-property! (car x) 'translation-type? list?)
2319        (set-object-property! (car x) 'is-grob? #t))
2320      all-grob-descriptions)
2321
2322 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2323
2324 (define (volta-bracket-interface::pure-height grob start end)
2325   (let ((edge-height (ly:grob-property grob 'edge-height)))
2326     (if (number-pair? edge-height)
2327         (let ((smaller (min (car edge-height) (cdr edge-height)))
2328               (larger (max (car edge-height) (cdr edge-height))))
2329           (interval-union '(0 . 0) (cons smaller larger)))
2330         '(0 . 0))))
2331
2332 (define pure-print-callbacks
2333   (list
2334    fret-board::calc-stencil
2335    note-head::brew-ez-stencil
2336    print-circled-text-callback
2337    lyric-text::print
2338    ly:arpeggio::brew-chord-bracket
2339    ly:bar-line::print
2340    ly:mensural-ligature::brew-ligature-primitive
2341    ly:note-head::print
2342    ly:dots::print
2343    ly:clef::print
2344    ly:text-interface::print
2345    ly:script-interface::print))
2346
2347 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2348 ;; and the print function is not pure, but there is a easy way to
2349 ;; figure out the Y-extent from the print function.
2350 (define pure-print-to-height-conversions
2351   `(
2352     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2353     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2354     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2355
2356 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2357 (define (pure-stencil-height grob start stop)
2358   (let* ((sten (ly:grob-property-data grob 'stencil))
2359          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2360     (cond ((or
2361             (ly:stencil? sten)
2362             (memq sten pure-print-callbacks))
2363            (ly:grob::stencil-height grob))
2364           ((procedure? pure-height-callback)
2365            (pure-height-callback grob start stop))
2366           (else
2367            '(0 . 0)))))
2368
2369 (define pure-conversions-alist
2370   `(
2371     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2372     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2373     (,ly:stem::height . ,ly:stem::pure-height)
2374     (,ly:rest::height . ,ly:rest::pure-height)
2375     (,ly:grob::stencil-height . ,pure-stencil-height)
2376     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2377     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2378     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2379     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2380     (,ly:slur::height . ,ly:slur::pure-height)
2381     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)))
2382
2383 (define pure-functions
2384   (list
2385    parenthesize-elements
2386    ly:rest::y-offset-callback
2387    ly:staff-symbol-referencer::callback
2388    ly:staff-symbol::height))
2389
2390 (define-public (pure-relevant? grob)
2391   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2392     (not (eq? #f
2393               (or
2394                (pair? extent-callback)
2395                (memq extent-callback pure-functions)
2396                (and
2397                 (pair? (assq extent-callback pure-conversions-alist))
2398                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2399                   (or
2400                    (not (eq? extent-callback ly:grob::stencil-height))
2401                    (memq stencil pure-print-callbacks)
2402                    (assq stencil pure-print-to-height-conversions)
2403                    (ly:stencil? stencil)))))))))
2404
2405 (define-public (call-pure-function unpure args start end)
2406   (if (ly:simple-closure? unpure)
2407       (ly:eval-simple-closure (car args) unpure start end)
2408       (if (not (procedure? unpure))
2409           unpure
2410           (if (memq unpure pure-functions)
2411               (apply unpure args)
2412               (let ((pure (assq unpure pure-conversions-alist)))
2413                 (if pure
2414                     (apply (cdr pure)
2415                            (append
2416                             (list (car args) start end)
2417                             (cdr args)))))))))