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