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