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