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