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