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