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