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