]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Creates cross-staff callback for arpeggios (issue 3497)
[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 . 0.35)
145         (stencil . ,ambitus::print)
146         (thickness . 2)
147         (X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
148         (meta . ((class . Item)
149                  (interfaces . (ambitus-interface
150                                 font-interface))))))
151
152     (AmbitusNoteHead
153      . (
154         (duration-log . 2)
155         (glyph-name . ,note-head::calc-glyph-name)
156         (stencil . ,ly:note-head::print)
157         (Y-offset . ,staff-symbol-referencer::callback)
158         (Y-extent . ,grob::always-Y-extent-from-stencil)
159         (meta . ((class . Item)
160                  (interfaces . (ambitus-interface
161                                 font-interface
162                                 ledgered-interface
163                                 note-head-interface
164                                 rhythmic-head-interface
165                                 staff-symbol-referencer-interface))))))
166
167     (Arpeggio
168      . (
169         (cross-staff . ,ly:arpeggio::calc-cross-staff)
170         (direction . ,LEFT)
171         (padding . 0.5)
172         (positions . ,ly:arpeggio::calc-positions)
173         (protrusion . 0.4)
174         (script-priority . 0)
175         (side-axis . ,X)
176         (staff-position . 0.0)
177         (stencil . ,ly:arpeggio::print)
178         (X-extent . ,ly:arpeggio::width)
179         (Y-extent . ,(grob::unpure-Y-extent-from-stencil ly:arpeggio::pure-height))
180         (X-offset . ,ly:side-position-interface::x-aligned-side)
181         (Y-offset . ,staff-symbol-referencer::callback)
182         (meta . ((class . Item)
183                  (interfaces . (arpeggio-interface
184                                 font-interface
185                                 side-position-interface
186                                 staff-symbol-referencer-interface))))))
187
188     (BalloonTextItem
189      . (
190         (annotation-balloon . #t)
191         (annotation-line . #t)
192         (extra-spacing-width . (+inf.0 . -inf.0))
193         (stencil . ,ly:balloon-interface::print)
194         (text . ,(grob::calc-property-by-copy 'text))
195         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
196         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
197         (Y-extent . ,grob::always-Y-extent-from-stencil)
198         (meta . ((class . Item)
199                  (interfaces . (balloon-interface
200                                 font-interface
201                                 text-interface))))))
202
203     (BarLine
204      . (
205         (allow-span-bar . #t)
206         (bar-extent . ,ly:bar-line::calc-bar-extent)
207         (break-align-anchor . ,ly:bar-line::calc-anchor)
208         (break-align-symbol . staff-bar)
209         (break-visibility . ,bar-line::calc-break-visibility)
210         (extra-spacing-height . ,pure-from-neighbor-interface::account-for-span-bar)
211         (gap . 0.4)
212         (glyph . "|")
213         (glyph-name . ,bar-line::calc-glyph-name)
214
215         ;;
216         ;; Ross. page 151 lists other values, we opt for a leaner look
217         ;;
218         ;; TODO:
219         ;; kern should scale with line-thickness too.
220         (kern . 3.0)
221         (thin-kern . 3.0)
222         (hair-thickness . 1.9)
223         (thick-thickness . 6.0)
224
225         (layer . 0)
226         (non-musical . #t)
227         (rounded . #f)
228         (space-alist . (
229                         (time-signature . (extra-space . 0.75))
230                         (custos . (minimum-space . 2.0))
231                         (clef . (minimum-space . 1.0))
232                         (key-signature . (extra-space . 1.0))
233                         (key-cancellation . (extra-space . 1.0))
234                         (first-note . (fixed-space . 1.3))
235                         (next-note . (semi-fixed-space . 0.9))
236                         (right-edge . (extra-space . 0.0))))
237         (stencil . ,ly:bar-line::print)
238         (Y-extent . ,grob::always-Y-extent-from-stencil)
239         (meta . ((class . Item)
240                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
241                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
242                  (interfaces . (bar-line-interface
243                                 break-aligned-interface
244                                 font-interface
245                                 pure-from-neighbor-interface))))))
246
247     (BarNumber
248      . (
249         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
250         ;; want the bar number before the clef at line start.
251         (break-align-symbols . (left-edge staff-bar))
252
253         (break-visibility . ,begin-of-line-visible)
254         (direction . ,UP)
255         (extra-spacing-width . (+inf.0 . -inf.0))
256         (font-family . roman)
257         (font-size . -2)
258         (non-musical . #t)
259         ;; w/o padding, bars numbers are not positioned over the staff as
260         ;; they are slightly to the left. so we add just a bit.
261         (horizon-padding . 0.05)
262         (outside-staff-priority . 100)
263         (padding . 1.0)
264         (self-alignment-X . ,RIGHT)
265         (side-axis . ,Y)
266         (stencil . ,ly:text-interface::print)
267         (X-offset . ,(ly:make-simple-closure
268                       `(,+
269                         ,(ly:make-simple-closure
270                           (list ly:break-alignable-interface::self-align-callback))
271                         ,(ly:make-simple-closure
272                           (list ly:self-alignment-interface::x-aligned-on-self)))))
273         (Y-offset . ,side-position-interface::y-aligned-side)
274         (Y-extent . ,grob::always-Y-extent-from-stencil)
275         (meta .
276               ((class . Item)
277                (interfaces . (break-alignable-interface
278                               font-interface
279                               self-alignment-interface
280                               side-position-interface
281                               text-interface))))))
282
283     (BassFigure
284      . (
285         (stencil . ,ly:text-interface::print)
286         (Y-extent . ,grob::always-Y-extent-from-stencil)
287         (meta . ((class . Item)
288                  (interfaces . (bass-figure-interface
289                                 font-interface
290                                 rhythmic-grob-interface
291                                 text-interface))))))
292
293     (BassFigureAlignment
294      . (
295         (axes . (,Y))
296         (padding . 0.2)
297         (positioning-done . ,ly:align-interface::align-to-minimum-distances)
298         (stacking-dir . ,DOWN)
299         (X-extent . ,ly:axis-group-interface::width)
300         (Y-extent . ,axis-group-interface::height)
301         (meta . ((class . Spanner)
302                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
303                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
304                  (interfaces . (align-interface
305                                 axis-group-interface
306                                 bass-figure-alignment-interface))))))
307
308     (BassFigureAlignmentPositioning
309      . (
310         (axes . (,Y))
311         (direction . ,UP)
312         (padding . 0.5)
313         (side-axis . ,Y)
314         (staff-padding . 1.0)
315         (X-extent . ,ly:axis-group-interface::width)
316         (Y-extent . ,axis-group-interface::height)
317         (Y-offset . ,side-position-interface::y-aligned-side)
318         (meta . ((class . Spanner)
319                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
320                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
321                  (interfaces . (axis-group-interface
322                                 side-position-interface))))))
323
324     (BassFigureBracket
325      . (
326         (edge-height . (0.2 . 0.2))
327         (stencil . ,ly:enclosing-bracket::print)
328         (X-extent . ,ly:enclosing-bracket::width)
329         (meta . ((class . Item)
330                  (interfaces . (enclosing-bracket-interface))))))
331
332     (BassFigureContinuation
333      . (
334         (stencil . ,ly:figured-bass-continuation::print)
335         (Y-offset . ,ly:figured-bass-continuation::center-on-figures)
336         (meta . ((class . Spanner)
337                  (interfaces . (figured-bass-continuation-interface))))))
338
339     (BassFigureLine
340      . (
341         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
342         (axes . (,Y))
343         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
344         (X-extent . ,ly:axis-group-interface::width)
345         (Y-extent . ,axis-group-interface::height)
346         (meta . ((class . Spanner)
347                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
348                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
349                  (interfaces . (axis-group-interface))))))
350
351
352     (Beam
353      . (
354         ;; todo: clean this up a bit: the list is getting
355         ;; rather long.
356         (auto-knee-gap . 5.5)
357         (beam-segments . ,ly:beam::calc-beam-segments)
358         (beam-thickness . 0.48) ; in staff-space
359
360         ;; We have some unreferenced problems here.
361         ;;
362         ;; If we shorten beamed stems less than normal stems (1 staff-space),
363         ;; or high order less than 8th beams, patterns like
364         ;;     c''4 [c''8 c''] c''4 [c''16 c]
365         ;; are ugly (different stem lengths).
366         ;;
367         ;; But if we shorten 16th beams as much as 8th beams, a single
368         ;; forced 16th beam looks *very* short.
369
370         ;; We choose to shorten 8th beams the same as single stems,
371         ;; and high order beams less than 8th beams, so that all
372         ;; isolated shortened beams look nice and a bit shortened,
373         ;; sadly possibly breaking patterns with high order beams.
374         (beamed-stem-shorten . (1.0 0.5 0.25))
375
376         (beaming . ,ly:beam::calc-beaming)
377         (clip-edges . #t)
378         (collision-interfaces . (beam-interface
379                                  clef-interface
380                                  clef-modifier-interface
381                                  flag-interface
382                                  inline-accidental-interface
383                                  key-signature-interface
384                                  note-head-interface
385                                  stem-interface
386                                  time-signature-interface))
387         (cross-staff . ,ly:beam::calc-cross-staff)
388         (damping . 1)
389         (details
390          .(
391            (secondary-beam-demerit . 10)
392            (stem-length-demerit-factor . 5)
393            (region-size . 2)
394            (beam-eps . 0.001)
395            (stem-length-limit-penalty . 5000)
396            (damping-direction-penalty . 800)
397            (hint-direction-penalty . 20)
398            (musical-direction-factor . 400)
399            (ideal-slope-factor . 10)
400            (collision-penalty . 500)
401            (collision-padding . 0.35)
402            (round-to-zero-slope . 0.02)))
403         (direction . ,ly:beam::calc-direction)
404
405         (normalized-endpoints . ,ly:spanner::calc-normalized-endpoints)
406         ;; only for debugging.
407         (font-family . roman)
408
409         (beam-gap . ,ly:beam::calc-beam-gap)
410         (minimum-length . ,ly:beam::calc-minimum-length)
411         (neutral-direction . ,DOWN)
412         (positions . ,beam::place-broken-parts-individually)
413         (springs-and-rods . ,ly:beam::calc-springs-and-rods)
414         (X-positions . ,ly:beam::calc-x-positions)
415         (transparent . ,(grob::inherit-parent-property
416                          X 'transparent))
417
418         ;; this is a hack to set stem lengths, if positions is set.
419         (quantized-positions . ,ly:beam::set-stem-lengths)
420
421         (shorten . ,ly:beam::calc-stem-shorten)
422         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
423         (stencil . ,ly:beam::print)
424
425         (meta . ((class . Spanner)
426                  (object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems)))
427                  (interfaces . (beam-interface
428                                 font-interface
429                                 staff-symbol-referencer-interface
430                                 unbreakable-spanner-interface))))))
431
432     (BendAfter
433      . (
434         (minimum-length . 0.5)
435         (stencil . ,bend::print)
436         (thickness . 2.0)
437         (meta . ((class . Spanner)
438                  (interfaces . (bend-after-interface
439                                 spanner-interface))))))
440
441     (BreakAlignGroup
442      . (
443         (axes . (,X))
444         (break-align-anchor . ,ly:break-aligned-interface::calc-average-anchor)
445         (break-visibility . ,ly:break-aligned-interface::calc-break-visibility)
446         (X-extent . ,ly:axis-group-interface::width)
447         (meta . ((class . Item)
448                  (interfaces . (axis-group-interface
449                                 break-aligned-interface))))))
450
451     (BreakAlignment
452      . (
453         (axes . (,X))
454         (break-align-orders . ;; end of line
455                             #((
456                                left-edge
457                                cue-end-clef
458                                ambitus
459                                breathing-sign
460                                clef
461                                cue-clef
462                                staff-bar
463                                key-cancellation
464                                key-signature
465                                time-signature
466                                custos)
467
468                               ;; unbroken
469                               (
470                                left-edge
471                                cue-end-clef
472                                ambitus
473                                breathing-sign
474                                clef
475                                cue-clef
476                                staff-bar
477                                key-cancellation
478                                key-signature
479                                time-signature
480                                custos)
481
482                               ;; begin of line
483                               (
484                                left-edge
485                                ambitus
486                                breathing-sign
487                                clef
488                                key-cancellation
489                                key-signature
490                                time-signature
491                                staff-bar
492                                cue-clef
493                                custos)))
494         (non-musical . #t)
495         (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
496         (stacking-dir . 1)
497         (X-extent . ,ly:axis-group-interface::width)
498         (meta . ((class . Item)
499                  (interfaces . (axis-group-interface
500                                 break-alignment-interface))))))
501
502     (BreathingSign
503      . (
504         (break-align-symbol . breathing-sign)
505         (break-visibility . ,begin-of-line-invisible)
506         (non-musical . #t)
507         (space-alist . (
508                         (ambitus . (extra-space . 2.0))
509                         (custos . (minimum-space . 1.0))
510                         (key-signature . (minimum-space . 1.5))
511                         (time-signature . (minimum-space . 1.5))
512                         (staff-bar . (minimum-space . 1.5))
513                         (clef . (minimum-space . 2.0))
514                         (cue-clef . (minimum-space . 2.0))
515                         (cue-end-clef . (minimum-space . 2.0))
516                         (first-note . (fixed-space . 1.0)) ;huh?
517                         (right-edge . (extra-space . 0.1))))
518         (stencil . ,ly:text-interface::print)
519         (text . ,(make-musicglyph-markup "scripts.rcomma"))
520         (Y-offset . ,ly:breathing-sign::offset-callback)
521         (Y-extent . ,grob::always-Y-extent-from-stencil)
522         (meta . ((class . Item)
523                  (interfaces . (break-aligned-interface
524                                 breathing-sign-interface
525                                 font-interface
526                                 text-interface))))))
527
528     (ChordName
529      . (
530         (after-line-breaking . ,ly:chord-name::after-line-breaking)
531         (font-family . sans)
532         (font-size . 1.5)
533         (stencil . ,ly:text-interface::print)
534         (extra-spacing-height . (0.2 . -0.2))
535         (extra-spacing-width . (-0.5 . 0.5))
536         (word-space . 0.0)
537         (Y-extent . ,grob::always-Y-extent-from-stencil)
538         (meta . ((class . Item)
539                  (interfaces . (chord-name-interface
540                                 font-interface
541                                 rhythmic-grob-interface
542                                 text-interface))))))
543
544     (Clef
545      . (
546         (avoid-slur . inside)
547         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
548         (break-align-anchor-alignment . ,RIGHT)
549         (break-align-symbol . clef)
550         (break-visibility . ,begin-of-line-visible)
551         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-at-beginning-of-line)
552         (glyph-name . ,ly:clef::calc-glyph-name)
553         (non-musical . #t)
554         (space-alist . ((cue-clef . (extra-space . 2.0))
555                         (staff-bar . (extra-space . 0.7))
556                         (key-cancellation . (minimum-space . 3.5))
557                         (key-signature . (minimum-space . 3.5))
558                         (time-signature . (minimum-space . 4.2))
559                         (first-note . (minimum-fixed-space . 5.0))
560                         (next-note . (extra-space . 1.0))
561                         (right-edge . (extra-space . 0.5))))
562         (stencil . ,ly:clef::print)
563         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
564         (Y-offset . ,staff-symbol-referencer::callback)
565         (Y-extent . ,grob::always-Y-extent-from-stencil)
566         (meta . ((class . Item)
567                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
568                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
569                  (interfaces . (break-aligned-interface
570                                 clef-interface
571                                 font-interface
572                                 pure-from-neighbor-interface
573                                 staff-symbol-referencer-interface))))))
574
575     (ClefModifier
576      . (
577         (break-visibility . ,(grob::inherit-parent-property
578                               X 'break-visibility))
579         (font-shape . italic)
580         (font-size . -4)
581         (transparent . ,(grob::inherit-parent-property
582                          X 'transparent))
583         (color . ,(grob::inherit-parent-property
584                    X 'color))
585         (self-alignment-X . ,CENTER)
586         (staff-padding . 0.2)
587         (stencil . ,ly:text-interface::print)
588         (X-offset . ,(ly:make-simple-closure
589                       `(,+
590                         ,(ly:make-simple-closure
591                           (list ly:self-alignment-interface::x-aligned-on-self))
592                         ,(ly:make-simple-closure
593                           (list ly:self-alignment-interface::centered-on-x-parent)))))
594         (Y-offset . ,side-position-interface::y-aligned-side)
595         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
596         (Y-extent . ,grob::always-Y-extent-from-stencil)
597         (meta . ((class . Item)
598                  (interfaces . (clef-modifier-interface
599                                 font-interface
600                                 self-alignment-interface
601                                 side-position-interface
602                                 text-interface))))))
603
604     (ClusterSpanner
605      . (
606         (cross-staff . ,ly:cluster::calc-cross-staff)
607         (minimum-length . 0.0)
608         (padding . 0.25)
609         (springs-and-rods . ,ly:spanner::set-spacing-rods)
610         (stencil . ,ly:cluster::print)
611         (style . ramp)
612         (meta . ((class . Spanner)
613                  (interfaces . (cluster-interface))))))
614
615     (ClusterSpannerBeacon
616      . (
617         (Y-extent . ,ly:cluster-beacon::height)
618         (meta . ((class . Item)
619                  (interfaces . (cluster-beacon-interface
620                                 rhythmic-grob-interface))))))
621
622     (CombineTextScript
623      . (
624         (avoid-slur . outside)
625         (baseline-skip . 2)
626         (direction . ,UP)
627         (extra-spacing-width . (+inf.0 . -inf.0))
628         (font-series . bold)
629         (outside-staff-priority . 450)
630         (padding . 0.5)
631         (script-priority . 200)
632         (side-axis . ,Y)
633         (staff-padding . 0.5)
634         ;; todo: add X self alignment?
635         (stencil . ,ly:text-interface::print)
636         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
637         (Y-offset . ,side-position-interface::y-aligned-side)
638         (Y-extent . ,grob::always-Y-extent-from-stencil)
639         (meta . ((class . Item)
640                  (interfaces . (font-interface
641                                 side-position-interface
642                                 text-interface
643                                 text-script-interface))))))
644
645     (CueClef
646      . (
647         (avoid-slur . inside)
648         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
649         (break-align-symbol . cue-clef)
650         (break-visibility . ,begin-of-line-visible)
651         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-at-beginning-of-line)
652         (font-size . -4)
653         (glyph-name . ,ly:clef::calc-glyph-name)
654         (non-musical . #t)
655         (full-size-change . #t)
656         (space-alist . ((staff-bar . (minimum-space . 2.7))
657                         (key-cancellation . (minimum-space . 3.5))
658                         (key-signature . (minimum-space . 3.5))
659                         (time-signature . (minimum-space . 4.2))
660                         (custos . (minimum-space . 0.0))
661                         (first-note . (minimum-fixed-space . 3.0))
662                         (next-note . (extra-space . 1.0))
663                         (right-edge . (extra-space . 0.5))))
664         (stencil . ,ly:clef::print)
665         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
666         (Y-offset . ,staff-symbol-referencer::callback)
667         (Y-extent . ,grob::always-Y-extent-from-stencil)
668         (meta . ((class . Item)
669                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
670                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
671                  (interfaces . (break-aligned-interface
672                                 clef-interface
673                                 font-interface
674                                 pure-from-neighbor-interface
675                                 staff-symbol-referencer-interface))))))
676
677     (CueEndClef
678      . (
679         (avoid-slur . inside)
680         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
681         (break-align-symbol . cue-end-clef)
682         (break-visibility . ,begin-of-line-invisible)
683         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-at-beginning-of-line)
684         (font-size . -4)
685         (glyph-name . ,ly:clef::calc-glyph-name)
686         (non-musical . #t)
687         (full-size-change . #t)
688         (space-alist . ((clef . (extra-space . 0.7))
689                         (cue-clef . (extra-space . 0.7))
690                         (staff-bar . (extra-space . 0.7))
691                         (key-cancellation . (minimum-space . 3.5))
692                         (key-signature . (minimum-space . 3.5))
693                         (time-signature . (minimum-space . 4.2))
694                         (first-note . (minimum-fixed-space . 5.0))
695                         (next-note . (extra-space . 1.0))
696                         (right-edge . (extra-space . 0.5))))
697         (stencil . ,ly:clef::print)
698         (Y-offset . ,staff-symbol-referencer::callback)
699         (Y-extent . ,grob::always-Y-extent-from-stencil)
700         (meta . ((class . Item)
701                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
702                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
703                  (interfaces . (break-aligned-interface
704                                 clef-interface
705                                 font-interface
706                                 pure-from-neighbor-interface
707                                 staff-symbol-referencer-interface))))))
708
709     (Custos
710      . (
711         (break-align-symbol . custos)
712         (break-visibility . ,end-of-line-visible)
713         (neutral-direction . ,DOWN)
714         (non-musical . #t)
715         (space-alist . (
716                         (first-note . (minimum-fixed-space . 0.0))
717                         (right-edge . (extra-space . 0.1))))
718         (stencil . ,ly:custos::print)
719         (style . vaticana)
720         (Y-offset . ,staff-symbol-referencer::callback)
721         (meta . ((class . Item)
722                  (interfaces  . (break-aligned-interface
723                                  custos-interface
724                                  font-interface
725                                  staff-symbol-referencer-interface))))))
726
727     (DotColumn
728      . (
729         (axes . (,X))
730         (direction . ,RIGHT)
731         (positioning-done . ,ly:dot-column::calc-positioning-done)
732         (X-extent . ,ly:axis-group-interface::width)
733         (meta . ((class . Item)
734                  (interfaces . (axis-group-interface
735                                 dot-column-interface))))))
736
737     (Dots
738      . (
739         (avoid-slur . inside)
740         (dot-count . ,dots::calc-dot-count)
741         (staff-position . ,dots::calc-staff-position)
742         (stencil . ,ly:dots::print)
743         (Y-extent . ,grob::always-Y-extent-from-stencil)
744         (extra-spacing-height . (-0.5 . 0.5))
745         (meta . ((class . Item)
746                  (interfaces . (dots-interface
747                                 font-interface
748                                 staff-symbol-referencer-interface))))))
749
750     (DoublePercentRepeat
751      . (
752         (break-align-symbol . staff-bar)
753         (break-visibility . ,begin-of-line-invisible)
754         (dot-negative-kern . 0.75)
755         (font-encoding . fetaMusic)
756         (non-musical . #t)
757         (slash-negative-kern . 1.6)
758         (slope . 1.0)
759         (stencil . ,ly:percent-repeat-item-interface::double-percent)
760         (Y-extent . ,grob::always-Y-extent-from-stencil)
761         (thickness . 0.48)
762         (meta . ((class . Item)
763                  (interfaces . (break-aligned-interface
764                                 font-interface
765                                 percent-repeat-interface
766                                 percent-repeat-item-interface))))))
767
768     (DoublePercentRepeatCounter
769      . (
770         (direction . ,UP)
771         (font-encoding . fetaText)
772         (font-size . -2)
773         (padding . 0.2)
774         (self-alignment-X . ,CENTER)
775         (side-axis . ,Y)
776         (staff-padding . 0.25)
777         (stencil . ,ly:text-interface::print)
778         (X-offset . ,(ly:make-simple-closure
779                       `(,+
780                         ,(ly:make-simple-closure
781                           (list ly:self-alignment-interface::centered-on-y-parent))
782                         ,(ly:make-simple-closure
783                           (list ly:self-alignment-interface::x-aligned-on-self)))))
784         (Y-offset . ,side-position-interface::y-aligned-side)
785         (Y-extent . ,grob::always-Y-extent-from-stencil)
786         (meta . ((class . Item)
787                  (interfaces . (font-interface
788                                 percent-repeat-interface
789                                 percent-repeat-item-interface
790                                 self-alignment-interface
791                                 side-position-interface
792                                 text-interface))))))
793
794     (DoubleRepeatSlash
795      . (
796         (dot-negative-kern . 0.75)
797         (font-encoding . fetaMusic)
798         (slash-negative-kern . 1.6)
799         (slope . 1.0)
800         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
801         (Y-extent . ,grob::always-Y-extent-from-stencil)
802         (thickness . 0.48)
803         (meta . ((class . Item)
804                  (interfaces . (font-interface
805                                 percent-repeat-interface
806                                 percent-repeat-item-interface
807                                 rhythmic-grob-interface))))))
808
809     (DynamicLineSpanner
810      . (
811         (axes . (,Y))
812         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
813         (direction . ,DOWN)
814         (minimum-space . 1.2)
815         (outside-staff-priority . 250)
816         (outside-staff-padding . 0.6)
817         (padding . 0.6)
818         (side-axis . ,Y)
819         (slur-padding . 0.3)
820         (staff-padding . 0.1)
821         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
822         (X-extent . ,ly:axis-group-interface::width)
823         (Y-extent . ,axis-group-interface::height)
824         (Y-offset . ,side-position-interface::y-aligned-side)
825         (meta . ((class . Spanner)
826                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
827                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
828                  (interfaces . (axis-group-interface
829                                 dynamic-interface
830                                 dynamic-line-spanner-interface
831                                 side-position-interface))))))
832
833     (DynamicText
834      . (
835
836         ;; todo.
837
838         (collision-bias . -2.0)
839         (collision-padding . 0.5)
840         (direction . ,ly:script-interface::calc-direction)
841         (extra-spacing-width . (+inf.0 . -inf.0))
842         (font-encoding . fetaText)
843         (font-series . bold)
844         (font-shape . italic)
845         (positioning-done . ,ly:script-interface::calc-positioning-done)
846         (right-padding . 0.5)
847         (self-alignment-X . ,CENTER)
848         (self-alignment-Y . ,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 . ,self-alignment-interface::y-aligned-on-self)
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-padding . 0.5)
1417         (outside-staff-priority . 750)
1418         (self-alignment-X . ,CENTER)
1419         (side-axis . ,Y)
1420         (staff-padding . 0.5)
1421         (stencil . ,measure-counter-stencil)
1422         (meta . ((class . Spanner)
1423                  (interfaces . (font-interface
1424                                 measure-counter-interface
1425                                 self-alignment-interface
1426                                 side-position-interface
1427                                 text-interface))))))
1428
1429     (MeasureGrouping
1430      . (
1431         (direction . ,UP)
1432         (height . 2.0)
1433         (padding . 2)
1434         (side-axis . ,Y)
1435         (staff-padding . 3)
1436         (stencil . ,ly:measure-grouping::print)
1437         (thickness . 1)
1438         (Y-offset . ,side-position-interface::y-aligned-side)
1439         (meta . ((class . Spanner)
1440                  (interfaces . (measure-grouping-interface
1441                                 side-position-interface))))))
1442
1443     (MelodyItem
1444      . (
1445         (neutral-direction . ,DOWN)
1446         (meta . ((class . Item)
1447                  (interfaces . (melody-spanner-interface))))))
1448
1449     (MensuralLigature
1450      . (
1451         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1452         (stencil . ,ly:mensural-ligature::print)
1453         (thickness . 1.3)
1454         (meta . ((class . Spanner)
1455                  (interfaces . (font-interface
1456                                 mensural-ligature-interface))))))
1457
1458     (MetronomeMark
1459      . (
1460         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1461         (break-visibility . ,end-of-line-invisible)
1462         (direction . ,UP)
1463         (extra-spacing-width . (+inf.0 . -inf.0))
1464         (outside-staff-horizontal-padding . 0.2)
1465         (outside-staff-priority . 1000)
1466         (padding . 0.8)
1467         (side-axis . ,Y)
1468         (stencil . ,ly:text-interface::print)
1469         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1470         (Y-offset . ,side-position-interface::y-aligned-side)
1471         (X-offset . ,(ly:make-simple-closure
1472                       `(,+
1473                         ,(ly:make-simple-closure
1474                           (list ly:break-alignable-interface::self-align-callback))
1475                         ,(ly:make-simple-closure
1476                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1477         (self-alignment-X . ,LEFT)
1478         (break-align-symbols . (time-signature))
1479         (non-break-align-symbols . (paper-column-interface))
1480         (Y-extent . ,grob::always-Y-extent-from-stencil)
1481         (meta . ((class . Item)
1482                  (interfaces . (break-alignable-interface
1483                                 font-interface
1484                                 metronome-mark-interface
1485                                 self-alignment-interface
1486                                 side-position-interface
1487                                 text-interface))))))
1488
1489     (MultiMeasureRest
1490      . (
1491         (expand-limit . 10)
1492         (hair-thickness . 2.0)
1493         (round-up-exceptions . ())
1494         (padding . 1)
1495         (spacing-pair . (break-alignment . break-alignment))
1496         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1497         (stencil . ,ly:multi-measure-rest::print)
1498         (thick-thickness . 6.6)
1499         ;; See Wanske pp. 125
1500         (usable-duration-logs . ,(iota 4 -3))
1501         (Y-extent . ,(ly:make-unpure-pure-container ly:multi-measure-rest::height))
1502         (Y-offset . ,staff-symbol-referencer::callback)
1503         (meta . ((class . Spanner)
1504                  (interfaces . (font-interface
1505                                 multi-measure-interface
1506                                 multi-measure-rest-interface
1507                                 rest-interface
1508                                 staff-symbol-referencer-interface))))))
1509
1510     (MultiMeasureRestNumber
1511      . (
1512         (bound-padding  . 2.0)
1513         (direction . ,UP)
1514         (font-encoding . fetaText)
1515         (padding . 0.4)
1516         (self-alignment-X . ,CENTER)
1517         (side-axis . ,Y)
1518         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1519         (staff-padding . 0.4)
1520         (stencil . ,ly:text-interface::print)
1521         (X-offset . ,(ly:make-simple-closure
1522                       `(,+
1523                         ,(ly:make-simple-closure
1524                           (list ly:self-alignment-interface::x-aligned-on-self))
1525                         ,(ly:make-simple-closure
1526                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1527         (Y-offset . ,side-position-interface::y-aligned-side)
1528         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1529         (Y-extent . ,grob::always-Y-extent-from-stencil)
1530         (meta . ((class . Spanner)
1531                  (interfaces . (font-interface
1532                                 multi-measure-interface
1533                                 self-alignment-interface
1534                                 side-position-interface
1535                                 text-interface))))))
1536
1537     (MultiMeasureRestText
1538      . (
1539         (direction . ,UP)
1540         (outside-staff-priority . 450)
1541         (padding . 0.2)
1542         (self-alignment-X . ,CENTER)
1543         (skyline-horizontal-padding . 0.2)
1544         (staff-padding . 0.25)
1545         (stencil . ,ly:text-interface::print)
1546         (X-offset . ,(ly:make-simple-closure
1547                       `(,+
1548                         ,(ly:make-simple-closure
1549                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1550                         ,(ly:make-simple-closure
1551                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1552         (Y-offset . ,side-position-interface::y-aligned-side)
1553         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1554         (Y-extent . ,grob::always-Y-extent-from-stencil)
1555         (meta . ((class . Spanner)
1556                  (interfaces . (font-interface
1557                                 multi-measure-interface
1558                                 self-alignment-interface
1559                                 side-position-interface
1560                                 text-interface))))))
1561
1562
1563     (NonMusicalPaperColumn
1564      . (
1565         (allow-loose-spacing . #t)
1566         (axes . (,X))
1567         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1568         (bound-alignment-interfaces . (break-alignment-interface))
1569         (full-measure-extra-space . 1.0)
1570         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1571         ;;                    (stencil . ,ly:paper-column::print)
1572
1573         (keep-inside-line . #t)
1574         (line-break-permission . allow)
1575         (non-musical . #t)
1576         (page-break-permission . allow)
1577
1578         ;; debugging stuff: print column number.
1579         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1580
1581         (X-extent . ,ly:axis-group-interface::width)
1582         (meta . ((class . Paper_column)
1583                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1584                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1585                  (interfaces . (axis-group-interface
1586                                 font-interface
1587                                 paper-column-interface
1588                                 separation-item-interface
1589                                 spaceable-grob-interface))))))
1590
1591     (NoteCollision
1592      . (
1593         (axes . (,X ,Y))
1594         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1595         (prefer-dotted-right . #t)
1596         (X-extent . ,ly:axis-group-interface::width)
1597         (Y-extent . ,axis-group-interface::height)
1598         (meta . ((class . Item)
1599                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1600                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1601                  (interfaces . (axis-group-interface
1602                                 note-collision-interface))))))
1603
1604     (NoteColumn
1605      . (
1606         (axes . (,X ,Y))
1607         (bound-alignment-interfaces . (rhythmic-head-interface stem-interface))
1608         (cross-staff . ,ly:axis-group-interface::cross-staff)
1609         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1610         (skyline-vertical-padding . 0.15)
1611         (X-extent . ,ly:axis-group-interface::width)
1612         (Y-extent . ,axis-group-interface::height)
1613         (meta . ((class . Item)
1614                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1615                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1616                  (interfaces . (axis-group-interface
1617                                 note-column-interface
1618                                 separation-item-interface))))))
1619
1620     (NoteHead
1621      . (
1622         (flexa-width . 2.0)
1623         (duration-log . ,note-head::calc-duration-log)
1624         (extra-spacing-height . ,ly:note-head::include-ledger-line-height)
1625         (glyph-name . ,note-head::calc-glyph-name)
1626         (ligature-flexa . #f)
1627         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1628         (stencil . ,ly:note-head::print)
1629         (X-offset . ,ly:note-head::stem-x-shift)
1630         (Y-offset . ,staff-symbol-referencer::callback)
1631         (Y-extent . ,grob::always-Y-extent-from-stencil)
1632         (meta . ((class . Item)
1633                  (interfaces . (font-interface
1634                                 gregorian-ligature-interface
1635                                 ledgered-interface
1636                                 ligature-head-interface
1637                                 mensural-ligature-interface
1638                                 note-head-interface
1639                                 rhythmic-grob-interface
1640                                 rhythmic-head-interface
1641                                 staff-symbol-referencer-interface
1642                                 vaticana-ligature-interface))))))
1643
1644     (NoteName
1645      . (
1646         (stencil . ,ly:text-interface::print)
1647         (Y-extent . ,grob::always-Y-extent-from-stencil)
1648         (meta . ((class . Item)
1649                  (interfaces . (font-interface
1650                                 note-name-interface
1651                                 text-interface))))))
1652
1653     (NoteSpacing
1654      . (
1655         ;; Changed this from 0.75.
1656         ;; If you ever change this back, please document! --hwn
1657         (knee-spacing-correction . 1.0)
1658         (same-direction-correction . 0.25)
1659         (space-to-barline . #t)
1660         (stem-spacing-correction . 0.5)
1661         (meta . ((class . Item)
1662                  (interfaces . (note-spacing-interface
1663                                 spacing-interface))))))
1664
1665     (OttavaBracket
1666      . (
1667         (dash-fraction . 0.3)
1668         (direction . ,UP)
1669         (edge-height . (0 . 1.2))
1670         (font-shape . italic)
1671         (minimum-length . 1.0)
1672         (outside-staff-priority . 400)
1673         (padding . 0.5)
1674         (shorten-pair . (0.0 . -0.6))
1675         (staff-padding . 1.0)
1676         (stencil . ,ly:ottava-bracket::print)
1677         (style . dashed-line)
1678         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1679         (Y-offset . ,side-position-interface::y-aligned-side)
1680         (meta . ((class . Spanner)
1681                  (interfaces . (font-interface
1682                                 horizontal-bracket-interface
1683                                 line-interface
1684                                 ottava-bracket-interface
1685                                 side-position-interface
1686                                 text-interface))))))
1687
1688
1689     (PaperColumn
1690      . (
1691         (allow-loose-spacing . #t)
1692         (axes . (,X))
1693         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1694         (bound-alignment-interfaces . (note-column-interface))
1695         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1696         (keep-inside-line . #t)
1697         ;; 0.08 comes from spacing-horizontal-skyline.ly
1698         ;; allows double flat of F to be nestled over dots of C
1699         (skyline-vertical-padding . 0.08)
1700         ;; (stencil . ,ly:paper-column::print)
1701         (X-extent . ,ly:axis-group-interface::width)
1702
1703         ;; debugging
1704         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1705         (meta . ((class . Paper_column)
1706                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1707                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1708                  (interfaces . (axis-group-interface
1709                                 font-interface
1710                                 paper-column-interface
1711                                 separation-item-interface
1712                                 spaceable-grob-interface))))))
1713
1714     (ParenthesesItem
1715      . (
1716         (font-size . -6)
1717         (padding . 0.2)
1718         (stencil . ,parentheses-item::print)
1719         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1720         (meta . ((class . Item)
1721                  (interfaces . (font-interface
1722                                 parentheses-interface))))))
1723
1724     (PercentRepeat
1725      . (
1726         (dot-negative-kern . 0.75)
1727         (font-encoding . fetaMusic)
1728         (slope . 1.0)
1729         (spacing-pair . (break-alignment . staff-bar))
1730         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1731         (stencil . ,ly:multi-measure-rest::percent)
1732         (thickness . 0.48)
1733         (meta . ((class . Spanner)
1734                  (interfaces . (font-interface
1735                                 multi-measure-rest-interface
1736                                 percent-repeat-interface))))))
1737
1738     (PercentRepeatCounter
1739      . (
1740         (direction . ,UP)
1741         (font-encoding . fetaText)
1742         (font-size . -2)
1743         (padding . 0.2)
1744         (self-alignment-X . ,CENTER)
1745         (staff-padding . 0.25)
1746         (stencil . ,ly:text-interface::print)
1747         (X-offset . ,(ly:make-simple-closure
1748                       `(,+
1749                         ,(ly:make-simple-closure
1750                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1751                         ,(ly:make-simple-closure
1752                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1753         (Y-offset . ,side-position-interface::y-aligned-side)
1754         (Y-extent . ,grob::always-Y-extent-from-stencil)
1755         (meta . ((class . Spanner)
1756                  (interfaces . (font-interface
1757                                 percent-repeat-interface
1758                                 self-alignment-interface
1759                                 side-position-interface
1760                                 text-interface))))))
1761
1762     (PhrasingSlur
1763      . (
1764         (control-points . ,ly:slur::calc-control-points)
1765         (cross-staff . ,ly:slur::calc-cross-staff)
1766         (details . ,default-slur-details)
1767         (direction . ,ly:slur::calc-direction)
1768         (height-limit . 2.0)
1769         (minimum-length . 1.5)
1770         (ratio . 0.333)
1771         (spanner-id . "")
1772         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1773         (stencil . ,ly:slur::print)
1774         (thickness . 1.1)
1775         (vertical-skylines . ,(ly:make-unpure-pure-container ly:slur::vertical-skylines ly:grob::pure-simple-vertical-skylines-from-extents))
1776         (Y-extent . ,slur::height)
1777         (meta . ((class . Spanner)
1778                  (interfaces . (slur-interface))))))
1779
1780     ;; an example of a text spanner
1781     (PianoPedalBracket
1782      . (
1783         (bound-padding . 1.0)
1784         (bracket-flare . (0.5 . 0.5))
1785         (direction . ,DOWN)
1786         (edge-height . (1.0 . 1.0))
1787         (shorten-pair . (0.0 . 0.0))
1788         (stencil . ,ly:piano-pedal-bracket::print)
1789         (style . line)
1790         (thickness .  1.0)
1791         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1792         (meta . ((class . Spanner)
1793                  (interfaces . (line-interface
1794                                 piano-pedal-bracket-interface
1795                                 piano-pedal-interface))))))
1796
1797
1798     (RehearsalMark
1799      . (
1800         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1801         (baseline-skip . 2)
1802         (break-align-symbols . (staff-bar key-signature clef))
1803         (break-visibility . ,end-of-line-invisible)
1804         (direction . ,UP)
1805         (extra-spacing-width . (+inf.0 . -inf.0))
1806         (font-size . 2)
1807         (non-musical . #t)
1808         (outside-staff-horizontal-padding . 0.12)
1809         (outside-staff-priority . 1500)
1810         (padding . 0.8)
1811         (self-alignment-X . ,CENTER)
1812         (stencil . ,ly:text-interface::print)
1813         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1814         (X-offset . ,(ly:make-simple-closure
1815                       `(,+
1816                         ,(ly:make-simple-closure
1817                           (list ly:break-alignable-interface::self-align-callback))
1818                         ,(ly:make-simple-closure
1819                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1820         (Y-offset . ,side-position-interface::y-aligned-side)
1821         (Y-extent . ,grob::always-Y-extent-from-stencil)
1822         (meta . ((class . Item)
1823                  (interfaces . (break-alignable-interface
1824                                 font-interface
1825                                 mark-interface
1826                                 self-alignment-interface
1827                                 side-position-interface
1828                                 text-interface))))))
1829
1830     (RepeatSlash
1831      . (
1832         (slash-negative-kern . 0.85)
1833         (slope . 1.7)
1834         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1835         (Y-extent . ,grob::always-Y-extent-from-stencil)
1836         (thickness . 0.48)
1837         (meta . ((class . Item)
1838                  (interfaces . (percent-repeat-interface
1839                                 percent-repeat-item-interface
1840                                 rhythmic-grob-interface))))))
1841
1842     (RepeatTie
1843      . (
1844         (cross-staff . ,semi-tie::calc-cross-staff)
1845         (control-points . ,ly:semi-tie::calc-control-points)
1846         (details . ((ratio . 0.333)
1847                     (height-limit . 1.0)))
1848         (direction . ,ly:tie::calc-direction)
1849         (head-direction . ,RIGHT)
1850         (stencil  . ,ly:tie::print)
1851         (thickness . 1.0)
1852         (extra-spacing-height . (-0.5 . 0.5))
1853         (Y-extent . ,grob::always-Y-extent-from-stencil)
1854         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1855         (meta . ((class . Item)
1856                  (interfaces . (semi-tie-interface))))))
1857
1858     (RepeatTieColumn
1859      . (
1860         (direction . ,ly:tie::calc-direction)
1861         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1862         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1863         (X-extent . #f)
1864         (Y-extent . #f)
1865         (meta . ((class . Item)
1866                  (interfaces . (semi-tie-column-interface))))))
1867
1868     (Rest
1869      . (
1870         (cross-staff . ,ly:rest::calc-cross-staff)
1871         (duration-log . ,stem::calc-duration-log)
1872         (minimum-distance . 0.25)
1873         (stencil . ,ly:rest::print)
1874         (X-extent . ,ly:rest::width)
1875         (Y-extent . ,(ly:make-unpure-pure-container ly:rest::height ly:rest::pure-height))
1876         (Y-offset . ,(ly:make-unpure-pure-container ly:rest::y-offset-callback))
1877         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1878         (meta . ((class . Item)
1879                  (interfaces . (font-interface
1880                                 rest-interface
1881                                 rhythmic-grob-interface
1882                                 rhythmic-head-interface
1883                                 staff-symbol-referencer-interface))))))
1884
1885     (RestCollision
1886      . (
1887         (minimum-distance . 0.75)
1888         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1889         (meta . ((class . Item)
1890                  (interfaces . (rest-collision-interface))))))
1891
1892
1893     (Script
1894      . (
1895         (add-stem-support . #t)
1896         (cross-staff . ,ly:script-interface::calc-cross-staff)
1897         (direction . ,ly:script-interface::calc-direction)
1898         (font-encoding . fetaMusic)
1899         (positioning-done . ,ly:script-interface::calc-positioning-done)
1900         (side-axis . ,Y)
1901
1902         ;; padding set in script definitions.
1903         (slur-padding . 0.2)
1904         (staff-padding . 0.25)
1905
1906         (stencil . ,ly:script-interface::print)
1907         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1908         (Y-extent . ,grob::always-Y-extent-from-stencil)
1909         (X-offset . ,script-interface::calc-x-offset)
1910         (Y-offset . ,side-position-interface::y-aligned-side)
1911         (meta . ((class . Item)
1912                  (interfaces . (font-interface
1913                                 script-interface
1914                                 side-position-interface))))))
1915
1916     (ScriptColumn
1917      . (
1918         (before-line-breaking . ,ly:script-column::before-line-breaking)
1919         (meta . ((class . Item)
1920                  (interfaces . (script-column-interface))))))
1921
1922     (ScriptRow
1923      . (
1924         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1925         (meta . ((class . Item)
1926                  (interfaces . (script-column-interface))))))
1927
1928     (Slur
1929      . (
1930         (avoid-slur . inside)
1931         (control-points . ,ly:slur::calc-control-points)
1932         (cross-staff . ,ly:slur::calc-cross-staff)
1933         (details . ,default-slur-details)
1934         (direction . ,ly:slur::calc-direction)
1935         (height-limit . 2.0)
1936         (line-thickness . 0.8)
1937         (minimum-length . 1.5)
1938         (ratio . 0.25)
1939         (spanner-id . "")
1940         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1941         (stencil . ,ly:slur::print)
1942         (thickness . 1.2)
1943         (vertical-skylines . ,(ly:make-unpure-pure-container ly:slur::vertical-skylines ly:grob::pure-simple-vertical-skylines-from-extents))
1944         (Y-extent . ,slur::height)
1945         (meta . ((class . Spanner)
1946                  (interfaces . (slur-interface))))))
1947
1948     (SostenutoPedal
1949      . (
1950         (direction . ,RIGHT)
1951         (extra-spacing-width . (+inf.0 . -inf.0))
1952         (font-shape . italic)
1953         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1954         (self-alignment-X . ,CENTER)
1955         (stencil . ,ly:text-interface::print)
1956         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1957         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1958         (Y-extent . ,grob::always-Y-extent-from-stencil)
1959         (meta . ((class . Item)
1960                  (interfaces . (font-interface
1961                                 piano-pedal-script-interface
1962                                 self-alignment-interface
1963                                 text-interface))))))
1964
1965     (SostenutoPedalLineSpanner
1966      . (
1967         (axes . (,Y))
1968         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
1969         (direction . ,DOWN)
1970         (minimum-space . 1.0)
1971         (outside-staff-priority . 1000)
1972         (padding . 1.2)
1973         (side-axis . ,Y)
1974         (staff-padding . 1.0)
1975         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
1976         (X-extent . ,ly:axis-group-interface::width)
1977         (Y-extent . ,axis-group-interface::height)
1978         (Y-offset . ,side-position-interface::y-aligned-side)
1979         (meta . ((class . Spanner)
1980                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1981                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1982                  (interfaces . (axis-group-interface
1983                                 piano-pedal-interface
1984                                 side-position-interface))))))
1985
1986     (SpacingSpanner
1987      . (
1988         (average-spacing-wishes . #t)
1989         (base-shortest-duration . ,(ly:make-moment 3 16))
1990         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1991         (shortest-duration-space . 2.0)
1992         (spacing-increment . 1.2)
1993         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1994         (meta . ((class . Spanner)
1995                  (interfaces . (spacing-options-interface
1996                                 spacing-spanner-interface))))))
1997
1998     (SpanBar
1999      . (
2000         (allow-span-bar . #t)
2001         (bar-extent . ,axis-group-interface::height)
2002         (before-line-breaking . ,ly:span-bar::before-line-breaking)
2003         (break-align-symbol . staff-bar)
2004         (cross-staff . #t)
2005         (glyph-name . ,ly:span-bar::calc-glyph-name)
2006         (layer . 0)
2007         (non-musical . #t)
2008         (stencil . ,ly:span-bar::print)
2009         (X-extent . ,ly:span-bar::width)
2010         (Y-extent . (+inf.0 . -inf.0))
2011         (meta . ((class . Item)
2012                  (interfaces . (bar-line-interface
2013                                 font-interface
2014                                 span-bar-interface))))))
2015
2016     (SpanBarStub
2017      . (
2018         (X-extent . ,(grob::inherit-parent-property
2019                       X 'X-extent))
2020         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height)
2021         ;; we want this to be ignored, so empty, but the extra spacing height
2022         ;; should preserve the span bar's presence for horizontal spacing
2023         (Y-extent . ,pure-from-neighbor-interface::height-if-pure)
2024         (meta . ((class . Item)
2025                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2026                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
2027                  (interfaces . (pure-from-neighbor-interface))))))
2028
2029     (StaffGrouper
2030      . (
2031         (staff-staff-spacing . ((basic-distance . 9)
2032                                 (minimum-distance . 7)
2033                                 (padding . 1)
2034                                 (stretchability . 5)))
2035         (staffgroup-staff-spacing . ((basic-distance . 10.5)
2036                                      (minimum-distance . 8)
2037                                      (padding . 1)
2038                                      (stretchability . 9)))
2039         (meta . ((class . Spanner)
2040                  (interfaces . (staff-grouper-interface))))))
2041
2042     (StaffSpacing
2043      . (
2044         (non-musical . #t)
2045         (stem-spacing-correction . 0.4)
2046         (meta . ((class . Item)
2047                  (interfaces . (spacing-interface
2048                                 staff-spacing-interface))))))
2049
2050     (StaffSymbol
2051      . (
2052         (layer . 0)
2053         (ledger-line-thickness . (1.0 . 0.1))
2054         (line-count . 5)
2055         (stencil . ,ly:staff-symbol::print)
2056         (Y-extent . ,(ly:make-unpure-pure-container ly:staff-symbol::height))
2057         (meta . ((class . Spanner)
2058                  (interfaces . (staff-symbol-interface))))))
2059
2060     (StanzaNumber
2061      . (
2062         (direction . ,LEFT)
2063         (font-series . bold)
2064         (padding . 1.0)
2065         (side-axis . ,X)
2066         (stencil . ,ly:text-interface::print)
2067         (X-offset . ,ly:side-position-interface::x-aligned-side)
2068         (Y-extent . ,grob::always-Y-extent-from-stencil)
2069         (meta . ((class . Item)
2070                  (interfaces . (font-interface
2071                                 side-position-interface
2072                                 stanza-number-interface
2073                                 text-interface))))))
2074
2075     (Stem
2076      . (
2077         (beamlet-default-length . (1.1 . 1.1))
2078         (beamlet-max-length-proportion . (0.75 . 0.75))
2079         (cross-staff . ,ly:stem::calc-cross-staff)
2080         (default-direction . ,ly:stem::calc-default-direction)
2081         (details
2082          . (
2083             ;; 3.5 (or 3 measured from note head) is standard length
2084             ;; 32nd, 64th, 128th flagged stems should be longer
2085             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
2086
2087             ;; FIXME.  3.5 yields too long beams (according to Ross and
2088             ;; looking at Baerenreiter examples) for a number of common
2089             ;; boundary cases.  Subtracting half a beam thickness fixes
2090             ;; this, but the bug may well be somewhere else.
2091
2092             ;; FIXME this should come from 'lengths
2093             (beamed-lengths . (3.26 3.5 3.6))
2094
2095             ;; The 'normal' minima
2096             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
2097             ;;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
2098
2099             ;; The 'extreme case' minima
2100             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
2101
2102             ;; Stems in unnatural (forced) direction should be shortened by
2103             ;; one staff space, according to [Roush & Gourlay].
2104             ;; Flagged stems we shorten only half a staff space.
2105             (stem-shorten . (1.0 0.5))
2106
2107             ))
2108
2109         ;; We use the normal minima as minimum for the ideal lengths,
2110         ;; and the extreme minima as abolute minimum length.
2111
2112         (direction . ,ly:stem::calc-direction)
2113         (duration-log . ,stem::calc-duration-log)
2114         (length . ,(ly:make-unpure-pure-container ly:stem::calc-length ly:stem::pure-calc-length))
2115         (neutral-direction . ,DOWN)
2116         (positioning-done . ,ly:stem::calc-positioning-done)
2117         (stem-info . ,ly:stem::calc-stem-info)
2118         (stem-begin-position . ,(ly:make-unpure-pure-container ly:stem::calc-stem-begin-position ly:stem::pure-calc-stem-begin-position))
2119         (stencil . ,ly:stem::print)
2120         (thickness . 1.3)
2121         (X-extent . ,ly:stem::width)
2122         (X-offset . ,ly:stem::offset-callback)
2123         (Y-extent . ,(ly:make-unpure-pure-container ly:stem::height ly:stem::pure-height))
2124         (Y-offset . ,staff-symbol-referencer::callback)
2125         (meta . ((class . Item)
2126                  (interfaces . (stem-interface))))))
2127
2128     (StemStub
2129      . (
2130         (X-extent . ,stem-stub::width)
2131         (extra-spacing-height . ,stem-stub::extra-spacing-height)
2132         (Y-extent . ,(ly:make-unpure-pure-container #f stem-stub::pure-height))
2133         (meta . ((class . Item)
2134                  (interfaces . ())))))
2135
2136     (StemTremolo
2137      . (
2138         (beam-thickness . 0.48) ; staff-space
2139         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
2140         (direction . ,ly:stem-tremolo::calc-direction)
2141         (slope . ,ly:stem-tremolo::calc-slope)
2142         (stencil . ,ly:stem-tremolo::print)
2143         (style . ,ly:stem-tremolo::calc-style)
2144         (X-extent . ,ly:stem-tremolo::width)
2145         (Y-extent . ,(grob::unpure-Y-extent-from-stencil ly:stem-tremolo::pure-height))
2146         (X-offset . ,(ly:make-simple-closure
2147                       `(,+
2148                         ,(ly:make-simple-closure
2149                           (list ly:self-alignment-interface::centered-on-x-parent))
2150                         ,(ly:make-simple-closure
2151                           (list ly:self-alignment-interface::x-aligned-on-self)))))
2152         (Y-offset . ,(ly:make-unpure-pure-container ly:stem-tremolo::calc-y-offset ly:stem-tremolo::pure-calc-y-offset))
2153         (meta . ((class . Item)
2154                  (interfaces . (self-alignment-interface
2155                                 stem-tremolo-interface))))))
2156
2157     (StringNumber
2158      . (
2159         (avoid-slur . around)
2160         (cross-staff . ,script-or-side-position-cross-staff)
2161         (font-encoding . fetaText)
2162         (font-size . -5)                ; don't overlap when next to heads.
2163         (padding . 0.5)
2164         (script-priority . 100)
2165         (self-alignment-X . ,CENTER)
2166         (self-alignment-Y . ,CENTER)
2167         (staff-padding . 0.5)
2168         (stencil . ,print-circled-text-callback)
2169         (text . ,string-number::calc-text)
2170         (Y-extent . ,grob::always-Y-extent-from-stencil)
2171         (meta . ((class . Item)
2172                  (interfaces . (font-interface
2173                                 self-alignment-interface
2174                                 side-position-interface
2175                                 string-number-interface
2176                                 text-interface
2177                                 text-script-interface))))))
2178
2179     (StrokeFinger
2180      . (
2181         (digit-names . #("p" "i" "m" "a" "x"))
2182         (font-shape . italic)
2183         (font-size . -4)                ; don't overlap when next to heads.
2184         (padding . 0.5)
2185         (script-priority . 100)
2186         (self-alignment-X . ,CENTER)
2187         (self-alignment-Y . ,CENTER)
2188         (staff-padding . 0.5)
2189         (stencil . ,ly:text-interface::print)
2190         (text . ,stroke-finger::calc-text)
2191         (Y-extent . ,grob::always-Y-extent-from-stencil)
2192         (meta . ((class . Item)
2193                  (interfaces . (font-interface
2194                                 self-alignment-interface
2195                                 side-position-interface
2196                                 stroke-finger-interface
2197                                 text-interface
2198                                 text-script-interface))))))
2199
2200     (SustainPedal
2201      . (
2202         (direction . ,RIGHT)
2203         (extra-spacing-width . (+inf.0 . -inf.0))
2204         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
2205         (self-alignment-X . ,CENTER)
2206         (stencil . ,ly:sustain-pedal::print)
2207         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
2208         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2209         (Y-extent . ,grob::always-Y-extent-from-stencil)
2210         (meta . ((class . Item)
2211                  (interfaces . (font-interface
2212                                 piano-pedal-interface
2213                                 piano-pedal-script-interface
2214                                 self-alignment-interface
2215                                 text-interface))))))
2216
2217     (SustainPedalLineSpanner
2218      . (
2219         (axes . (,Y))
2220         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
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.12)
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         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
2622         (direction . ,DOWN)
2623         (minimum-space . 1.0)
2624         (outside-staff-priority . 1000)
2625         (padding . 1.2)
2626         (side-axis . ,Y)
2627         (staff-padding . 1.2)
2628         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
2629         (X-extent . ,ly:axis-group-interface::width)
2630         (Y-extent . ,axis-group-interface::height)
2631         (Y-offset . ,side-position-interface::y-aligned-side)
2632         (meta . ((class . Spanner)
2633                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2634                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2635                  (interfaces . (axis-group-interface
2636                                 piano-pedal-interface
2637                                 side-position-interface))))))
2638
2639
2640     (VaticanaLigature
2641      . (
2642         (flexa-width . 2.0)
2643         (stencil . ,ly:vaticana-ligature::print)
2644         (thickness . 0.6)
2645         (meta . ((class . Spanner)
2646                  (interfaces . (font-interface
2647                                 vaticana-ligature-interface))))))
2648
2649     (VerticalAlignment
2650      . (
2651         (axes . (,Y))
2652         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2653         (stacking-dir . -1)
2654         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2655         (X-extent . ,ly:axis-group-interface::width)
2656         (Y-extent . ,axis-group-interface::height)
2657         (meta . ((class . Spanner)
2658                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2659                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2660                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2661                  (interfaces . (align-interface
2662                                 axis-group-interface))))))
2663
2664     (VerticalAxisGroup
2665      . (
2666         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2667         (axes . (,Y))
2668         (default-staff-staff-spacing . ((basic-distance . 9)
2669                                         (minimum-distance . 8)
2670                                         (padding . 1)))
2671         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2672         (outside-staff-placement-directive . left-to-right-polite)
2673         (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))
2674         (stencil . ,ly:axis-group-interface::print)
2675         (skyline-horizontal-padding . 0.1)
2676         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2677         (X-extent . ,ly:axis-group-interface::width)
2678         (Y-extent . ,(ly:make-unpure-pure-container ly:hara-kiri-group-spanner::y-extent ly:hara-kiri-group-spanner::pure-height))
2679         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2680         (meta . ((class . Spanner)
2681                  (object-callbacks . (
2682                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2683                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2684                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2685
2686                  (interfaces . (axis-group-interface
2687                                 hara-kiri-group-spanner-interface))))))
2688
2689     (VoiceFollower
2690      . (
2691         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2692         (bound-details . ((right . ((attach-dir .  ,CENTER)
2693                                     (padding . 1.5)
2694                                     ))
2695                           (left . ((attach-dir .  ,CENTER)
2696                                    (padding . 1.5)
2697                                    ))
2698                           ))
2699         (cross-staff . #t)
2700         (gap . 0.5)
2701         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2702         (non-musical . #t)
2703         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2704         (stencil . ,ly:line-spanner::print)
2705         (style . line)
2706         (X-extent . #f)
2707         (Y-extent . #f)
2708         (meta . ((class . Spanner)
2709                  (interfaces . (line-interface
2710                                 line-spanner-interface))))))
2711
2712     (VoltaBracket
2713      . (
2714         (direction . ,UP)
2715         (edge-height . (2.0 . 2.0)) ;; staff-space;
2716         (font-encoding . fetaText)
2717         (font-size . -4)
2718         (shorten-pair . ,ly:volta-bracket::calc-shorten-pair)
2719         (stencil . ,ly:volta-bracket-interface::print)
2720         (thickness . 1.6) ;; line-thickness
2721         (word-space . 0.6)
2722         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
2723         (Y-extent . ,(grob::unpure-Y-extent-from-stencil volta-bracket-interface::pure-height))
2724         (meta . ((class . Spanner)
2725                  (interfaces . (font-interface
2726                                 horizontal-bracket-interface
2727                                 line-interface
2728                                 side-position-interface
2729                                 text-interface
2730                                 volta-bracket-interface
2731                                 volta-interface))))))
2732
2733     (VoltaBracketSpanner
2734      . (
2735         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2736         (axes . (,Y))
2737         (direction . ,UP)
2738         (no-alignment . #t)
2739         (outside-staff-priority . 600)
2740         (padding . 1)
2741         (side-axis . ,Y)
2742         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
2743         (X-extent . ,ly:axis-group-interface::width)
2744         (Y-extent . ,axis-group-interface::height)
2745         (Y-offset . ,side-position-interface::y-aligned-side)
2746         (meta . ((class . Spanner)
2747                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2748                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2749                  (interfaces . (axis-group-interface
2750                                 side-position-interface
2751                                 volta-interface))))))
2752
2753     ))
2754
2755 (define (completize-grob-entry x)
2756   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2757 "
2758   ;;  (display (car x))
2759   ;;  (newline)
2760   (let* ((name-sym  (car x))
2761          (grob-entry (cdr x))
2762          (meta-entry (assoc-get 'meta grob-entry))
2763          (class (assoc-get 'class meta-entry))
2764          (ifaces-entry
2765           (assoc-get 'interfaces meta-entry)))
2766
2767     (cond
2768      ((eq? 'Item class)
2769       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2770      ((eq? 'Spanner class)
2771       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2772      ((eq? 'Paper_column class)
2773       (set! ifaces-entry (cons 'item-interface
2774                                (cons 'paper-column-interface ifaces-entry))))
2775      ((eq? 'System class)
2776       (set! ifaces-entry (cons 'system-interface
2777                                (cons 'spanner-interface ifaces-entry))))
2778      (else
2779       (ly:warning "Unknown class ~a" class)))
2780
2781     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2782     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2783
2784     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2785     (set! meta-entry (assoc-set! meta-entry 'interfaces
2786                                  ifaces-entry))
2787     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2788     (cons name-sym grob-entry)))
2789
2790 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2791
2792 ;;  (display (map pair? all-grob-descriptions))
2793
2794 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2795
2796 (map (lambda (x)
2797        ;; (display (car x)) (newline)
2798
2799        (set-object-property! (car x) 'translation-type? list?)
2800        (set-object-property! (car x) 'is-grob? #t))
2801      all-grob-descriptions)
2802
2803 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))