]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
* lily/paper-column-engraver.cc (make_columns):
[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
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         (non-musical . #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         (non-musical . #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         (non-musical . #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         (non-musical . #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         (non-musical . #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         (non-musical . #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         (circled-tip . #f)
656         (thickness . 1.0)
657         (height . 0.6666)
658         (minimum-length . 2.0)
659         (bound-padding . 1.0)
660         (self-alignment-Y . 0)
661         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
662         (meta . ((class . Spanner)
663                  (interfaces . (hairpin-interface
664                                 line-interface
665                                 self-alignment-interface
666                                 dynamic-interface
667                                 spanner-interface))))))
668
669     (HorizontalBracket
670      . (
671         (thickness . 1.0)
672         (stencil . ,ly:horizontal-bracket::print)
673         (Y-offset . ,ly:side-position-interface::y-aligned-side)
674         (padding . 0.2)
675         (staff-padding . 0.2)
676         (direction . ,DOWN)
677         (side-axis . ,Y)
678         (bracket-flare . (0.5 . 0.5))
679         (meta . ((class . Spanner)
680                  (interfaces . (horizontal-bracket-interface
681                                 side-position-interface
682                                 line-interface
683                                 spanner-interface))))))
684     (InstrumentName
685      . (
686         (padding . 0.3)
687         (stencil . ,ly:system-start-text::print)
688         (X-offset . ,ly:side-position-interface::x-aligned-side)
689         (direction . ,LEFT)
690         (self-alignment-Y . ,CENTER)
691         (meta . ((class . Spanner)
692                  (interfaces . (system-start-text-interface
693                                 side-position-interface
694                                 font-interface))))))
695
696     (KeyCancellation
697      . (
698         (stencil . ,ly:key-signature-interface::print)
699         (space-alist . (
700                         (time-signature . (extra-space . 1.25))
701                         (staff-bar . (extra-space . 0.6))
702                         (key-signature . (extra-space . 0.5))
703                         (right-edge . (extra-space . 0.5))
704                         (first-note . (fixed-space . 2.5))))
705         (Y-offset . ,ly:staff-symbol-referencer::callback)
706         (break-align-symbol . key-cancellation)
707         (break-visibility . ,begin-of-line-invisible)
708         (non-musical . #t)
709         (meta . ((class . Item)
710                  (interfaces . (key-signature-interface
711                                 font-interface
712                                 break-aligned-interface))))))
713     (KeySignature
714      . (
715         (stencil . ,ly:key-signature-interface::print)
716         (space-alist . (
717                         (time-signature . (extra-space . 1.15))
718                         (staff-bar . (extra-space . 1.1))
719                         (right-edge . (extra-space . 0.5))
720                         (first-note . (fixed-space . 2.5))))
721         (Y-offset . ,ly:staff-symbol-referencer::callback)
722         (break-align-symbol . key-signature)
723         (break-visibility . ,begin-of-line-visible)
724         (non-musical . #t)
725         (meta . ((class . Item)
726                  (interfaces . (key-signature-interface
727                                 font-interface
728                                 break-aligned-interface))))))
729     
730     
731    (LaissezVibrerTie
732      . (
733         (stencil  . ,ly:tie::print)
734         (control-points . ,ly:semi-tie::calc-control-points)
735         (direction . ,ly:semi-tie::calc-direction)
736         (details . ((ratio . 0.333)
737                     (height-limit . 1.0)))
738         (thickness . 1.0)
739         (meta . ((class . Item)
740                  (interfaces . (semi-tie-interface))
741                  ))
742         ))
743
744     (LaissezVibrerTieColumn
745      . (
746         (X-extent . #f)
747         (Y-extent . #f)
748         (head-direction . ,LEFT)
749         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
750         (meta . ((class . Item)
751                  (interfaces . (semi-tie-column-interface))
752                  ))
753         ))
754
755     (LedgerLineSpanner
756      . (
757         (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
758         (stencil . ,ly:ledger-line-spanner::print)
759         (X-extent . #f)
760         (Y-extent . #f)
761         (minimum-length-fraction . 0.25)
762         (length-fraction . 0.25)
763         (layer . 0)
764         (meta . ((class . Spanner)
765                  (interfaces . (ledger-line-interface))))))
766
767     (LeftEdge
768      . (
769         (break-align-symbol . left-edge)
770         (X-extent . (0 . 0))
771         (non-musical . #t)
772         (break-visibility . ,center-invisible)
773         (space-alist . (
774                         (custos . (extra-space . 0.0))
775                         (ambitus . (extra-space . 2.0))
776                         (time-signature . (extra-space . 1.0))
777                         (staff-bar . (extra-space . 0.0))
778                         (breathing-sign . (minimum-space . 0.0))
779                         (clef . (extra-space . 0.8))
780                         (first-note . (fixed-space . 2.0))
781                         (right-edge . (extra-space . 0.0))
782                         (key-signature . (extra-space . 0.0))
783                         (key-cancellation . (extra-space . 0.0))
784                         ))
785         (meta . ((class . Item)
786                  (interfaces . (break-aligned-interface))))))
787
788     (LigatureBracket
789      . (
790         ;; ugh.  A ligature bracket is totally different from
791         ;; a tuplet bracket.
792
793         (padding . 2.0)
794         (thickness . 1.6)
795         (edge-height . (0.7 . 0.7))
796         (shorten-pair . (-0.2 . -0.2))
797         (direction . ,UP)
798         (positions . ,ly:tuplet-bracket::calc-positions)
799         (stencil . ,ly:tuplet-bracket::print)
800         (staff-padding . 0.25)
801         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
802         (control-points . ,ly:tuplet-bracket::calc-control-points)
803         (meta . ((class . Spanner)
804                  (interfaces . (line-interface
805                                 tuplet-bracket-interface))))))
806
807
808     (LyricExtender
809      . (
810         (stencil . ,ly:lyric-extender::print)
811         (thickness . 0.8) ; line-thickness
812         (minimum-length . 1.5)
813         (Y-extent . (0 . 0))
814         (meta . ((class . Spanner)
815                  (interfaces . (lyric-interface
816                                 lyric-extender-interface))))))
817
818     (LyricHyphen
819      . (
820         (thickness . 1.3)
821         (height . 0.42)
822         (dash-period . 10.0)
823         (length . 0.66)
824         (minimum-length . 0.3)
825         (minimum-distance . 0.1)
826         (padding . 0.07)
827         (springs-and-rods . ,ly:hyphen-spanner::set-spacing-rods)
828         (stencil . ,ly:hyphen-spanner::print)
829         (Y-extent . (0 . 0))
830         (meta . ((class . Spanner)
831                  (interfaces . (lyric-interface
832                                 font-interface
833                                 lyric-hyphen-interface
834                                 spanner-interface))))))
835
836     (LyricSpace
837      . ((minimum-distance . 0.45)
838         (springs-and-rods . ,ly:hyphen-spanner::set-spacing-rods)
839         (padding . 0.0)
840         (Y-extent . #f)
841         (X-extent . #f)
842         (meta . ((class . Spanner)
843                  (interfaces . (spanner-interface
844                                 lyric-hyphen-interface spacing-interface))
845                  ))
846         ))
847     (LyricText
848      . (
849         (stencil . ,ly:text-interface::print)
850         (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
851         (self-alignment-X . 0)
852         (word-space . 0.6)
853         (font-series . bold-narrow)
854         (font-size . 1.0)
855         (meta . ((class . Item)
856                  (interfaces . (rhythmic-grob-interface
857                                 lyric-syllable-interface
858                                 self-alignment-interface
859                                 text-interface
860                                 font-interface))))))
861
862
863     (MeasureGrouping
864      . (
865         (Y-offset . ,ly:side-position-interface::y-aligned-side)
866         (side-axis . ,Y)
867         (stencil . ,ly:measure-grouping::print)
868         (padding . 2)
869         (direction . ,UP)
870         (thickness . 1)
871         (height . 2.0)
872         (staff-padding . 3)
873         (meta . ((class . Spanner)
874                  (interfaces . (side-position-interface
875                                 measure-grouping-interface))))))
876
877     (MelodyItem
878      . (
879         (neutral-direction . ,DOWN)
880         (meta . ((class . Item)
881                  (interfaces . (melody-spanner-interface spacing-interface))))))
882     (MensuralLigature
883      . (
884         (thickness . 1.4)
885         (flexa-width . 2.0)
886         (stencil . ,ly:mensural-ligature::print)
887         (meta . ((class . Spanner)
888                  (interfaces . (mensural-ligature-interface
889                                 font-interface))))))
890
891     (MetronomeMark
892      . (
893         (stencil . ,ly:text-interface::print)
894         (Y-offset . ,ly:side-position-interface::y-aligned-side)
895         (direction . ,UP)
896         (padding . 0.8)
897         (side-axis . ,Y)
898         (meta . ((class . Item)
899                  (interfaces . (text-interface
900                                 side-position-interface
901                                 font-interface
902                                 metronome-mark-interface))))))
903
904
905     (MultiMeasureRest
906      . (
907         (stencil . ,ly:multi-measure-rest::print)
908         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
909         (Y-offset . ,ly:staff-symbol-referencer::callback)
910         (staff-position . 0)
911         (expand-limit . 10)
912         (thick-thickness . 6.6)
913         (hair-thickness . 2.0)
914         (padding . 1)
915         (meta . ((class . Spanner)
916                  (interfaces . (multi-measure-rest-interface
917                                 multi-measure-interface
918                                 rest-interface
919                                 font-interface
920                                 staff-symbol-referencer-interface))))))
921
922
923     (MultiMeasureRestNumber
924      . (
925         (bound-padding  . 2.0)
926         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
927         (stencil . ,ly:text-interface::print)
928         (X-offset . ,(ly:make-simple-closure
929                       `(,+ ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self))
930                            ,(ly:make-simple-closure (list ly:self-alignment-interface::x-centered-on-y-parent)))))
931         (Y-offset . ,ly:side-position-interface::y-aligned-side)
932         (side-axis . ,Y)
933         (self-alignment-X . 0)
934         (direction . ,UP)
935         (padding . 0.4)
936         (staff-padding . 0.4)
937         (font-encoding . fetaNumber)
938         (meta . ((class . Spanner)
939                  (interfaces . (side-position-interface
940                                 multi-measure-interface
941                                 self-alignment-interface
942                                 font-interface
943                                 text-interface))))
944               ))
945
946     (MultiMeasureRestText
947      . (
948         (stencil . ,ly:text-interface::print)
949         (X-offset . ,(ly:make-simple-closure
950                       `(,+ ,(ly:make-simple-closure (list ly:self-alignment-interface::x-centered-on-y-parent))
951                            ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
952         
953         (Y-offset . ,ly:side-position-interface::y-aligned-side)
954         (self-alignment-X . 0)
955         (direction . ,UP)
956         (padding . 0.2)
957         (staff-padding . 0.25)
958         (meta . ((class . Spanner)
959                  (interfaces . (side-position-interface
960                                 multi-measure-interface
961                                 self-alignment-interface
962                                 font-interface
963                                 text-interface))))))
964
965     (NoteCollision
966      . (
967         (axes . (0 1))
968         (X-extent . ,ly:axis-group-interface::width)
969         (Y-extent . ,ly:axis-group-interface::height)
970         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
971         (meta . ((class . Item)
972                  (interfaces . (note-collision-interface
973                                 axis-group-interface))))))
974
975     (NoteColumn
976      . (
977         (axes . (0 1))
978         (X-extent . ,ly:axis-group-interface::width)
979         (Y-extent . ,ly:axis-group-interface::height)
980         (meta . ((class . Item)
981                  (interfaces . (axis-group-interface
982                                 note-column-interface))))))
983
984     (NoteHead
985      . (
986         (stencil . ,ly:note-head::print)
987         (stem-attachment . ,ly:note-head::calc-stem-attachment)
988         (glyph-name . ,note-head::calc-glyph-name) 
989         (Y-offset . ,ly:staff-symbol-referencer::callback)
990         (X-offset . ,ly:note-head::stem-x-shift)
991         (meta . ((class . Item)
992                  (interfaces . (rhythmic-grob-interface
993                                 rhythmic-head-interface
994                                 font-interface
995                                 note-head-interface
996                                 ledgered-interface
997                                 staff-symbol-referencer-interface))))))
998
999     (NoteSpacing
1000      . (
1001         (stem-spacing-correction . 0.5)
1002         (same-direction-correction . 0.25)
1003         ;; Changed this from 0.75.
1004         ;; If you ever change this back, please document! --hwn
1005         (knee-spacing-correction . 1.0)
1006         (meta . ((class . Item)
1007                  (interfaces . (spacing-interface
1008                                 note-spacing-interface))))))
1009
1010     (NoteName
1011      . (
1012         (stencil . ,ly:text-interface::print)
1013         (meta . ((class . Item)
1014                  (interfaces . (note-name-interface
1015                                 text-interface
1016                                 font-interface))))))
1017
1018     (OctavateEight
1019      . (
1020         (self-alignment-X . 0)
1021         (break-visibility . ,begin-of-line-visible)
1022         (X-offset . ,(ly:make-simple-closure
1023                       `(,+ ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self))
1024                            ,(ly:make-simple-closure (list ly:self-alignment-interface::centered-on-x-parent)))))
1025         
1026         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1027         (stencil . ,ly:text-interface::print)
1028
1029         ;; no Y dimensions, because of lyrics under tenor clef.
1030         (Y-extent . (0 . 0))
1031         (font-shape . italic)
1032         (padding . 0.6)
1033         (staff-padding . 0.2)
1034         (font-size . -4)
1035         (meta . ((class . Item)
1036                  (interfaces . (text-interface
1037                                 self-alignment-interface
1038                                 side-position-interface
1039                                 font-interface))))))
1040
1041     (OttavaBracket
1042      . (
1043         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1044         (stencil . ,ly:ottava-bracket::print)
1045         (font-shape . italic)
1046         (shorten-pair . (0.0 . -0.6))
1047         (staff-padding . 1.0)
1048         (padding . 0.5)
1049         (minimum-length . 1.0)
1050         (dash-fraction . 0.3)
1051         (edge-height . (0 . 1.2))
1052         (direction . ,UP)
1053         (meta . ((class . Spanner)
1054                  (interfaces . (ottava-bracket-interface
1055                                 horizontal-bracket-interface
1056                                 line-interface
1057                                 side-position-interface
1058                                 font-interface
1059                                 text-interface))))))
1060
1061     (PaperColumn
1062      . (
1063         (axes . (0))
1064         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1065         ;; (stencil . ,ly:paper-column::print)
1066         (X-extent . ,ly:axis-group-interface::width)
1067         
1068         ;; debugging
1069         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1070         (meta . ((class . Paper_column)
1071                  (interfaces . (paper-column-interface
1072                                 axis-group-interface
1073                                 spaceable-grob-interface))))))
1074
1075     (ParenthesesItem
1076      . ((stencil . ,parentheses-item::print)
1077         (font-size . -6)
1078         (padding . 0.2)
1079         (meta . ((class . Item)
1080                  (interfaces . (parentheses-interface font-interface))))
1081         ))
1082     
1083     (PhrasingSlur
1084      . ((details . ,default-slur-details)
1085         (control-points . ,ly:slur::calc-control-points)
1086         (direction . ,ly:slur::calc-direction)
1087         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1088         (Y-extent . ,ly:slur::height)
1089         (stencil . ,ly:slur::print)                   
1090         (thickness . 1.1)
1091         (minimum-length . 1.5)
1092         (height-limit . 2.0)
1093         (ratio . 0.333)
1094         (meta . ((class . Spanner)
1095                  (interfaces . (slur-interface))))))
1096
1097     (NonMusicalPaperColumn
1098      . (
1099         (axes . (0))
1100         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1101         (X-extent . ,ly:axis-group-interface::width)
1102         ;;                    (stencil . ,ly:paper-column::print)
1103         
1104         (non-musical . #t)
1105         (line-break-permission . allow)
1106
1107         ;; debugging stuff: print column number.
1108         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1109
1110         (meta . ((class . Paper_column)
1111                  (interfaces . (paper-column-interface
1112                                 axis-group-interface
1113                                 spaceable-grob-interface))))))
1114
1115     (PercentRepeat
1116      . (
1117         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1118         (stencil . ,ly:multi-measure-rest::percent)
1119         (slope . 1.0)
1120         (thickness . 0.48)
1121         (font-encoding . fetaMusic)
1122         (meta . ((class . Spanner)
1123                  (interfaces . (multi-measure-rest-interface
1124                                 font-interface
1125                                 percent-repeat-interface))))))
1126     (PercentRepeatCounter
1127      . (
1128         (stencil . ,ly:text-interface::print)
1129         (X-offset . ,(ly:make-simple-closure
1130                       `(,+ ,(ly:make-simple-closure (list ly:self-alignment-interface::x-centered-on-y-parent))
1131                            ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
1132         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1133         (self-alignment-X . 0)
1134         (direction . ,UP)
1135         (padding . 0.2)
1136         (staff-padding . 0.25)
1137         (font-size . -2) 
1138         (font-encoding . fetaNumber)
1139         (meta . ((class . Spanner)
1140                  (interfaces . (side-position-interface
1141                                 self-alignment-interface
1142                                 percent-repeat-interface
1143                                 font-interface
1144                                 text-interface))))))
1145
1146     ;; an example of a text spanner
1147     (PianoPedalBracket
1148      . (
1149         (stencil . ,ly:piano-pedal-bracket::print)
1150         (style . line)
1151         (bound-padding . 1.0)
1152         (direction . ,DOWN)
1153         (bracket-flare . (0.5 . 0.5))
1154         (edge-height . (1.0 . 1.0))
1155         (shorten-pair . (0.0 . 0.0))
1156         (thickness .  1.0)
1157         (meta . ((class . Spanner)
1158                  (interfaces . (line-interface
1159                                 piano-pedal-interface
1160                                 piano-pedal-bracket-interface))))))
1161
1162     (RehearsalMark
1163      . (
1164         (stencil . ,ly:text-interface::print)
1165         (X-offset . ,(ly:make-simple-closure
1166                       `(,+
1167                         ,(ly:make-simple-closure
1168                           (list ly:break-alignment-align-interface::self-align-callback))
1169                         ,(ly:make-simple-closure
1170                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1171
1172         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1173         (self-alignment-X . 0)
1174         (direction . ,UP)
1175         (non-musical . #t)
1176         (font-size . 2)
1177         (baseline-skip . 2)
1178         (break-visibility . ,end-of-line-invisible)
1179         (break-align-symbol . staff-bar)
1180         (padding . 0.8)
1181         (meta . ((class . Item)
1182                  (interfaces . (text-interface
1183                                 side-position-interface
1184                                 break-alignment-align-interface
1185                                 font-interface
1186                                 mark-interface
1187                                 self-alignment-interface))))))
1188
1189
1190     (RepeatSlash
1191      . (
1192         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1193         (thickness . 0.48)
1194         (slope . 1.7)
1195         (meta . ((class . Item)
1196                  (interfaces . (percent-repeat-interface))))))
1197     (RepeatTie
1198      . (
1199         (stencil  . ,ly:tie::print)
1200         (control-points . ,ly:semi-tie::calc-control-points)
1201         (direction . ,ly:semi-tie::calc-direction)
1202         (details . ((ratio . 0.333)
1203                     (height-limit . 1.0)))
1204         (thickness . 1.0)
1205         (meta . ((class . Item)
1206                  (interfaces . (semi-tie-interface))
1207                  ))
1208         ))
1209
1210     (RepeatTieColumn
1211      . (
1212         (X-extent . #f)
1213         (Y-extent . #f)
1214         (head-direction . ,RIGHT)
1215         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1216         (meta . ((class . Item)
1217                  (interfaces . (semi-tie-column-interface))
1218                  ))
1219         ))
1220
1221     (Rest
1222      . (
1223         (stencil . ,ly:rest::print)
1224         (X-extent . ,ly:rest::width)
1225         (Y-extent . ,ly:rest::height)
1226         (Y-offset . ,ly:rest::y-offset-callback)
1227         (minimum-distance . 0.25)
1228         (meta . ((class . Item)
1229                  (interfaces . (font-interface
1230                                 rhythmic-head-interface
1231                                 rhythmic-grob-interface
1232                                 staff-symbol-referencer-interface
1233                                 rest-interface))))))
1234
1235     (RestCollision
1236      . (
1237         (minimum-distance . 0.75)
1238         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1239         (meta . ((class . Item)
1240                  (interfaces . (rest-collision-interface))))))
1241
1242     (Script
1243      . (
1244         ;; don't set direction here: it breaks staccato.
1245
1246         ;; This value is sensitive: if too large, staccato dots will move a
1247         ;; space a away.
1248         (padding . 0.20)
1249         (staff-padding . 0.25)
1250         ;; (script-priority . 0) priorities for scripts, see script.scm
1251         (X-offset . , ly:self-alignment-interface::centered-on-x-parent)
1252         
1253
1254         (stencil . ,ly:script-interface::print)
1255         (direction . ,ly:script-interface::calc-direction)
1256         (font-encoding . fetaMusic)
1257         (meta . ((class . Item)
1258                  (interfaces . (script-interface
1259                                 side-position-interface
1260                                 font-interface))))))
1261
1262     (ScriptColumn
1263      . (
1264         (before-line-breaking . ,ly:script-column::before-line-breaking)
1265         (meta . ((class . Item)
1266                  (interfaces . (script-column-interface))))))
1267
1268     (SeparationItem
1269      . (
1270         (X-extent . #f)
1271         (Y-extent . #f)
1272         (meta . ((class . Item)
1273                  (interfaces . (spacing-interface
1274                                 separation-item-interface))))))
1275
1276     (SeparatingGroupSpanner
1277      . (
1278         (springs-and-rods . ,ly:separating-group-spanner::set-spacing-rods)
1279         (meta . ((class . Spanner)
1280                  (interfaces . (only-prebreak-interface
1281                                 spacing-interface
1282                                 separation-spanner-interface))))))
1283
1284     (Slur
1285      . ((details . ,default-slur-details)
1286         (control-points . ,ly:slur::calc-control-points)
1287         (direction . ,ly:slur::calc-direction)
1288         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1289         (Y-extent . ,ly:slur::height)
1290         (stencil . ,ly:slur::print)
1291         (thickness . 1.2)
1292         (line-thickness . 0.8)
1293         (minimum-length . 1.5)
1294         (height-limit . 2.0)
1295         (ratio . 0.25)
1296         (avoid-slur . inside)
1297         (meta . ((class . Spanner)
1298                  (interfaces . (slur-interface))))))
1299
1300  (SostenutoPedal
1301      . (
1302         (stencil . ,ly:text-interface::print)
1303         (direction . ,RIGHT)
1304         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1305         (no-spacing-rods . #t)
1306         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1307         (font-shape . italic)
1308         (self-alignment-X . 0)
1309         (meta . ((class . Item)
1310                  (interfaces . (text-interface
1311                                 self-alignment-interface
1312                                 font-interface))))))
1313
1314     (SostenutoPedalLineSpanner
1315      . (
1316         (axes . (1))
1317         (Y-extent . ,ly:axis-group-interface::height)
1318         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1319         (side-axis . ,Y)
1320         (staff-padding . 1.0)
1321         (padding . 1.2)
1322         (minimum-space . 1.0)
1323         (direction . ,DOWN)
1324         (meta . ((class . Spanner)
1325                  (interfaces . (piano-pedal-interface
1326                                 axis-group-interface
1327                                 side-position-interface))))))
1328     (SpacingSpanner
1329      . (
1330         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1331         (average-spacing-wishes . #t)
1332         (grace-space-factor . 0.6)
1333         (shortest-duration-space . 2.0)
1334         (spacing-increment . 1.2)
1335         (base-shortest-duration . ,(ly:make-moment 3 16))
1336         (meta . ((class . Spanner)
1337                  (interfaces . (spacing-interface
1338                                 spacing-spanner-interface))))))
1339
1340     (SpanBar
1341      . (
1342         (break-align-symbol . staff-bar)
1343         (Y-extent . ())
1344         (layer . 0)
1345         (non-musical . #t)
1346         (stencil . ,ly:span-bar::print)
1347         (bar-size . ,ly:span-bar::calc-bar-size)
1348         (X-extent . ,ly:span-bar::width)
1349         (glyph-name . ,ly:span-bar::calc-glyph-name)
1350         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1351
1352         ;; ugh duplication!
1353
1354         ;;
1355         ;; Ross. page 151 lists other values, we opt for a leaner look
1356         ;;
1357         (kern . 3.0)
1358         (thin-kern . 3.0)
1359         (hair-thickness . 1.6)
1360         (thick-thickness . 6.0)
1361         (meta . ((class . Item)
1362                  (interfaces . (span-bar-interface
1363                                 font-interface
1364                                 bar-line-interface))))))
1365
1366     (StanzaNumber
1367      . (
1368         (stencil . ,ly:text-interface::print)
1369         (font-series . bold)
1370         (padding . 1.0)
1371         (X-offset . ,ly:side-position-interface::x-aligned-side)
1372         (side-axis . ,X)
1373         (direction . ,LEFT)
1374         (meta . ((class . Item)
1375                  (interfaces . (side-position-interface
1376                                 stanza-number-interface
1377                                 text-interface
1378                                 font-interface))))))
1379
1380
1381     (StaffSpacing
1382      . (
1383         (non-musical . #t)
1384         (stem-spacing-correction . 0.4)
1385         (meta . ((class . Item)
1386                  (interfaces . (spacing-interface
1387                                 staff-spacing-interface))))))
1388
1389    
1390     (StaffSymbol
1391      . (
1392         (Y-extent . ,ly:staff-symbol::height)
1393         (stencil . ,ly:staff-symbol::print)
1394         (line-count . 5)
1395         (ledger-line-thickness . (1.0 . 0.1))
1396         (layer . 0)
1397         (meta . ((class . Spanner)
1398                  (interfaces . (staff-symbol-interface))))))
1399
1400     (Stem
1401      . (
1402         (direction . ,ly:stem::calc-direction)
1403         (default-direction . ,ly:stem::calc-default-direction)
1404         (stem-end-position . ,ly:stem::calc-stem-end-position)
1405         (neutral-direction . ,DOWN)
1406         (stem-info . ,ly:stem::calc-stem-info)
1407         (positioning-done . ,ly:stem::calc-positioning-done)
1408         (stencil . ,ly:stem::print)
1409         (X-extent . ,ly:stem::width)
1410         (Y-extent . ,ly:stem::height)
1411         (length . ,ly:stem::calc-length)
1412         (thickness . 1.3)
1413         (details
1414          . (
1415             ;; 3.5 (or 3 measured from note head) is standard length
1416             ;; 32nd, 64th flagged stems should be longer
1417             (lengths . (3.5 3.5 3.5 4.5 5.0))
1418
1419             ;; FIXME.  3.5 yields too long beams (according to Ross and
1420             ;; looking at Baerenreiter examples) for a number of common
1421             ;; boundary cases.  Subtracting half a beam thickness fixes
1422             ;; this, but the bug may well be somewhere else.
1423
1424             ;; FIXME this should come from 'lengths
1425             (beamed-lengths . (3.26 3.5 3.6))
1426
1427             ;; The 'normal' minima
1428             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1429                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1430
1431             ;; The 'extreme case' minima
1432             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1433
1434             ;; Stems in unnatural (forced) direction should be shortened by
1435             ;; one staff space, according to [Roush & Gourlay].
1436             ;; Flagged stems we shorten only half a staff space.
1437             (stem-shorten . (1.0 0.5))
1438
1439             ))
1440
1441         ;; We use the normal minima as minimum for the ideal lengths,
1442         ;; and the extreme minima as abolute minimum length.
1443
1444         (X-offset . ,ly:stem::offset-callback)
1445         (Y-offset . ,ly:staff-symbol-referencer::callback)
1446         (meta . ((class . Item)
1447                  (interfaces . (stem-interface
1448                                 font-interface))))))
1449
1450     (StemTremolo
1451      . (
1452         (Y-extent . ,ly:stem-tremolo::height)
1453         (stencil . ,ly:stem-tremolo::print)
1454         (X-extent . #f)
1455         (slope . ,ly:stem-tremolo::calc-slope)
1456         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1457         (style . ,ly:stem-tremolo::calc-style)
1458         (beam-thickness . 0.48) ; staff-space
1459         (meta . ((class . Item)
1460                  (interfaces . (stem-tremolo-interface))))))
1461
1462     (StringNumber
1463      . (
1464         (stencil . ,print-circled-text-callback)
1465         (padding . 0.5)
1466         (staff-padding . 0.5)
1467         (self-alignment-X . 0)
1468         (self-alignment-Y . 0)
1469         (script-priority . 100)
1470         (font-encoding . fetaNumber)
1471         (font-size . -5)                ; don't overlap when next to heads.
1472         (meta . ((class . Item)
1473                  (interfaces . (string-number-interface
1474                                 font-interface
1475                                 text-script-interface
1476                                 text-interface
1477                                 side-position-interface
1478                                 self-alignment-interface
1479                                 item-interface))))))
1480     
1481     (SustainPedal
1482      . (
1483         (no-spacing-rods . #t)
1484         (stencil . ,ly:sustain-pedal::print)
1485         (self-alignment-X . 0)
1486         (direction . ,RIGHT)
1487         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1488         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1489         (meta . ((class . Item)
1490                  (interfaces . (piano-pedal-interface
1491                                 text-spanner-interface
1492                                 text-interface
1493                                 self-alignment-interface
1494                                 font-interface))))))
1495
1496     (SustainPedalLineSpanner
1497      . (
1498         (axes . (1))
1499         (Y-extent . ,ly:axis-group-interface::height)
1500         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1501         (side-axis . ,Y)
1502         (padding . 1.2)
1503         (staff-padding . 1.2)
1504         (minimum-space . 1.0)
1505         (direction . ,DOWN)
1506         (meta . ((class . Spanner)
1507                  (interfaces . (piano-pedal-interface
1508                                 axis-group-interface
1509                                 side-position-interface))))))
1510
1511     (System
1512      . (
1513         (axes . (0 1))
1514         (X-extent . ,ly:axis-group-interface::width)
1515         (Y-extent . ,ly:axis-group-interface::height)
1516         (meta . ((class . System)
1517                  (interfaces . (system-interface
1518                                 axis-group-interface))))))
1519
1520     (SystemStartBrace
1521      . (
1522         (style . brace)
1523         (padding . 0.3)
1524         (stencil . ,ly:system-start-delimiter::print)
1525         (collapse-height . 5.0)
1526         (X-offset . ,ly:side-position-interface::x-aligned-side)
1527         (direction . ,LEFT)
1528         (font-encoding . fetaBraces)
1529         (Y-extent . #f)
1530         (meta . ((class . Spanner)
1531                  (interfaces . (system-start-delimiter-interface
1532                                 side-position-interface
1533                                 font-interface))))))
1534
1535
1536     (SystemStartSquare
1537      . (
1538         (Y-extent . #f)
1539         (X-offset . ,ly:side-position-interface::x-aligned-side)
1540         (direction . ,LEFT)
1541         (stencil . ,ly:system-start-delimiter::print)
1542         (style . line-bracket)
1543         (thickness . 1.0)
1544         (meta . ((class . Spanner)
1545                  (interfaces . (font-interface
1546                                 side-position-interface
1547                                 system-start-delimiter-interface))))))
1548     (SystemStartBracket
1549      . (
1550         (Y-extent . #f)
1551         (padding . 0.8)
1552         (X-offset . ,ly:side-position-interface::x-aligned-side)
1553         (direction . ,LEFT)
1554         (stencil . ,ly:system-start-delimiter::print)
1555         (style . bracket)
1556         (collapse-height . 5.0)
1557         (thickness . 0.45)
1558         (meta . ((class . Spanner)
1559                  (interfaces . (font-interface
1560                                 side-position-interface
1561                                 system-start-delimiter-interface))))))
1562
1563     (SystemStartBar
1564      . (
1565         (Y-extent . #f)
1566
1567         ;; ugh--hardcoded. 
1568         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
1569         (X-offset . ,ly:side-position-interface::x-aligned-side)
1570         (direction . ,LEFT)
1571         (style . bar-line)
1572         (thickness . 1.6)
1573         (stencil . ,ly:system-start-delimiter::print)
1574         (meta . ((class . Spanner)
1575                  (interfaces . (side-position-interface
1576                                 system-start-delimiter-interface))))))
1577
1578
1579     (TabNoteHead
1580      . (
1581         (stencil . ,ly:text-interface::print)
1582         (Y-offset . ,ly:staff-symbol-referencer::callback)
1583         (font-size . -2)
1584         (stem-attachment . (0.0 . 1.35))
1585         (font-series . bold)
1586         (meta . ((class . Item)
1587                  (interfaces
1588                   . (rhythmic-head-interface
1589                      font-interface rhythmic-grob-interface
1590                      note-head-interface
1591                      staff-symbol-referencer-interface
1592                      text-interface))))))
1593
1594     (TextScript
1595      . (
1596         (no-spacing-rods . #t)
1597         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1598         (direction . ,DOWN)
1599
1600         ;; sync with Fingering ?
1601         (padding . 0.5)
1602         (staff-padding . 0.5)
1603
1604         (stencil . ,ly:text-interface::print)
1605         (direction . ,ly:script-interface::calc-direction)
1606
1607         (avoid-slur . around)
1608         (slur-padding . 0.5)
1609         (script-priority . 200)
1610         ;; todo: add X self alignment?
1611         (meta . ((class . Item)
1612                  (interfaces . (text-script-interface
1613                                 text-interface
1614                                 side-position-interface
1615                                 font-interface))))))
1616
1617     (TextSpanner
1618      . (
1619         (stencil . ,ly:text-spanner::print)
1620         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1621         (font-shape . italic)
1622         (style . dashed-line)
1623         (staff-padding . 0.8)
1624         (dash-fraction . 0.2)
1625         (dash-period . 3.0)
1626         (side-axis . ,Y)
1627         (direction . ,UP)
1628         (meta . ((class . Spanner)
1629                  (interfaces . (text-spanner-interface
1630                                 side-position-interface
1631                                 font-interface))))))
1632
1633     (Tie
1634      . (
1635         (control-points . ,ly:tie::calc-control-points)
1636         (avoid-slur . inside)
1637         (direction . ,ly:tie::calc-direction)
1638         (stencil . ,ly:tie::print)
1639         (font-size . -6)
1640         (details . (
1641                     ;; for a full list, see tie-helper.cc
1642                     (ratio . 0.333)
1643                     (center-staff-line-clearance . 0.6)
1644                     (tip-staff-line-clearance . 0.45)
1645                     (note-head-gap . 0.2)
1646                     (stem-gap . 0.35)
1647                     (height-limit . 1.0)
1648                     (horizontal-distance-penalty-factor . 10)
1649                     (min-length-penalty-factor . 20)
1650                     (tie-tie-collision-distance . 0.45) 
1651                     (tie-tie-collision-penalty . 25.0)
1652                     (intra-space-threshold . 1.25)
1653                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
1654                     (outer-tie-length-symmetry-penalty-factor . 10)
1655                     (outer-tie-vertical-gap . 0.25)
1656                     (multi-tie-region-size . 1)
1657                     (between-length-limit . 1.0)))
1658         (thickness . 1.2)
1659         (line-thickness . 0.8)
1660         (meta . ((class . Spanner)
1661                  (interfaces . (tie-interface))))
1662         ))
1663
1664     (TieColumn
1665      . (
1666         (positioning-done . ,ly:tie-column::calc-positioning-done)
1667         (before-line-breaking . ,ly:tie-column::before-line-breaking)
1668         (X-extent . #f)
1669         (Y-extent . #f)
1670         (meta . ((class . Spanner)
1671                  (interfaces . (tie-column-interface))))))
1672
1673     (TimeSignature
1674      . (
1675         (stencil . ,ly:time-signature::print)
1676         (break-align-symbol . time-signature)
1677         (break-visibility . ,all-visible)
1678         (space-alist . (
1679                         (first-note . (fixed-space . 2.0))
1680                         (right-edge . (extra-space . 0.5))
1681                         (staff-bar . (minimum-space . 2.0))))
1682         (non-musical . #t)
1683         (style . C)
1684         (meta . ((class . Item)
1685                  (interfaces . (time-signature-interface
1686                                 break-aligned-interface
1687                                 font-interface))))))
1688
1689     (TrillSpanner
1690      . (
1691         (stencil . ,ly:dynamic-text-spanner::print)
1692         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1693                             ""))
1694         (style . trill)
1695         (staff-padding . 1.0)
1696         (padding . 0.5)
1697         (direction . ,UP)
1698         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1699         (side-axis . ,Y)
1700         (meta . ((class . Spanner)
1701                  (interfaces . (text-spanner-interface
1702                                 side-position-interface
1703                                 font-interface))))))
1704
1705     (TrillPitchAccidental
1706      . ((X-offset . ,ly:side-position-interface::x-aligned-side)
1707         (padding . 0.2)
1708         (direction . ,LEFT)
1709         (font-size . -4)
1710         (side-axis . ,X)
1711         (stencil . ,ly:accidental-interface::print)
1712         (meta . ((class . Item)
1713                  (interfaces . (item-interface
1714                                 accidental-interface
1715                                 side-position-interface
1716                                 font-interface))))))
1717
1718     (TrillPitchGroup
1719      . ((X-offset . ,ly:side-position-interface::x-aligned-side)
1720         (axes . (,X))
1721         (font-size . -4)
1722         (stencil . ,parenthesize-elements)
1723         (direction . ,RIGHT)
1724         (side-axis . ,X)
1725         (padding . 0.3)
1726         (meta . ((class . Item)
1727                  (interfaces . (side-position-interface
1728                                 note-head-interface
1729                                 rhythmic-head-interface
1730                                 font-interface
1731                                 accidental-interface
1732                                 axis-group-interface))))))
1733
1734     (TrillPitchHead
1735      . (
1736         (stencil . ,ly:note-head::print)
1737         (duration-log . 2)
1738         (Y-offset . ,ly:staff-symbol-referencer::callback)
1739         (font-size . -4)
1740         (meta . ((class . Item)
1741                  (interfaces . (item-interface
1742                                 rhythmic-head-interface
1743                                 font-interface
1744                                 pitched-trill-interface
1745                                 ledgered-interface
1746                                 staff-symbol-referencer-interface))))))
1747
1748     (TupletBracket
1749      . (
1750         (padding . 1.1)
1751         (thickness . 1.6)
1752         (edge-height . (0.7 . 0.7))
1753         (shorten-pair . (-0.2 . -0.2))
1754         (staff-padding . 0.25)
1755         
1756         (direction  . ,ly:tuplet-bracket::calc-direction)
1757         (positions . ,ly:tuplet-bracket::calc-positions)
1758         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1759         (control-points . ,ly:tuplet-bracket::calc-control-points)
1760         (stencil . ,ly:tuplet-bracket::print)
1761         
1762         (meta . ((class . Spanner)
1763                  (interfaces . (line-interface
1764                                 tuplet-bracket-interface))))))
1765
1766     (TupletNumber
1767      . (
1768         (stencil . ,ly:tuplet-number::print)
1769         (font-shape . italic)
1770         (font-size . -2)
1771         (avoid-slur . inside)
1772         (meta . ((class . Spanner)
1773                  (interfaces . (text-interface tuplet-number-interface
1774                                 font-interface))))))
1775     
1776     (UnaCordaPedal
1777      . (
1778         (stencil . ,ly:text-interface::print)
1779         (font-shape . italic)
1780         (no-spacing-rods . #t)
1781         (self-alignment-X . 0)
1782         (direction . ,RIGHT)
1783         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1784         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1785         (meta . ((class . Item)
1786                  (interfaces . (text-interface
1787                                 self-alignment-interface
1788                                 font-interface))))))
1789
1790     (UnaCordaPedalLineSpanner
1791      . (
1792         (axes . (1))
1793         (Y-extent . ,ly:axis-group-interface::height)
1794         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1795         (side-axis . ,Y)
1796         (padding . 1.2)
1797         (staff-padding . 1.2)
1798         (minimum-space . 1.0)
1799         (direction . ,DOWN)
1800         (meta . ((class . Spanner)
1801                  (interfaces . (piano-pedal-interface
1802                                 axis-group-interface
1803                                 side-position-interface))))))
1804
1805     (VaticanaLigature
1806      . (
1807         (thickness . 0.6)
1808         (flexa-width . 2.0)
1809         (stencil . ,ly:vaticana-ligature::print)
1810         (meta . ((class . Spanner)
1811                  (interfaces . (vaticana-ligature-interface
1812                                 font-interface))))))
1813
1814     (VerticalAlignment
1815      . (
1816         (axes . (1))
1817         (positioning-done . ,ly:align-interface::calc-positioning-done)
1818         (after-line-breaking . ,ly:align-interface::stretch-after-break)
1819         (Y-extent . ,ly:axis-group-interface::height)
1820         (X-extent . ,ly:axis-group-interface::width)
1821         (stacking-dir . -1)
1822         (meta . ((class . Spanner)
1823                  (interfaces . (align-interface
1824                                 axis-group-interface))))))
1825     (VerticalAxisGroup
1826      . (
1827         (axes . (1))
1828         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
1829
1830         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
1831         (X-extent . ,ly:axis-group-interface::width)
1832         (meta . ((class . Spanner)
1833                  (interfaces . (axis-group-interface
1834                                 hara-kiri-group-interface
1835                                 vertically-spaceable-interface))))))
1836
1837
1838     (VoltaBracket
1839      . (
1840         (stencil . ,ly:volta-bracket-interface::print)
1841         (direction . ,UP)
1842         (padding . 1)
1843         (font-encoding . fetaNumber)
1844         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1845         (side-axis . ,Y)
1846         (thickness . 1.6)  ;;  line-thickness
1847         (edge-height . (2.0 . 2.0)) ;; staff-space;
1848         (minimum-space . 5)
1849         (font-size . -4)
1850         (meta . ((class . Spanner)
1851                  (interfaces . (volta-bracket-interface
1852                                 horizontal-bracket-interface                            
1853                                 line-interface
1854                                 text-interface
1855                                 side-position-interface
1856                                 font-interface)))
1857               )))
1858
1859
1860     (VoiceFollower
1861      . (
1862         (style . line)
1863         (gap . 0.5)
1864         (non-musical . #t)
1865         (X-extent . #f)
1866         (Y-extent . #f)
1867         (stencil . ,ly:line-spanner::print)
1868         (after-line-breaking . ,ly:line-spanner::after-line-breaking)
1869         (meta . ((class . Spanner)
1870                  (interfaces . (line-spanner-interface
1871                                 line-interface))))
1872         ))
1873
1874 ))
1875
1876 (define (completize-grob-entry x)
1877   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1878 "
1879   ;;  (display (car x))
1880   ;;  (newline)
1881   (let* ((name-sym  (car x))
1882          (grob-entry (cdr x))
1883          (meta-entry (cdr (assoc 'meta grob-entry)))
1884          (class (cdr (assoc 'class meta-entry)))
1885          (ifaces-entry
1886           (cdr (assoc 'interfaces meta-entry))))
1887
1888     (cond
1889      ((eq? 'Item class)
1890       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1891      ((eq? 'Spanner class)
1892       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1893      ((eq? 'Paper_column class)
1894       (set! ifaces-entry (cons 'item-interface
1895                                (cons 'paper-column-interface ifaces-entry))))
1896      ((eq? 'System class)
1897       (set! ifaces-entry (cons 'system-interface
1898                                (cons 'spanner-interface ifaces-entry))))
1899      (else
1900       (ly:warning "Unknown class ~a" class)))
1901     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1902
1903     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1904     (set! meta-entry (assoc-set! meta-entry 'interfaces
1905                                  ifaces-entry))
1906     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1907     (cons name-sym grob-entry)))
1908
1909 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1910
1911 ;;  (display (map pair? all-grob-descriptions))
1912
1913 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1914
1915 (map (lambda (x)
1916        ;; (display (car x)) (newline)
1917
1918        (set-object-property! (car x) 'translation-type? list?)
1919        (set-object-property! (car x) 'is-grob? #t))
1920      all-grob-descriptions)
1921
1922 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1923