]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
Merge branch 'translation' into staging
[lilypond.git] / scm / define-grobs.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; LilyPond is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 ;;;; distances are given in line-thickness (thicknesses) and
20 ;;;; staff-space (distances)
21
22 ;;;; WARNING: the meta field should be the last one.
23 ;;;; WARNING: don't use anonymous functions for initialization.
24
25 ;; TODO: junk the meta field in favor of something more compact?
26
27
28 (define-session-public all-grob-descriptions
29   `(
30     (Accidental
31      . (
32         (alteration . ,accidental-interface::calc-alteration)
33         (avoid-slur . inside)
34         (glyph-name . ,accidental-interface::glyph-name)
35         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
36         (stencil . ,ly:accidental-interface::print)
37         (horizontal-skylines . ,(ly:make-unpure-pure-container ly:accidental-interface::horizontal-skylines))
38         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
39         (X-extent . ,ly:accidental-interface::width)
40         (Y-extent . ,accidental-interface::height)
41         (meta . ((class . Item)
42                  (interfaces . (accidental-interface
43                                 inline-accidental-interface
44                                 font-interface))))))
45
46     (AccidentalCautionary
47      . (
48         (alteration . ,accidental-interface::calc-alteration)
49         (avoid-slur . inside)
50         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
51         (parenthesized . #t)
52         (stencil . ,ly:accidental-interface::print)
53         (Y-extent . ,accidental-interface::height)
54         (meta . ((class . Item)
55                  (interfaces . (accidental-interface
56                                 inline-accidental-interface
57                                 font-interface))))))
58
59     (AccidentalPlacement
60      . (
61         (direction .  ,LEFT)
62         (positioning-done . ,ly:accidental-placement::calc-positioning-done)
63
64         ;; this is quite small, but it is very ugly to have
65         ;; accs closer to the previous note than to the next one.
66         (right-padding . 0.15)
67
68         ;; for horizontally stacked scripts.
69         (script-priority .  -100)
70
71         (X-extent . ,ly:axis-group-interface::width)
72         (meta . ((class . Item)
73                  (interfaces . (accidental-placement-interface))))))
74
75     (AccidentalSuggestion
76      . (
77         (alteration . ,accidental-interface::calc-alteration)
78         (direction . ,UP)
79         (font-size . -2)
80         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
81         (outside-staff-priority . 0)
82         (script-priority . 0)
83         (self-alignment-X . ,CENTER)
84         (side-axis . ,Y)
85         (staff-padding . 0.25)
86         (stencil . ,ly:accidental-interface::print)
87         (X-extent . ,ly:accidental-interface::width)
88         (X-offset . ,(ly:make-simple-closure
89                       `(,+
90                         ,(ly:make-simple-closure
91                           (list ly:self-alignment-interface::centered-on-x-parent))
92                         ,(ly:make-simple-closure
93                           (list ly:self-alignment-interface::x-aligned-on-self)))))
94         (Y-extent . ,accidental-interface::height)
95         (Y-offset . ,side-position-interface::y-aligned-side)
96         (meta . ((class . Item)
97                  (interfaces . (accidental-interface
98                                 accidental-suggestion-interface
99                                 font-interface
100                                 script-interface
101                                 self-alignment-interface
102                                 side-position-interface))))))
103
104     (Ambitus
105      . (
106         (axes . (,X ,Y))
107         (break-align-symbol . ambitus)
108         (break-visibility . ,begin-of-line-visible)
109         (non-musical . #t)
110         (space-alist . (
111                         (cue-end-clef . (extra-space . 0.5))
112                         (clef . (extra-space . 0.5))
113                         (cue-clef . (extra-space . 0.5))
114                         (key-signature . (extra-space . 0.0))
115                         (staff-bar . (extra-space . 0.0))
116                         (time-signature . (extra-space . 0.0))
117                         (first-note . (fixed-space . 0.0))))
118         (X-extent . ,ly:axis-group-interface::width)
119         (Y-extent . ,axis-group-interface::height)
120         (meta . ((class . Item)
121                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
122                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
123                  (interfaces . (ambitus-interface
124                                 axis-group-interface
125                                 break-aligned-interface))))))
126
127     (AmbitusAccidental
128      . (
129         (direction . ,LEFT)
130         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
131         (padding . 0.5)
132         (side-axis . ,X)
133         (stencil . ,ly:accidental-interface::print)
134         (X-offset . ,ly:side-position-interface::x-aligned-side)
135         (Y-extent . ,accidental-interface::height)
136         (meta . ((class . Item)
137                  (interfaces . (accidental-interface
138                                 break-aligned-interface
139                                 font-interface
140                                 side-position-interface))))))
141
142     (AmbitusLine
143      . (
144         (gap . ,ambitus-line::calc-gap)
145         (length-fraction . 0.7)
146         (maximum-gap . 0.45)
147         (stencil . ,ambitus::print)
148         (thickness . 2)
149         (X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
150         (meta . ((class . Item)
151                  (interfaces . (ambitus-interface
152                                 font-interface))))))
153
154     (AmbitusNoteHead
155      . (
156         (duration-log . 2)
157         (glyph-name . ,note-head::calc-glyph-name)
158         (stencil . ,ly:note-head::print)
159         (Y-offset . ,staff-symbol-referencer::callback)
160         (Y-extent . ,grob::always-Y-extent-from-stencil)
161         (meta . ((class . Item)
162                  (interfaces . (ambitus-interface
163                                 font-interface
164                                 ledgered-interface
165                                 note-head-interface
166                                 rhythmic-head-interface
167                                 staff-symbol-referencer-interface))))))
168
169     (Arpeggio
170      . (
171         (cross-staff . ,ly:arpeggio::calc-cross-staff)
172         (direction . ,LEFT)
173         (padding . 0.5)
174         (positions . ,ly:arpeggio::calc-positions)
175         (protrusion . 0.4)
176         (script-priority . 0)
177         (side-axis . ,X)
178         (staff-position . 0.0)
179         (stencil . ,ly:arpeggio::print)
180         (X-extent . ,ly:arpeggio::width)
181         (Y-extent . ,(grob::unpure-Y-extent-from-stencil ly:arpeggio::pure-height))
182         (X-offset . ,ly:side-position-interface::x-aligned-side)
183         (Y-offset . ,staff-symbol-referencer::callback)
184         (meta . ((class . Item)
185                  (interfaces . (arpeggio-interface
186                                 font-interface
187                                 side-position-interface
188                                 staff-symbol-referencer-interface))))))
189
190     (BalloonTextItem
191      . (
192         (annotation-balloon . #t)
193         (annotation-line . #t)
194         (extra-spacing-width . (+inf.0 . -inf.0))
195         (stencil . ,ly:balloon-interface::print)
196         (text . ,(grob::calc-property-by-copy 'text))
197         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
198         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
199         (Y-extent . ,grob::always-Y-extent-from-stencil)
200         (meta . ((class . Item)
201                  (interfaces . (balloon-interface
202                                 font-interface
203                                 text-interface))))))
204
205     (BarLine
206      . (
207         (allow-span-bar . #t)
208         (bar-extent . ,ly:bar-line::calc-bar-extent)
209         (break-align-anchor . ,ly:bar-line::calc-anchor)
210         (break-align-symbol . staff-bar)
211         (break-visibility . ,bar-line::calc-break-visibility)
212         (extra-spacing-height . ,pure-from-neighbor-interface::account-for-span-bar)
213         (gap . 0.4)
214         (glyph . "|")
215         (glyph-name . ,bar-line::calc-glyph-name)
216
217         ;;
218         ;; Ross. page 151 lists other values, we opt for a leaner look
219         ;;
220         ;; TODO:
221         ;; kern should scale with line-thickness too.
222         (kern . 3.0)
223         (thin-kern . 3.0)
224         (hair-thickness . 1.9)
225         (thick-thickness . 6.0)
226
227         (layer . 0)
228         (non-musical . #t)
229         (rounded . #f)
230         (space-alist . (
231                         (time-signature . (extra-space . 0.75))
232                         (custos . (minimum-space . 2.0))
233                         (clef . (minimum-space . 1.0))
234                         (key-signature . (extra-space . 1.0))
235                         (key-cancellation . (extra-space . 1.0))
236                         (first-note . (fixed-space . 1.3))
237                         (next-note . (semi-fixed-space . 0.9))
238                         (right-edge . (extra-space . 0.0))))
239         (stencil . ,ly:bar-line::print)
240         (Y-extent . ,grob::always-Y-extent-from-stencil)
241         (meta . ((class . Item)
242                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
243                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
244                  (interfaces . (bar-line-interface
245                                 break-aligned-interface
246                                 font-interface
247                                 pure-from-neighbor-interface))))))
248
249     (BarNumber
250      . (
251         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
252         ;; want the bar number before the clef at line start.
253         (break-align-symbols . (left-edge staff-bar))
254
255         (break-visibility . ,begin-of-line-visible)
256         (direction . ,UP)
257         (extra-spacing-width . (+inf.0 . -inf.0))
258         (font-family . roman)
259         (font-size . -2)
260         (non-musical . #t)
261         ;; w/o padding, bars numbers are not positioned over the staff as
262         ;; they are slightly to the left. so we add just a bit.
263         (horizon-padding . 0.05)
264         (outside-staff-priority . 100)
265         (padding . 1.0)
266         (self-alignment-X . ,RIGHT)
267         (side-axis . ,Y)
268         (stencil . ,ly:text-interface::print)
269         (X-offset . ,(ly:make-simple-closure
270                       `(,+
271                         ,(ly:make-simple-closure
272                           (list ly:break-alignable-interface::self-align-callback))
273                         ,(ly:make-simple-closure
274                           (list ly:self-alignment-interface::x-aligned-on-self)))))
275         (Y-offset . ,side-position-interface::y-aligned-side)
276         (Y-extent . ,grob::always-Y-extent-from-stencil)
277         (meta .
278               ((class . Item)
279                (interfaces . (break-alignable-interface
280                               font-interface
281                               self-alignment-interface
282                               side-position-interface
283                               text-interface))))))
284
285     (BassFigure
286      . (
287         (stencil . ,ly:text-interface::print)
288         (Y-extent . ,grob::always-Y-extent-from-stencil)
289         (meta . ((class . Item)
290                  (interfaces . (bass-figure-interface
291                                 font-interface
292                                 rhythmic-grob-interface
293                                 text-interface))))))
294
295     (BassFigureAlignment
296      . (
297         (axes . (,Y))
298         (padding . 0.2)
299         (positioning-done . ,ly:align-interface::align-to-minimum-distances)
300         (stacking-dir . ,DOWN)
301         (X-extent . ,ly:axis-group-interface::width)
302         (Y-extent . ,axis-group-interface::height)
303         (meta . ((class . Spanner)
304                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
305                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
306                  (interfaces . (align-interface
307                                 axis-group-interface
308                                 bass-figure-alignment-interface))))))
309
310     (BassFigureAlignmentPositioning
311      . (
312         (axes . (,Y))
313         (direction . ,UP)
314         (padding . 0.5)
315         (side-axis . ,Y)
316         (staff-padding . 1.0)
317         (X-extent . ,ly:axis-group-interface::width)
318         (Y-extent . ,axis-group-interface::height)
319         (Y-offset . ,side-position-interface::y-aligned-side)
320         (meta . ((class . Spanner)
321                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
322                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
323                  (interfaces . (axis-group-interface
324                                 side-position-interface))))))
325
326     (BassFigureBracket
327      . (
328         (edge-height . (0.2 . 0.2))
329         (stencil . ,ly:enclosing-bracket::print)
330         (X-extent . ,ly:enclosing-bracket::width)
331         (meta . ((class . Item)
332                  (interfaces . (enclosing-bracket-interface))))))
333
334     (BassFigureContinuation
335      . (
336         (stencil . ,ly:figured-bass-continuation::print)
337         (Y-offset . ,ly:figured-bass-continuation::center-on-figures)
338         (meta . ((class . Spanner)
339                  (interfaces . (figured-bass-continuation-interface))))))
340
341     (BassFigureLine
342      . (
343         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
344         (axes . (,Y))
345         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
346         (X-extent . ,ly:axis-group-interface::width)
347         (Y-extent . ,axis-group-interface::height)
348         (meta . ((class . Spanner)
349                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
350                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
351                  (interfaces . (axis-group-interface))))))
352
353
354     (Beam
355      . (
356         ;; todo: clean this up a bit: the list is getting
357         ;; rather long.
358         (auto-knee-gap . 5.5)
359         (beam-segments . ,ly:beam::calc-beam-segments)
360         (beam-thickness . 0.48) ; in staff-space
361
362         ;; We have some unreferenced problems here.
363         ;;
364         ;; If we shorten beamed stems less than normal stems (1 staff-space),
365         ;; or high order less than 8th beams, patterns like
366         ;;     c''4 [c''8 c''] c''4 [c''16 c]
367         ;; are ugly (different stem lengths).
368         ;;
369         ;; But if we shorten 16th beams as much as 8th beams, a single
370         ;; forced 16th beam looks *very* short.
371
372         ;; We choose to shorten 8th beams the same as single stems,
373         ;; and high order beams less than 8th beams, so that all
374         ;; isolated shortened beams look nice and a bit shortened,
375         ;; sadly possibly breaking patterns with high order beams.
376         (beamed-stem-shorten . (1.0 0.5 0.25))
377
378         (beaming . ,ly:beam::calc-beaming)
379         (clip-edges . #t)
380         (collision-interfaces . (beam-interface
381                                  clef-interface
382                                  clef-modifier-interface
383                                  flag-interface
384                                  inline-accidental-interface
385                                  key-signature-interface
386                                  note-head-interface
387                                  stem-interface
388                                  time-signature-interface))
389         (cross-staff . ,ly:beam::calc-cross-staff)
390         (damping . 1)
391         (details
392          .(
393            (secondary-beam-demerit . 10)
394            (stem-length-demerit-factor . 5)
395            (region-size . 2)
396            (beam-eps . 0.001)
397            (stem-length-limit-penalty . 5000)
398            (damping-direction-penalty . 800)
399            (hint-direction-penalty . 20)
400            (musical-direction-factor . 400)
401            (ideal-slope-factor . 10)
402            (collision-penalty . 500)
403            (collision-padding . 0.35)
404            (round-to-zero-slope . 0.02)))
405         (direction . ,ly:beam::calc-direction)
406
407         (normalized-endpoints . ,ly:spanner::calc-normalized-endpoints)
408         ;; only for debugging.
409         (font-family . roman)
410
411         (gap . 0.8)
412         (neutral-direction . ,DOWN)
413         (positions . ,beam::place-broken-parts-individually)
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.7)
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         (padding . 0.6)
817         (side-axis . ,Y)
818         (slur-padding . 0.3)
819         (staff-padding . 0.1)
820         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
821         (X-extent . ,ly:axis-group-interface::width)
822         (Y-extent . ,axis-group-interface::height)
823         (Y-offset . ,side-position-interface::y-aligned-side)
824         (meta . ((class . Spanner)
825                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
826                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
827                  (interfaces . (axis-group-interface
828                                 dynamic-interface
829                                 dynamic-line-spanner-interface
830                                 side-position-interface))))))
831
832     (DynamicText
833      . (
834
835         ;; todo.
836
837         (collision-bias . -2.0)
838         (collision-padding . 0.5)
839         (direction . ,ly:script-interface::calc-direction)
840         (extra-spacing-width . (+inf.0 . -inf.0))
841         (font-encoding . fetaText)
842         (font-series . bold)
843         (font-shape . italic)
844         (positioning-done . ,ly:script-interface::calc-positioning-done)
845         (right-padding . 0.5)
846         (self-alignment-X . ,CENTER)
847         (stencil . ,ly:text-interface::print)
848         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
849         (Y-extent . ,grob::always-Y-extent-from-stencil)
850         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
851         (Y-offset . ,(scale-by-font-size -0.6)) ; center on an 'm'
852         (meta . ((class . Item)
853                  (interfaces . (dynamic-interface
854                                 dynamic-text-interface
855                                 font-interface
856                                 script-interface
857                                 self-alignment-interface
858                                 text-interface))))))
859
860     (DynamicTextSpanner
861      . (
862         (before-line-breaking . ,dynamic-text-spanner::before-line-breaking)
863         (bound-details . ((right . ((attach-dir .  ,LEFT)
864                                     (Y . 0)
865                                     (padding . 0.75)
866                                     ))
867                           (right-broken . ((attach-dir .  ,RIGHT)
868                                            (padding . 0.0)
869                                            ))
870
871                           (left . ((attach-dir .  ,LEFT)
872                                    (Y . 0)
873                                    (stencil-offset . (-0.75 . -0.5))
874                                    (padding . 0.75)
875                                    ))
876                           (left-broken . ((attach-dir .  ,RIGHT)
877                                           ))
878                           ))
879         (dash-fraction . 0.2)
880         (dash-period . 3.0)
881
882         ;; rather ugh with NCSB
883         ;; (font-series . bold)
884         (font-shape . italic)
885
886         ;; need to blend with dynamic texts.
887         (font-size . 1)
888
889         (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
890
891         (minimum-length . 2.0)
892         ;; make sure the spanner doesn't get too close to notes
893         (minimum-Y-extent . (-1 . 1))
894
895         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
896         (skyline-horizontal-padding . 0.2)
897         (springs-and-rods . ,ly:spanner::set-spacing-rods)
898         (stencil . ,ly:line-spanner::print)
899         (style . dashed-line)
900         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
901         (meta . ((class . Spanner)
902                  (interfaces . (dynamic-interface
903                                 dynamic-text-spanner-interface
904                                 font-interface
905                                 line-interface
906                                 line-spanner-interface
907                                 spanner-interface
908                                 text-interface))))))
909
910
911     (Episema
912      . (
913         (bound-details . ((left . ((Y . 0)
914                                    (padding . 0)
915                                    (attach-dir . ,LEFT)
916                                    ))
917                           (right . ((Y . 0)
918                                     (padding . 0)
919                                     (attach-dir . ,RIGHT)
920                                     ))
921                           ))
922         (direction . ,UP)
923         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
924         (quantize-position . #t)
925         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
926         (side-axis . ,Y)
927         (stencil . ,ly:line-spanner::print)
928         (style . line)
929         (Y-offset . ,side-position-interface::y-aligned-side)
930         (meta . ((class . Spanner)
931                  (interfaces . (episema-interface
932                                 font-interface
933                                 line-interface
934                                 line-spanner-interface
935                                 side-position-interface))))))
936
937
938     (Fingering
939      . (
940
941         ;; sync with TextScript (?)
942         (add-stem-support . ,only-if-beamed)
943         (avoid-slur . around)
944         (cross-staff . ,script-or-side-position-cross-staff)
945         (direction . ,ly:script-interface::calc-direction)
946         (font-encoding . fetaText)
947         (font-size . -5)                ; don't overlap when next to heads.
948         (padding . 0.5)
949         (positioning-done . ,ly:script-interface::calc-positioning-done)
950         (script-priority . 100)
951         (self-alignment-X . ,CENTER)
952         (self-alignment-Y . ,CENTER)
953         (slur-padding . 0.2)
954         (staff-padding . 0.5)
955         (stencil . ,ly:text-interface::print)
956         (text . ,fingering::calc-text)
957         (Y-extent . ,grob::always-Y-extent-from-stencil)
958         (meta . ((class . Item)
959                  (interfaces . (finger-interface
960                                 font-interface
961                                 self-alignment-interface
962                                 side-position-interface
963                                 text-interface
964                                 text-script-interface))))))
965
966     (FingeringColumn
967      . (
968         (padding . 0.2)
969         (positioning-done . ,ly:fingering-column::calc-positioning-done)
970         (snap-radius . 0.3)
971         (meta . ((class . Item)
972                  (interfaces . (fingering-column-interface))))))
973
974     (Flag
975      . (
976         (glyph-name . ,ly:flag::glyph-name)
977         (stencil . ,ly:flag::print)
978         (transparent . ,(grob::inherit-parent-property
979                          X 'transparent))
980         (color . ,(grob::inherit-parent-property
981                    X 'color))
982         (X-extent . ,ly:flag::width)
983         (X-offset . ,ly:flag::calc-x-offset)
984         (Y-offset . ,(ly:make-unpure-pure-container ly:flag::calc-y-offset ly:flag::pure-calc-y-offset))
985         (Y-extent . ,grob::always-Y-extent-from-stencil)
986         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
987         (meta . ((class . Item)
988                  (interfaces . (flag-interface
989                                 font-interface))))))
990
991     (FootnoteItem
992      . (
993         (annotation-balloon . #f)
994         (annotation-line . #t)
995         (automatically-numbered . ,(grob::calc-property-by-copy 'automatically-numbered))
996         (break-visibility . ,(grob::inherit-parent-property
997                               X 'break-visibility))
998         (footnote . #t)
999         (footnote-text . ,(grob::calc-property-by-copy 'footnote-text))
1000         (stencil . ,ly:balloon-interface::print)
1001         (text . ,(grob::calc-property-by-copy 'text))
1002         (X-extent . #f)
1003         (Y-extent . #f)
1004         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
1005         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
1006         (meta . ((class . Item)
1007                  (interfaces . (balloon-interface
1008                                 footnote-interface
1009                                 font-interface
1010                                 text-interface))))))
1011
1012     (FootnoteSpanner
1013      . (
1014         (annotation-balloon . #f)
1015         (annotation-line . #t)
1016         (automatically-numbered . ,(grob::calc-property-by-copy 'automatically-numbered))
1017         (footnote . #t)
1018         (footnote-text . ,(grob::calc-property-by-copy 'footnote-text))
1019         (spanner-placement . ,LEFT)
1020         (stencil . ,ly:balloon-interface::print-spanner)
1021         (text . ,(grob::calc-property-by-copy 'text))
1022         (X-extent . #f)
1023         (Y-extent . #f)
1024         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
1025         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
1026         (meta . ((class . Spanner)
1027                  (interfaces . (balloon-interface
1028                                 footnote-interface
1029                                 footnote-spanner-interface
1030                                 font-interface
1031                                 text-interface))))))
1032
1033     (FretBoard
1034      . (
1035         (after-line-breaking . ,ly:chord-name::after-line-breaking)
1036         (fret-diagram-details . ((finger-code . below-string)))
1037         (stencil . ,fret-board::calc-stencil)
1038         (extra-spacing-height . (0.2 . -0.2))
1039         (extra-spacing-width . (-0.5 . 0.5))
1040         (Y-extent . ,grob::always-Y-extent-from-stencil)
1041         (meta . ((class . Item)
1042                  (interfaces . (chord-name-interface
1043                                 font-interface
1044                                 fret-diagram-interface
1045                                 rhythmic-grob-interface))))))
1046
1047
1048     (Glissando
1049      . (
1050         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
1051         (bound-details . ((right . ((attach-dir .  ,LEFT)
1052                                     (end-on-accidental . #t)
1053                                     (padding . 0.5)
1054                                     ))
1055                           (left . ((attach-dir .  ,RIGHT)
1056                                    (padding . 0.5)
1057                                    ))
1058                           ))
1059         (cross-staff . ,ly:line-spanner::calc-cross-staff)
1060         (gap . 0.5)
1061         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1062         (normalized-endpoints . ,ly:spanner::calc-normalized-endpoints)
1063         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1064         (simple-Y . #t)
1065         (stencil . ,ly:line-spanner::print)
1066         (style . line)
1067         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1068         (X-extent . #f)
1069         (Y-extent . #f)
1070         (zigzag-width . 0.75)
1071         (meta . ((class . Spanner)
1072                  (interfaces . (glissando-interface
1073                                 line-interface
1074                                 line-spanner-interface
1075                                 unbreakable-spanner-interface))))))
1076
1077     (GraceSpacing
1078      . (
1079         (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
1080         (shortest-duration-space . 1.6)
1081         (spacing-increment . 0.8)
1082         (meta . ((class . Spanner)
1083                  (interfaces . (grace-spacing-interface
1084                                 spacing-options-interface
1085                                 spanner-interface))))))
1086
1087     (GridLine
1088      . (
1089         (layer . 0)
1090         (self-alignment-X . ,CENTER)
1091         (stencil . ,ly:grid-line-interface::print)
1092         (X-extent  . ,ly:grid-line-interface::width)
1093         (X-offset . ,(ly:make-simple-closure
1094                       `(,+
1095                         ,(ly:make-simple-closure
1096                           (list ly:self-alignment-interface::centered-on-x-parent))
1097                         ,(ly:make-simple-closure
1098                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1099         (meta . ((class . Item)
1100                  (interfaces . (grid-line-interface
1101                                 self-alignment-interface))))))
1102
1103     (GridPoint
1104      . (
1105         (X-extent . (0 . 0))
1106         (Y-extent . (0 . 0))
1107         (meta . ((class . Item)
1108                  (interfaces . (grid-point-interface))))))
1109
1110
1111     (Hairpin
1112      . (
1113         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
1114         (bound-padding . 1.0)
1115         (broken-bound-padding . ,ly:hairpin::broken-bound-padding)
1116         (circled-tip . #f)
1117         (grow-direction . ,hairpin::calc-grow-direction)
1118         (height . 0.6666)
1119         (minimum-length . 2.0)
1120         (self-alignment-Y . ,CENTER)
1121         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1122         (stencil . ,ly:hairpin::print)
1123         (thickness . 1.0)
1124         (to-barline . #t)
1125         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1126         (Y-extent . ,(grob::unpure-Y-extent-from-stencil ly:hairpin::pure-height))
1127         (Y-offset . ,self-alignment-interface::y-aligned-on-self)
1128         (meta . ((class . Spanner)
1129                  (interfaces . (dynamic-interface
1130                                 hairpin-interface
1131                                 line-interface
1132                                 self-alignment-interface
1133                                 spanner-interface))))))
1134
1135     (HorizontalBracket
1136      . (
1137         (bracket-flare . (0.5 . 0.5))
1138         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1139         (direction . ,DOWN)
1140         (padding . 0.2)
1141         (side-axis . ,Y)
1142         (staff-padding . 0.2)
1143         (stencil . ,ly:horizontal-bracket::print)
1144         (thickness . 1.0)
1145         (Y-offset . ,side-position-interface::y-aligned-side)
1146         (meta . ((class . Spanner)
1147                  (interfaces . (horizontal-bracket-interface
1148                                 line-interface
1149                                 side-position-interface
1150                                 spanner-interface))))))
1151
1152
1153     (InstrumentName
1154      . (
1155         (direction . ,LEFT)
1156         (padding . 0.3)
1157         (self-alignment-X . ,CENTER)
1158         (self-alignment-Y . ,CENTER)
1159         (stencil . ,system-start-text::print)
1160         (X-offset . ,system-start-text::calc-x-offset)
1161         (Y-offset . ,system-start-text::calc-y-offset)
1162         (meta . ((class . Spanner)
1163                  (interfaces . (font-interface
1164                                 self-alignment-interface
1165                                 side-position-interface
1166                                 system-start-text-interface))))))
1167
1168     (InstrumentSwitch
1169      . (
1170         (direction . ,UP)
1171         (extra-spacing-width . (+inf.0 . -inf.0))
1172         (outside-staff-priority . 500)
1173         (padding . 0.5)
1174         (self-alignment-X . ,LEFT)
1175         (side-axis . ,Y)
1176         (staff-padding . 0.5)
1177         (stencil . ,ly:text-interface::print)
1178         (Y-extent . ,grob::always-Y-extent-from-stencil)
1179         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1180         (Y-offset . ,side-position-interface::y-aligned-side)
1181         (meta . ((class . Item)
1182                  (interfaces . (font-interface
1183                                 self-alignment-interface
1184                                 side-position-interface
1185                                 text-interface))))))
1186
1187
1188     (KeyCancellation
1189      . (
1190         (break-align-symbol . key-cancellation)
1191         (break-visibility . ,begin-of-line-invisible)
1192         (glyph-name-alist . ,cancellation-glyph-name-alist)
1193         (non-musical . #t)
1194         (flat-positions . (2 3 4 2 1 2 1))
1195         (sharp-positions . (4 5 4 2 3 2 3))
1196         (space-alist . (
1197                         (time-signature . (extra-space . 1.25))
1198                         (staff-bar . (extra-space . 0.6))
1199                         (key-signature . (extra-space . 0.5))
1200                         (cue-clef . (extra-space . 0.5))
1201                         (right-edge . (extra-space . 0.5))
1202                         (first-note . (fixed-space . 2.5))))
1203         (stencil . ,ly:key-signature-interface::print)
1204         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1205         (Y-extent . ,grob::always-Y-extent-from-stencil)
1206         (extra-spacing-width . (0.0 . 1.0))
1207         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-including-staff)
1208         (Y-offset . ,staff-symbol-referencer::callback)
1209         (meta . ((class . Item)
1210                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1211                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
1212                  (interfaces . (break-aligned-interface
1213                                 font-interface
1214                                 key-cancellation-interface
1215                                 key-signature-interface
1216                                 pure-from-neighbor-interface
1217                                 staff-symbol-referencer-interface))))))
1218
1219     (KeySignature
1220      . (
1221         (avoid-slur . inside)
1222         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1223         (break-align-anchor-alignment . ,RIGHT)
1224         (break-align-symbol . key-signature)
1225         (break-visibility . ,begin-of-line-visible)
1226         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
1227         (non-musical . #t)
1228         (flat-positions . (2 3 4 2 1 2 1))
1229         (sharp-positions . (4 5 4 2 3 2 3))
1230         (space-alist . (
1231                         (time-signature . (extra-space . 1.15))
1232                         (staff-bar . (extra-space . 1.1))
1233                         (cue-clef . (extra-space . 0.5))
1234                         (right-edge . (extra-space . 0.5))
1235                         (first-note . (fixed-space . 2.5))))
1236         (stencil . ,ly:key-signature-interface::print)
1237         (Y-extent . ,grob::always-Y-extent-from-stencil)
1238         (extra-spacing-width . (0.0 . 1.0))
1239         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-including-staff)
1240         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1241         (Y-offset . ,staff-symbol-referencer::callback)
1242         (meta . ((class . Item)
1243                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1244                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
1245                  (interfaces . (break-aligned-interface
1246                                 font-interface
1247                                 key-signature-interface
1248                                 pure-from-neighbor-interface
1249                                 staff-symbol-referencer-interface))))))
1250
1251     (KievanLigature
1252      . (
1253         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1254         (stencil . ,ly:kievan-ligature::print)
1255         (padding . 0.5)
1256         (meta . ((class . Spanner)
1257                  (interfaces . (font-interface
1258                                 kievan-ligature-interface))))))
1259
1260     (LaissezVibrerTie
1261      . (
1262         (control-points . ,ly:semi-tie::calc-control-points)
1263         (cross-staff . ,semi-tie::calc-cross-staff)
1264         (details . ((ratio . 0.333)
1265                     (height-limit . 1.0)))
1266         (direction . ,ly:tie::calc-direction)
1267         (head-direction . ,LEFT)
1268         (stencil  . ,laissez-vibrer::print)
1269         (thickness . 1.0)
1270         (extra-spacing-height . (-0.5 . 0.5))
1271         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1272         (Y-extent . ,grob::always-Y-extent-from-stencil)
1273         (meta . ((class . Item)
1274                  (interfaces . (semi-tie-interface))))))
1275
1276     (LaissezVibrerTieColumn
1277      . (
1278         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1279         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1280         (X-extent . #f)
1281         (Y-extent . #f)
1282         (meta . ((class . Item)
1283                  (interfaces . (semi-tie-column-interface))))))
1284
1285     (LedgerLineSpanner
1286      . (
1287         (layer . 0)
1288         (length-fraction . 0.25)
1289         (minimum-length-fraction . 0.25)
1290         (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
1291         (stencil . ,ly:ledger-line-spanner::print)
1292         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1293         (X-extent . #f)
1294         (Y-extent . #f)
1295         (meta . ((class . Spanner)
1296                  (interfaces . (ledger-line-spanner-interface))))))
1297
1298     (LeftEdge
1299      . (
1300         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1301         (break-align-symbol . left-edge)
1302         (break-visibility . ,center-invisible)
1303         (non-musical . #t)
1304         (extra-spacing-height . (+inf.0 . -inf.0))
1305         (space-alist . (
1306                         (ambitus . (extra-space . 2.0))
1307                         (breathing-sign . (minimum-space . 0.0))
1308                         (cue-end-clef . (extra-space . 0.8))
1309                         (clef . (extra-space . 0.8))
1310                         (cue-clef . (extra-space . 0.8))
1311                         (staff-bar . (extra-space . 0.0))
1312                         (key-cancellation . (extra-space . 0.0))
1313                         (key-signature . (extra-space . 0.8))
1314                         (time-signature . (extra-space . 1.0))
1315                         (custos . (extra-space . 0.0))
1316                         (first-note . (fixed-space . 2.0))
1317                         (right-edge . (extra-space . 0.0))
1318                         ))
1319         (X-extent . (0 . 0))
1320         (meta . ((class . Item)
1321                  (interfaces . (break-aligned-interface))))))
1322
1323     (LigatureBracket
1324      . (
1325         ;; ugh.  A ligature bracket is totally different from
1326         ;; a tuplet bracket.
1327
1328         (bracket-visibility . #t)
1329         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1330         (direction . ,UP)
1331         (edge-height . (0.7 . 0.7))
1332         (padding . 2.0)
1333         (positions . ,ly:tuplet-bracket::calc-positions)
1334         (shorten-pair . (-0.2 . -0.2))
1335         (staff-padding . 0.25)
1336         (stencil . ,ly:tuplet-bracket::print)
1337         (thickness . 1.6)
1338         (X-positions . ,ly:tuplet-bracket::calc-x-positions)
1339         (meta . ((class . Spanner)
1340                  (interfaces . (line-interface
1341                                 tuplet-bracket-interface))))))
1342
1343     (LyricExtender
1344      . (
1345         (minimum-length . 1.5)
1346         (stencil . ,ly:lyric-extender::print)
1347         (thickness . 0.8) ; line-thickness
1348         (Y-extent . (0 . 0))
1349         (meta . ((class . Spanner)
1350                  (interfaces . (lyric-extender-interface
1351                                 lyric-interface))))))
1352
1353     (LyricHyphen
1354      . (
1355         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
1356         (dash-period . 10.0)
1357         (height . 0.42)
1358         (length . 0.66)
1359         (minimum-distance . 0.1)
1360         (minimum-length . 0.3)
1361         (padding . 0.07)
1362         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1363         (stencil . ,ly:lyric-hyphen::print)
1364         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1365         (thickness . 1.3)
1366         (Y-extent . (0 . 0))
1367         (meta . ((class . Spanner)
1368                  (interfaces . (font-interface
1369                                 lyric-hyphen-interface
1370                                 lyric-interface
1371                                 spanner-interface))))))
1372
1373     (LyricSpace
1374      . (
1375         (minimum-distance . 0.45)
1376         (padding . 0.0)
1377         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1378         (X-extent . #f)
1379         (Y-extent . #f)
1380         (meta . ((class . Spanner)
1381                  (interfaces . (lyric-hyphen-interface
1382                                 spanner-interface))))))
1383
1384     (LyricText
1385      . (
1386         (extra-spacing-width . (0.0 . 0.0))
1387         ;; Recede in height for purposes of note spacing,
1388         ;; so notes in melismata can be freely spaced above lyrics
1389         (extra-spacing-height . (0.2 . -0.2))
1390         (font-series . medium)
1391         (font-size . 1.0)
1392         (self-alignment-X . ,CENTER)
1393         (stencil . ,lyric-text::print)
1394         (text . ,(grob::calc-property-by-copy 'text))
1395         (word-space . 0.6)
1396         (skyline-horizontal-padding . 0.1)
1397         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1398         (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1399         (Y-extent . ,grob::always-Y-extent-from-stencil)
1400         (meta . ((class . Item)
1401                  (interfaces . (font-interface
1402                                 lyric-syllable-interface
1403                                 rhythmic-grob-interface
1404                                 self-alignment-interface
1405                                 text-interface))))))
1406
1407     (MeasureCounter
1408      . (
1409         (count-from . 1)
1410         (direction . ,UP)
1411         (font-encoding . fetaText)
1412         (font-size . -2)
1413         (outside-staff-horizontal-padding . 0.5)
1414         (outside-staff-priority . 750)
1415         (self-alignment-X . ,CENTER)
1416         (side-axis . ,Y)
1417         (staff-padding . 0.5)
1418         (stencil . ,measure-counter-stencil)
1419         (meta . ((class . Spanner)
1420                  (interfaces . (font-interface
1421                                 measure-counter-interface
1422                                 self-alignment-interface
1423                                 side-position-interface
1424                                 text-interface))))))
1425
1426     (MeasureGrouping
1427      . (
1428         (direction . ,UP)
1429         (height . 2.0)
1430         (padding . 2)
1431         (side-axis . ,Y)
1432         (staff-padding . 3)
1433         (stencil . ,ly:measure-grouping::print)
1434         (thickness . 1)
1435         (Y-offset . ,side-position-interface::y-aligned-side)
1436         (meta . ((class . Spanner)
1437                  (interfaces . (measure-grouping-interface
1438                                 side-position-interface))))))
1439
1440     (MelodyItem
1441      . (
1442         (neutral-direction . ,DOWN)
1443         (meta . ((class . Item)
1444                  (interfaces . (melody-spanner-interface))))))
1445
1446     (MensuralLigature
1447      . (
1448         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1449         (stencil . ,ly:mensural-ligature::print)
1450         (thickness . 1.3)
1451         (meta . ((class . Spanner)
1452                  (interfaces . (font-interface
1453                                 mensural-ligature-interface))))))
1454
1455     (MetronomeMark
1456      . (
1457         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1458         (break-visibility . ,end-of-line-invisible)
1459         (direction . ,UP)
1460         (extra-spacing-width . (+inf.0 . -inf.0))
1461         (outside-staff-horizontal-padding . 0.2)
1462         (outside-staff-priority . 1000)
1463         (padding . 0.8)
1464         (side-axis . ,Y)
1465         (stencil . ,ly:text-interface::print)
1466         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
1467         (Y-offset . ,side-position-interface::y-aligned-side)
1468         (X-offset . ,(ly:make-simple-closure
1469                       `(,+
1470                         ,(ly:make-simple-closure
1471                           (list ly:break-alignable-interface::self-align-callback))
1472                         ,(ly:make-simple-closure
1473                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1474         (self-alignment-X . ,LEFT)
1475         (break-align-symbols . (time-signature))
1476         (non-break-align-symbols . (paper-column-interface))
1477         (Y-extent . ,grob::always-Y-extent-from-stencil)
1478         (meta . ((class . Item)
1479                  (interfaces . (break-alignable-interface
1480                                 font-interface
1481                                 metronome-mark-interface
1482                                 self-alignment-interface
1483                                 side-position-interface
1484                                 text-interface))))))
1485
1486     (MultiMeasureRest
1487      . (
1488         (expand-limit . 10)
1489         (hair-thickness . 2.0)
1490         (round-up-exceptions . ())
1491         (padding . 1)
1492         (spacing-pair . (break-alignment . break-alignment))
1493         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1494         (stencil . ,ly:multi-measure-rest::print)
1495         (thick-thickness . 6.6)
1496         ;; See Wanske pp. 125
1497         (usable-duration-logs . ,(iota 4 -3))
1498         (Y-extent . ,(ly:make-unpure-pure-container ly:multi-measure-rest::height))
1499         (Y-offset . ,staff-symbol-referencer::callback)
1500         (meta . ((class . Spanner)
1501                  (interfaces . (font-interface
1502                                 multi-measure-interface
1503                                 multi-measure-rest-interface
1504                                 rest-interface
1505                                 staff-symbol-referencer-interface))))))
1506
1507     (MultiMeasureRestNumber
1508      . (
1509         (bound-padding  . 2.0)
1510         (direction . ,UP)
1511         (font-encoding . fetaText)
1512         (padding . 0.4)
1513         (self-alignment-X . ,CENTER)
1514         (side-axis . ,Y)
1515         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1516         (staff-padding . 0.4)
1517         (stencil . ,ly:text-interface::print)
1518         (X-offset . ,(ly:make-simple-closure
1519                       `(,+
1520                         ,(ly:make-simple-closure
1521                           (list ly:self-alignment-interface::x-aligned-on-self))
1522                         ,(ly:make-simple-closure
1523                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1524         (Y-offset . ,side-position-interface::y-aligned-side)
1525         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1526         (Y-extent . ,grob::always-Y-extent-from-stencil)
1527         (meta . ((class . Spanner)
1528                  (interfaces . (font-interface
1529                                 multi-measure-interface
1530                                 self-alignment-interface
1531                                 side-position-interface
1532                                 text-interface))))))
1533
1534     (MultiMeasureRestText
1535      . (
1536         (direction . ,UP)
1537         (outside-staff-priority . 450)
1538         (padding . 0.2)
1539         (self-alignment-X . ,CENTER)
1540         (skyline-horizontal-padding . 0.2)
1541         (staff-padding . 0.25)
1542         (stencil . ,ly:text-interface::print)
1543         (X-offset . ,(ly:make-simple-closure
1544                       `(,+
1545                         ,(ly:make-simple-closure
1546                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1547                         ,(ly:make-simple-closure
1548                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1549         (Y-offset . ,side-position-interface::y-aligned-side)
1550         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1551         (Y-extent . ,grob::always-Y-extent-from-stencil)
1552         (meta . ((class . Spanner)
1553                  (interfaces . (font-interface
1554                                 multi-measure-interface
1555                                 self-alignment-interface
1556                                 side-position-interface
1557                                 text-interface))))))
1558
1559
1560     (NonMusicalPaperColumn
1561      . (
1562         (allow-loose-spacing . #t)
1563         (axes . (,X))
1564         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1565         (bound-alignment-interfaces . (break-alignment-interface))
1566         (full-measure-extra-space . 1.0)
1567         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1568         ;;                    (stencil . ,ly:paper-column::print)
1569
1570         (keep-inside-line . #t)
1571         (line-break-permission . allow)
1572         (non-musical . #t)
1573         (page-break-permission . allow)
1574
1575         ;; debugging stuff: print column number.
1576         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1577
1578         (X-extent . ,ly:axis-group-interface::width)
1579         (meta . ((class . Paper_column)
1580                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1581                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1582                  (interfaces . (axis-group-interface
1583                                 font-interface
1584                                 paper-column-interface
1585                                 separation-item-interface
1586                                 spaceable-grob-interface))))))
1587
1588     (NoteCollision
1589      . (
1590         (axes . (,X ,Y))
1591         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1592         (prefer-dotted-right . #t)
1593         (X-extent . ,ly:axis-group-interface::width)
1594         (Y-extent . ,axis-group-interface::height)
1595         (meta . ((class . Item)
1596                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1597                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1598                  (interfaces . (axis-group-interface
1599                                 note-collision-interface))))))
1600
1601     (NoteColumn
1602      . (
1603         (axes . (,X ,Y))
1604         (bound-alignment-interfaces . (rhythmic-head-interface stem-interface))
1605         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1606         (skyline-vertical-padding . 0.15)
1607         (X-extent . ,ly:axis-group-interface::width)
1608         (Y-extent . ,axis-group-interface::height)
1609         (meta . ((class . Item)
1610                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1611                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1612                  (interfaces . (axis-group-interface
1613                                 note-column-interface
1614                                 separation-item-interface))))))
1615
1616     (NoteHead
1617      . (
1618         (flexa-width . 2.0)
1619         (duration-log . ,note-head::calc-duration-log)
1620         (extra-spacing-height . ,ly:note-head::include-ledger-line-height)
1621         (glyph-name . ,note-head::calc-glyph-name)
1622         (ligature-flexa . #f)
1623         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1624         (stencil . ,ly:note-head::print)
1625         (X-offset . ,ly:note-head::stem-x-shift)
1626         (Y-offset . ,staff-symbol-referencer::callback)
1627         (Y-extent . ,grob::always-Y-extent-from-stencil)
1628         (meta . ((class . Item)
1629                  (interfaces . (font-interface
1630                                 gregorian-ligature-interface
1631                                 ledgered-interface
1632                                 ligature-head-interface
1633                                 mensural-ligature-interface
1634                                 note-head-interface
1635                                 rhythmic-grob-interface
1636                                 rhythmic-head-interface
1637                                 staff-symbol-referencer-interface
1638                                 vaticana-ligature-interface))))))
1639
1640     (NoteName
1641      . (
1642         (stencil . ,ly:text-interface::print)
1643         (Y-extent . ,grob::always-Y-extent-from-stencil)
1644         (meta . ((class . Item)
1645                  (interfaces . (font-interface
1646                                 note-name-interface
1647                                 text-interface))))))
1648
1649     (NoteSpacing
1650      . (
1651         ;; Changed this from 0.75.
1652         ;; If you ever change this back, please document! --hwn
1653         (knee-spacing-correction . 1.0)
1654         (same-direction-correction . 0.25)
1655         (space-to-barline . #t)
1656         (stem-spacing-correction . 0.5)
1657         (meta . ((class . Item)
1658                  (interfaces . (note-spacing-interface
1659                                 spacing-interface))))))
1660
1661     (OttavaBracket
1662      . (
1663         (dash-fraction . 0.3)
1664         (direction . ,UP)
1665         (edge-height . (0 . 1.2))
1666         (font-shape . italic)
1667         (minimum-length . 1.0)
1668         (outside-staff-priority . 400)
1669         (padding . 0.5)
1670         (shorten-pair . (0.0 . -0.6))
1671         (staff-padding . 2.0)
1672         (stencil . ,ly:ottava-bracket::print)
1673         (style . dashed-line)
1674         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
1675         (Y-offset . ,side-position-interface::y-aligned-side)
1676         (meta . ((class . Spanner)
1677                  (interfaces . (font-interface
1678                                 horizontal-bracket-interface
1679                                 line-interface
1680                                 ottava-bracket-interface
1681                                 side-position-interface
1682                                 text-interface))))))
1683
1684
1685     (PaperColumn
1686      . (
1687         (allow-loose-spacing . #t)
1688         (axes . (,X))
1689         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1690         (bound-alignment-interfaces . (note-column-interface))
1691         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1692         (keep-inside-line . #t)
1693         ;; 0.08 comes from spacing-horizontal-skyline.ly
1694         ;; allows double flat of F to be nestled over dots of C
1695         (skyline-vertical-padding . 0.08)
1696         ;; (stencil . ,ly:paper-column::print)
1697         (X-extent . ,ly:axis-group-interface::width)
1698
1699         ;; debugging
1700         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1701         (meta . ((class . Paper_column)
1702                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1703                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1704                  (interfaces . (axis-group-interface
1705                                 font-interface
1706                                 paper-column-interface
1707                                 separation-item-interface
1708                                 spaceable-grob-interface))))))
1709
1710     (ParenthesesItem
1711      . (
1712         (font-size . -6)
1713         (padding . 0.2)
1714         (stencil . ,parentheses-item::print)
1715         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1716         ;; X-extent needs to be non-empty in order to allow proper
1717         ;; horizontal attachment.  ParenthesesItem does not reserve
1718         ;; space of its own, however.
1719         (X-extent . (0 . 0))
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.2)
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         (direction . ,DOWN)
1969         (minimum-space . 1.0)
1970         (outside-staff-priority . 1000)
1971         (padding . 1.2)
1972         (side-axis . ,Y)
1973         (staff-padding . 1.0)
1974         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
1975         (X-extent . ,ly:axis-group-interface::width)
1976         (Y-extent . ,axis-group-interface::height)
1977         (Y-offset . ,side-position-interface::y-aligned-side)
1978         (meta . ((class . Spanner)
1979                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1980                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1981                  (interfaces . (axis-group-interface
1982                                 piano-pedal-interface
1983                                 side-position-interface))))))
1984
1985     (SpacingSpanner
1986      . (
1987         (average-spacing-wishes . #t)
1988         (base-shortest-duration . ,(ly:make-moment 3 16))
1989         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1990         (shortest-duration-space . 2.0)
1991         (spacing-increment . 1.2)
1992         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1993         (meta . ((class . Spanner)
1994                  (interfaces . (spacing-options-interface
1995                                 spacing-spanner-interface))))))
1996
1997     (SpanBar
1998      . (
1999         (allow-span-bar . #t)
2000         (bar-extent . ,axis-group-interface::height)
2001         (before-line-breaking . ,ly:span-bar::before-line-breaking)
2002         (break-align-symbol . staff-bar)
2003         (cross-staff . #t)
2004         (glyph-name . ,ly:span-bar::calc-glyph-name)
2005         (layer . 0)
2006         (non-musical . #t)
2007         (stencil . ,ly:span-bar::print)
2008         (X-extent . ,ly:span-bar::width)
2009         (Y-extent . (+inf.0 . -inf.0))
2010         (meta . ((class . Item)
2011                  (interfaces . (bar-line-interface
2012                                 font-interface
2013                                 span-bar-interface))))))
2014
2015     (SpanBarStub
2016      . (
2017         (X-extent . ,(grob::inherit-parent-property
2018                       X 'X-extent))
2019         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height)
2020         ;; we want this to be ignored, so empty, but the extra spacing height
2021         ;; should preserve the span bar's presence for horizontal spacing
2022         (Y-extent . ,pure-from-neighbor-interface::height-if-pure)
2023         (meta . ((class . Item)
2024                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2025                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
2026                  (interfaces . (pure-from-neighbor-interface))))))
2027
2028     (StaffGrouper
2029      . (
2030         (staff-staff-spacing . ((basic-distance . 9)
2031                                 (minimum-distance . 7)
2032                                 (padding . 1)
2033                                 (stretchability . 5)))
2034         (staffgroup-staff-spacing . ((basic-distance . 10.5)
2035                                      (minimum-distance . 8)
2036                                      (padding . 1)
2037                                      (stretchability . 9)))
2038         (meta . ((class . Spanner)
2039                  (interfaces . (staff-grouper-interface))))))
2040
2041     (StaffSpacing
2042      . (
2043         (non-musical . #t)
2044         (stem-spacing-correction . 0.4)
2045         (meta . ((class . Item)
2046                  (interfaces . (spacing-interface
2047                                 staff-spacing-interface))))))
2048
2049     (StaffSymbol
2050      . (
2051         (layer . 0)
2052         (ledger-line-thickness . (1.0 . 0.1))
2053         (line-count . 5)
2054         (stencil . ,ly:staff-symbol::print)
2055         (Y-extent . ,(ly:make-unpure-pure-container ly:staff-symbol::height))
2056         (meta . ((class . Spanner)
2057                  (interfaces . (staff-symbol-interface))))))
2058
2059     (StanzaNumber
2060      . (
2061         (direction . ,LEFT)
2062         (font-series . bold)
2063         (padding . 1.0)
2064         (side-axis . ,X)
2065         (stencil . ,ly:text-interface::print)
2066         (X-offset . ,ly:side-position-interface::x-aligned-side)
2067         (Y-extent . ,grob::always-Y-extent-from-stencil)
2068         (meta . ((class . Item)
2069                  (interfaces . (font-interface
2070                                 side-position-interface
2071                                 stanza-number-interface
2072                                 text-interface))))))
2073
2074     (Stem
2075      . (
2076         (beamlet-default-length . (1.1 . 1.1))
2077         (beamlet-max-length-proportion . (0.75 . 0.75))
2078         (cross-staff . ,ly:stem::calc-cross-staff)
2079         (default-direction . ,ly:stem::calc-default-direction)
2080         (details
2081          . (
2082             ;; 3.5 (or 3 measured from note head) is standard length
2083             ;; 32nd, 64th, 128th flagged stems should be longer
2084             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
2085
2086             ;; FIXME.  3.5 yields too long beams (according to Ross and
2087             ;; looking at Baerenreiter examples) for a number of common
2088             ;; boundary cases.  Subtracting half a beam thickness fixes
2089             ;; this, but the bug may well be somewhere else.
2090
2091             ;; FIXME this should come from 'lengths
2092             (beamed-lengths . (3.26 3.5 3.6))
2093
2094             ;; The 'normal' minima
2095             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
2096             ;;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
2097
2098             ;; The 'extreme case' minima
2099             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
2100
2101             ;; Stems in unnatural (forced) direction should be shortened by
2102             ;; one staff space, according to [Roush & Gourlay].
2103             ;; Flagged stems we shorten only half a staff space.
2104             (stem-shorten . (1.0 0.5))
2105
2106             ))
2107
2108         ;; We use the normal minima as minimum for the ideal lengths,
2109         ;; and the extreme minima as abolute minimum length.
2110
2111         (direction . ,ly:stem::calc-direction)
2112         (duration-log . ,stem::calc-duration-log)
2113         (length . ,(ly:make-unpure-pure-container ly:stem::calc-length ly:stem::pure-calc-length))
2114         (neutral-direction . ,DOWN)
2115         (positioning-done . ,ly:stem::calc-positioning-done)
2116         (stem-info . ,ly:stem::calc-stem-info)
2117         (stem-begin-position . ,(ly:make-unpure-pure-container ly:stem::calc-stem-begin-position ly:stem::pure-calc-stem-begin-position))
2118         (stencil . ,ly:stem::print)
2119         (thickness . 1.3)
2120         (X-extent . ,ly:stem::width)
2121         (X-offset . ,ly:stem::offset-callback)
2122         (Y-extent . ,(ly:make-unpure-pure-container ly:stem::height ly:stem::pure-height))
2123         (Y-offset . ,staff-symbol-referencer::callback)
2124         (meta . ((class . Item)
2125                  (interfaces . (stem-interface))))))
2126
2127     (StemStub
2128      . (
2129         (X-extent . ,stem-stub::width)
2130         (extra-spacing-height . ,stem-stub::extra-spacing-height)
2131         (Y-extent . ,(ly:make-unpure-pure-container #f stem-stub::pure-height))
2132         (meta . ((class . Item)
2133                  (interfaces . ())))))
2134
2135     (StemTremolo
2136      . (
2137         (beam-thickness . 0.48) ; staff-space
2138         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
2139         (direction . ,ly:stem-tremolo::calc-direction)
2140         (slope . ,ly:stem-tremolo::calc-slope)
2141         (stencil . ,ly:stem-tremolo::print)
2142         (style . ,ly:stem-tremolo::calc-style)
2143         (X-extent . ,ly:stem-tremolo::width)
2144         (Y-extent . ,(grob::unpure-Y-extent-from-stencil ly:stem-tremolo::pure-height))
2145         (X-offset . ,(ly:make-simple-closure
2146                       `(,+
2147                         ,(ly:make-simple-closure
2148                           (list ly:self-alignment-interface::centered-on-x-parent))
2149                         ,(ly:make-simple-closure
2150                           (list ly:self-alignment-interface::x-aligned-on-self)))))
2151         (Y-offset . ,(ly:make-unpure-pure-container ly:stem-tremolo::calc-y-offset ly:stem-tremolo::pure-calc-y-offset))
2152         (meta . ((class . Item)
2153                  (interfaces . (self-alignment-interface
2154                                 stem-tremolo-interface))))))
2155
2156     (StringNumber
2157      . (
2158         (avoid-slur . around)
2159         (cross-staff . ,script-or-side-position-cross-staff)
2160         (font-encoding . fetaText)
2161         (font-size . -5)                ; don't overlap when next to heads.
2162         (padding . 0.5)
2163         (script-priority . 100)
2164         (self-alignment-X . ,CENTER)
2165         (self-alignment-Y . ,CENTER)
2166         (staff-padding . 0.5)
2167         (stencil . ,print-circled-text-callback)
2168         (text . ,string-number::calc-text)
2169         (Y-extent . ,grob::always-Y-extent-from-stencil)
2170         (meta . ((class . Item)
2171                  (interfaces . (font-interface
2172                                 self-alignment-interface
2173                                 side-position-interface
2174                                 string-number-interface
2175                                 text-interface
2176                                 text-script-interface))))))
2177
2178     (StrokeFinger
2179      . (
2180         (digit-names . #("p" "i" "m" "a" "x"))
2181         (font-shape . italic)
2182         (font-size . -4)                ; don't overlap when next to heads.
2183         (padding . 0.5)
2184         (script-priority . 100)
2185         (self-alignment-X . ,CENTER)
2186         (self-alignment-Y . ,CENTER)
2187         (staff-padding . 0.5)
2188         (stencil . ,ly:text-interface::print)
2189         (text . ,stroke-finger::calc-text)
2190         (Y-extent . ,grob::always-Y-extent-from-stencil)
2191         (meta . ((class . Item)
2192                  (interfaces . (font-interface
2193                                 self-alignment-interface
2194                                 side-position-interface
2195                                 stroke-finger-interface
2196                                 text-interface
2197                                 text-script-interface))))))
2198
2199     (SustainPedal
2200      . (
2201         (extra-spacing-width . (+inf.0 . -inf.0))
2202         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
2203         (self-alignment-X . ,CENTER)
2204         (stencil . ,ly:sustain-pedal::print)
2205         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
2206         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2207         (Y-extent . ,grob::always-Y-extent-from-stencil)
2208         (meta . ((class . Item)
2209                  (interfaces . (font-interface
2210                                 piano-pedal-interface
2211                                 piano-pedal-script-interface
2212                                 self-alignment-interface
2213                                 text-interface))))))
2214
2215     (SustainPedalLineSpanner
2216      . (
2217         (axes . (,Y))
2218         (direction . ,DOWN)
2219         (minimum-space . 1.0)
2220         (outside-staff-priority . 1000)
2221         (padding . 1.2)
2222         (side-axis . ,Y)
2223         (staff-padding . 1.2)
2224         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
2225         (X-extent . ,ly:axis-group-interface::width)
2226         (Y-extent . ,axis-group-interface::height)
2227         (Y-offset . ,side-position-interface::y-aligned-side)
2228         (meta . ((class . Spanner)
2229                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2230                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2231                  (interfaces . (axis-group-interface
2232                                 piano-pedal-interface
2233                                 side-position-interface))))))
2234
2235     (System
2236      . (
2237         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2238         (axes . (,X ,Y))
2239         (outside-staff-placement-directive . left-to-right-polite)
2240         (skyline-horizontal-padding . 1.0)
2241         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2242         (X-extent . ,ly:axis-group-interface::width)
2243         (Y-extent . ,(ly:make-unpure-pure-container ly:system::height ly:system::calc-pure-height))
2244         (meta . ((class . System)
2245                  (object-callbacks . ((footnotes-before-line-breaking . ,ly:system::footnotes-before-line-breaking)
2246                                       (footnotes-after-line-breaking . ,ly:system::footnotes-after-line-breaking)
2247                                       (pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
2248                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2249                                       (vertical-skyline-elements . ,ly:system::vertical-skyline-elements)
2250                                       (vertical-alignment . ,ly:system::get-vertical-alignment)))
2251                  (interfaces . (axis-group-interface
2252                                 system-interface))))))
2253
2254     (SystemStartBar
2255      . (
2256         (collapse-height . 5.0)
2257         (direction . ,LEFT)
2258
2259         ;; ugh--hardcoded.
2260         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
2261         (stencil . ,ly:system-start-delimiter::print)
2262         (style . bar-line)
2263         (thickness . 1.6)
2264         (X-offset . ,ly:side-position-interface::x-aligned-side)
2265         (meta . ((class . Spanner)
2266                  (interfaces . (side-position-interface
2267                                 system-start-delimiter-interface))))))
2268
2269     (SystemStartBrace
2270      . (
2271         (collapse-height . 5.0)
2272         (direction . ,LEFT)
2273         (font-encoding . fetaBraces)
2274         (padding . 0.3)
2275         (stencil . ,ly:system-start-delimiter::print)
2276         (style . brace)
2277         (X-offset . ,ly:side-position-interface::x-aligned-side)
2278         (meta . ((class . Spanner)
2279                  (interfaces . (font-interface
2280                                 side-position-interface
2281                                 system-start-delimiter-interface))))))
2282
2283     (SystemStartBracket
2284      . (
2285         (collapse-height . 5.0)
2286         (direction . ,LEFT)
2287         (padding . 0.8)
2288         (stencil . ,ly:system-start-delimiter::print)
2289         (style . bracket)
2290         (thickness . 0.45)
2291         (X-offset . ,ly:side-position-interface::x-aligned-side)
2292         (meta . ((class . Spanner)
2293                  (interfaces . (font-interface
2294                                 side-position-interface
2295                                 system-start-delimiter-interface))))))
2296
2297     (SystemStartSquare
2298      . (
2299         (direction . ,LEFT)
2300         (stencil . ,ly:system-start-delimiter::print)
2301         (style . line-bracket)
2302         (thickness . 1.0)
2303         (X-offset . ,ly:side-position-interface::x-aligned-side)
2304         (meta . ((class . Spanner)
2305                  (interfaces . (font-interface
2306                                 side-position-interface
2307                                 system-start-delimiter-interface))))))
2308
2309
2310     (TabNoteHead
2311      . (
2312         (details . ((cautionary-properties . ((angularity . 0.4)
2313                                               (half-thickness . 0.075)
2314                                               (padding . 0)
2315                                               (procedure . ,parenthesize-stencil)
2316                                               (width . 0.25)))
2317                     (head-offset . 3/5)
2318                     (harmonic-properties . ((angularity . 2)
2319                                             (half-thickness . 0.075)
2320                                             (padding . 0)
2321                                             (procedure . ,parenthesize-stencil)
2322                                             (width . 0.25)))
2323                     (repeat-tied-properties . ((note-head-visible . #t)
2324                                                (parenthesize . #t)))
2325                     (tied-properties . ((break-visibility . ,begin-of-line-visible)
2326                                         (parenthesize . #t)))))
2327
2328         (direction . ,CENTER)
2329         (duration-log . ,note-head::calc-duration-log)
2330         (font-series . bold)
2331         (font-size . -2)
2332         (stem-attachment . (0.0 . 1.35))
2333         (stencil . ,tab-note-head::print)
2334         (whiteout . #t)
2335         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2336         (Y-offset . ,staff-symbol-referencer::callback)
2337         (Y-extent . ,grob::always-Y-extent-from-stencil)
2338         (meta . ((class . Item)
2339                  (interfaces  . (font-interface
2340                                  note-head-interface
2341                                  rhythmic-grob-interface
2342                                  rhythmic-head-interface
2343                                  staff-symbol-referencer-interface
2344                                  tab-note-head-interface
2345                                  text-interface))))))
2346
2347     (TextScript
2348      . (
2349         (avoid-slur . around)
2350         (cross-staff . ,script-or-side-position-cross-staff)
2351         (direction . ,DOWN)
2352         (extra-spacing-width . (+inf.0 . -inf.0))
2353         (outside-staff-horizontal-padding . 0.2)
2354         (outside-staff-priority . 450)
2355
2356         ;; sync with Fingering ?
2357         (padding . 0.3)
2358
2359         (script-priority . 200)
2360         (side-axis . ,Y)
2361         (slur-padding . 0.5)
2362         (staff-padding . 0.5)
2363         (stencil . ,ly:text-interface::print)
2364         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
2365         ;; todo: add X self alignment?
2366         (Y-extent . ,grob::always-Y-extent-from-stencil)
2367         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2368         (Y-offset . ,side-position-interface::y-aligned-side)
2369         (meta . ((class . Item)
2370                  (interfaces . (font-interface
2371                                 instrument-specific-markup-interface
2372                                 self-alignment-interface
2373                                 side-position-interface
2374                                 text-interface
2375                                 text-script-interface))))))
2376
2377     (TextSpanner
2378      . (
2379         (bound-details . ((left . ((Y . 0)
2380                                    (padding . 0.25)
2381                                    (attach-dir . ,LEFT)
2382                                    ))
2383                           (left-broken . ((attach-dir . ,RIGHT)))
2384                           (right . ((Y . 0)
2385                                     (padding . 0.25)
2386                                     ))
2387                           ))
2388         (dash-fraction . 0.2)
2389         (dash-period . 3.0)
2390         (direction . ,UP)
2391         (font-shape . italic)
2392         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2393         (outside-staff-priority . 350)
2394         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2395         (side-axis . ,Y)
2396         (staff-padding . 0.8)
2397         (stencil . ,ly:line-spanner::print)
2398         (style . dashed-line)
2399         (Y-offset . ,side-position-interface::y-aligned-side)
2400
2401         (meta . ((class . Spanner)
2402                  (interfaces . (font-interface
2403                                 line-interface
2404                                 line-spanner-interface
2405                                 side-position-interface))))))
2406
2407     (Tie
2408      . (
2409         (avoid-slur . inside)
2410         (control-points . ,ly:tie::calc-control-points)
2411         (details . (
2412                     ;; for a full list, see tie-details.cc
2413                     (ratio . 0.333)
2414                     (center-staff-line-clearance . 0.6)
2415                     (tip-staff-line-clearance . 0.45)
2416                     (note-head-gap . 0.2)
2417                     (stem-gap . 0.35)
2418                     (height-limit . 1.0)
2419                     (horizontal-distance-penalty-factor . 10)
2420                     (same-dir-as-stem-penalty . 8)
2421                     (min-length-penalty-factor . 26)
2422                     (tie-tie-collision-distance . 0.45)
2423                     (tie-tie-collision-penalty . 25.0)
2424                     (intra-space-threshold . 1.25)
2425                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2426                     (outer-tie-length-symmetry-penalty-factor . 10)
2427                     (vertical-distance-penalty-factor . 7)
2428                     (outer-tie-vertical-gap . 0.25)
2429                     (multi-tie-region-size . 3)
2430                     (single-tie-region-size . 4)
2431                     (between-length-limit . 1.0)))
2432
2433         (direction . ,ly:tie::calc-direction)
2434         (font-size . -6)
2435         (line-thickness . 0.8)
2436         (neutral-direction . ,UP)
2437         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2438         (stencil . ,ly:tie::print)
2439         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
2440         (thickness . 1.2)
2441         (meta . ((class . Spanner)
2442                  (interfaces . (tie-interface))))))
2443
2444     (TieColumn
2445      . (
2446         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2447         (positioning-done . ,ly:tie-column::calc-positioning-done)
2448         (X-extent . #f)
2449         (Y-extent . #f)
2450         (meta . ((class . Spanner)
2451                  (interfaces . (tie-column-interface))))))
2452
2453     (TimeSignature
2454      . (
2455         (avoid-slur . inside)
2456         (break-align-anchor
2457          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2458         (break-align-symbol . time-signature)
2459         (break-align-anchor-alignment . ,LEFT)
2460         (break-visibility . ,all-visible)
2461         (extra-spacing-height . ,pure-from-neighbor-interface::extra-spacing-height-including-staff)
2462         (extra-spacing-width . (0.0 . 0.8))
2463         (non-musical . #t)
2464         (space-alist . (
2465                         (cue-clef . (extra-space . 1.5))
2466                         (first-note . (fixed-space . 2.0))
2467                         (right-edge . (extra-space . 0.5))
2468                         (staff-bar . (extra-space . 1.0))))
2469         (stencil . ,ly:time-signature::print)
2470         (Y-extent . ,grob::always-Y-extent-from-stencil)
2471         (style . C)
2472         (meta . ((class . Item)
2473                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2474                                       (pure-relevant-grobs . ,ly:pure-from-neighbor-interface::calc-pure-relevant-grobs)))
2475                  (interfaces . (break-aligned-interface
2476                                 font-interface
2477                                 pure-from-neighbor-interface
2478                                 time-signature-interface))))))
2479
2480     (TrillPitchAccidental
2481      . (
2482         (direction . ,LEFT)
2483         (font-size . -4)
2484         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2485         (padding . 0.2)
2486         (side-axis . ,X)
2487         (stencil . ,ly:accidental-interface::print)
2488         (X-offset . ,ly:side-position-interface::x-aligned-side)
2489         (Y-extent . ,accidental-interface::height)
2490         (meta . ((class . Item)
2491                  (interfaces . (accidental-interface
2492                                 font-interface
2493                                 inline-accidental-interface
2494                                 side-position-interface
2495                                 trill-pitch-accidental-interface))))))
2496
2497     (TrillPitchGroup
2498      . (
2499         (axes . (,X))
2500         (direction . ,RIGHT)
2501         (font-size . -4)
2502         (padding . 0.3)
2503         (side-axis . ,X)
2504         (stencil . ,parenthesize-elements)
2505         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2506         ;; offset a bit to the right, further if needed to clear the main note
2507         (X-offset . ,(lambda (grob)
2508                        (ly:side-position-interface::x-aligned-side grob 2.5)))
2509         (Y-extent . ,grob::always-Y-extent-from-stencil)
2510         (meta . ((class . Item)
2511                  (interfaces . (axis-group-interface
2512                                 font-interface
2513                                 note-head-interface
2514                                 parentheses-interface
2515                                 side-position-interface))))))
2516
2517     (TrillPitchHead
2518      . (
2519         (duration-log . 2)
2520         (font-size . -4)
2521         (stencil . ,ly:note-head::print)
2522         (Y-offset . ,staff-symbol-referencer::callback)
2523         (Y-extent . ,grob::always-Y-extent-from-stencil)
2524         (meta . ((class . Item)
2525                  (interfaces . (font-interface
2526                                 ledgered-interface
2527                                 pitched-trill-interface
2528                                 rhythmic-head-interface
2529                                 staff-symbol-referencer-interface))))))
2530
2531     (TrillSpanner
2532      . (
2533         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2534         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2535                                    (Y . 0)
2536                                    (stencil-offset . (-0.5 . -1))
2537                                    (padding . 0.5)
2538                                    (attach-dir . ,CENTER)
2539                                    ))
2540                           (left-broken . ((end-on-note . #t)))
2541                           (right . ((Y . 0)))
2542                           ))
2543         (direction . ,UP)
2544         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2545         (outside-staff-priority . 50)
2546         (padding . 0.5)
2547         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2548         (side-axis . ,Y)
2549         (staff-padding . 1.0)
2550         (stencil . ,ly:line-spanner::print)
2551         (style . trill)
2552         (Y-offset . ,side-position-interface::y-aligned-side)
2553         (meta . ((class . Spanner)
2554                  (interfaces . (font-interface
2555                                 line-interface
2556                                 line-spanner-interface
2557                                 side-position-interface
2558                                 trill-spanner-interface))))))
2559
2560     (TupletBracket
2561      . (
2562         (avoid-scripts . #t)
2563         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2564         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2565         (direction  . ,ly:tuplet-bracket::calc-direction)
2566         (edge-height . (0.7 . 0.7))
2567         (full-length-to-extent . #t)
2568         (padding . 1.1)
2569         (positions . ,ly:tuplet-bracket::calc-positions)
2570         (shorten-pair . (-0.2 . -0.2))
2571         (staff-padding . 0.25)
2572         (stencil . ,ly:tuplet-bracket::print)
2573         (thickness . 1.6)
2574         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
2575         (X-positions . ,ly:tuplet-bracket::calc-x-positions)
2576
2577         (meta . ((class . Spanner)
2578                  (interfaces . (line-interface
2579                                 tuplet-bracket-interface))))))
2580
2581     (TupletNumber
2582      . (
2583         (avoid-slur . inside)
2584         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2585         (direction . ,tuplet-number::calc-direction)
2586         (font-shape . italic)
2587         (font-size . -2)
2588         (stencil . ,ly:tuplet-number::print)
2589         (text . ,tuplet-number::calc-denominator-text)
2590         (X-offset . ,ly:tuplet-number::calc-x-offset)
2591         (Y-offset . ,ly:tuplet-number::calc-y-offset)
2592         (meta . ((class . Spanner)
2593                  (interfaces . (font-interface
2594                                 text-interface
2595                                 tuplet-number-interface))))))
2596
2597
2598     (UnaCordaPedal
2599      . (
2600         (direction . ,RIGHT)
2601         (extra-spacing-width . (+inf.0 . -inf.0))
2602         (font-shape . italic)
2603         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2604         (self-alignment-X . ,CENTER)
2605         (stencil . ,ly:text-interface::print)
2606         (vertical-skylines . ,grob::always-vertical-skylines-from-stencil)
2607         (Y-extent . ,grob::always-Y-extent-from-stencil)
2608         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2609         (meta . ((class . Item)
2610                  (interfaces . (font-interface
2611                                 piano-pedal-script-interface
2612                                 self-alignment-interface
2613                                 text-interface))))))
2614
2615     (UnaCordaPedalLineSpanner
2616      . (
2617         (axes . (,Y))
2618         (direction . ,DOWN)
2619         (minimum-space . 1.0)
2620         (outside-staff-priority . 1000)
2621         (padding . 1.2)
2622         (side-axis . ,Y)
2623         (staff-padding . 1.2)
2624         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
2625         (X-extent . ,ly:axis-group-interface::width)
2626         (Y-extent . ,axis-group-interface::height)
2627         (Y-offset . ,side-position-interface::y-aligned-side)
2628         (meta . ((class . Spanner)
2629                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2630                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2631                  (interfaces . (axis-group-interface
2632                                 piano-pedal-interface
2633                                 side-position-interface))))))
2634
2635
2636     (VaticanaLigature
2637      . (
2638         (flexa-width . 2.0)
2639         (stencil . ,ly:vaticana-ligature::print)
2640         (thickness . 0.6)
2641         (meta . ((class . Spanner)
2642                  (interfaces . (font-interface
2643                                 vaticana-ligature-interface))))))
2644
2645     (VerticalAlignment
2646      . (
2647         (axes . (,Y))
2648         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2649         (stacking-dir . -1)
2650         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2651         (X-extent . ,ly:axis-group-interface::width)
2652         (Y-extent . ,axis-group-interface::height)
2653         (meta . ((class . Spanner)
2654                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2655                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2656                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2657                  (interfaces . (align-interface
2658                                 axis-group-interface))))))
2659
2660     (VerticalAxisGroup
2661      . (
2662         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2663         (axes . (,Y))
2664         (default-staff-staff-spacing . ((basic-distance . 9)
2665                                         (minimum-distance . 8)
2666                                         (padding . 1)))
2667         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2668         (outside-staff-placement-directive . left-to-right-polite)
2669         (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))
2670         (stencil . ,ly:axis-group-interface::print)
2671         (skyline-horizontal-padding . 0.1)
2672         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2673         (X-extent . ,ly:axis-group-interface::width)
2674         (Y-extent . ,(ly:make-unpure-pure-container ly:hara-kiri-group-spanner::y-extent ly:hara-kiri-group-spanner::pure-height))
2675         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2676         (meta . ((class . Spanner)
2677                  (object-callbacks . (
2678                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2679                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2680                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2681
2682                  (interfaces . (axis-group-interface
2683                                 hara-kiri-group-spanner-interface))))))
2684
2685     (VoiceFollower
2686      . (
2687         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2688         (bound-details . ((right . ((attach-dir .  ,CENTER)
2689                                     (padding . 1.5)
2690                                     ))
2691                           (left . ((attach-dir .  ,CENTER)
2692                                    (padding . 1.5)
2693                                    ))
2694                           ))
2695         (cross-staff . #t)
2696         (gap . 0.5)
2697         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2698         (non-musical . #t)
2699         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2700         (stencil . ,ly:line-spanner::print)
2701         (style . line)
2702         (X-extent . #f)
2703         (Y-extent . #f)
2704         (meta . ((class . Spanner)
2705                  (interfaces . (line-interface
2706                                 line-spanner-interface))))))
2707
2708     (VoltaBracket
2709      . (
2710         (direction . ,UP)
2711         (edge-height . (2.0 . 2.0)) ;; staff-space;
2712         (font-encoding . fetaText)
2713         (font-size . -4)
2714         (shorten-pair . ,ly:volta-bracket::calc-shorten-pair)
2715         (stencil . ,ly:volta-bracket-interface::print)
2716         (thickness . 1.6) ;; line-thickness
2717         (word-space . 0.6)
2718         (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil)
2719         (Y-extent . ,(grob::unpure-Y-extent-from-stencil volta-bracket-interface::pure-height))
2720         (meta . ((class . Spanner)
2721                  (interfaces . (font-interface
2722                                 horizontal-bracket-interface
2723                                 line-interface
2724                                 side-position-interface
2725                                 text-interface
2726                                 volta-bracket-interface
2727                                 volta-interface))))))
2728
2729     (VoltaBracketSpanner
2730      . (
2731         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2732         (axes . (,Y))
2733         (direction . ,UP)
2734         (no-alignment . #t)
2735         (outside-staff-priority . 600)
2736         (padding . 1)
2737         (side-axis . ,Y)
2738         (vertical-skylines . ,grob::always-vertical-skylines-from-element-stencils)
2739         (X-extent . ,ly:axis-group-interface::width)
2740         (Y-extent . ,axis-group-interface::height)
2741         (Y-offset . ,side-position-interface::y-aligned-side)
2742         (meta . ((class . Spanner)
2743                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2744                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2745                  (interfaces . (axis-group-interface
2746                                 side-position-interface
2747                                 volta-interface))))))
2748
2749     ))
2750
2751 (define (completize-grob-entry x)
2752   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2753 "
2754   ;;  (display (car x))
2755   ;;  (newline)
2756   (let* ((name-sym  (car x))
2757          (grob-entry (cdr x))
2758          (meta-entry (assoc-get 'meta grob-entry))
2759          (class (assoc-get 'class meta-entry))
2760          (ifaces-entry
2761           (assoc-get 'interfaces meta-entry)))
2762
2763     (cond
2764      ((eq? 'Item class)
2765       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2766      ((eq? 'Spanner class)
2767       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2768      ((eq? 'Paper_column class)
2769       (set! ifaces-entry (cons 'item-interface
2770                                (cons 'paper-column-interface ifaces-entry))))
2771      ((eq? 'System class)
2772       (set! ifaces-entry (cons 'system-interface
2773                                (cons 'spanner-interface ifaces-entry))))
2774      (else
2775       (ly:warning "Unknown class ~a" class)))
2776
2777     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2778     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2779
2780     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2781     (set! meta-entry (assoc-set! meta-entry 'interfaces
2782                                  ifaces-entry))
2783     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2784     (cons name-sym grob-entry)))
2785
2786 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2787
2788 ;;  (display (map pair? all-grob-descriptions))
2789
2790 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2791
2792 (for-each (lambda (x)
2793             ;; (display (car x)) (newline)
2794
2795             (set-object-property! (car x) 'translation-type? list?)
2796             (set-object-property! (car x) 'is-grob? #t))
2797           all-grob-descriptions)
2798
2799 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))