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