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