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