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