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