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