]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
ffe24ab280665ebdec5b9d4ded62c0a5909b4580
[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     (PhrasingSlur
1145      . ((details . ,default-slur-details)
1146
1147         (control-points . ,ly:slur::calc-control-points)
1148         (direction . ,ly:slur::calc-direction)
1149         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1150         (Y-extent . ,ly:slur::height)
1151         (stencil . ,ly:slur::print)                   
1152         
1153
1154         (thickness . 1.1)
1155         (minimum-length . 1.5)
1156         (height-limit . 2.0)
1157         (ratio . 0.333)
1158         (meta . ((class . Spanner)
1159                  (interfaces . (slur-interface))))))
1160
1161     (NonMusicalPaperColumn
1162      . (
1163         (axes . (0))
1164
1165         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1166         (X-extent . ,ly:axis-group-interface::width)
1167         ;;                    (stencil . ,ly:paper-column::print)
1168         
1169         (breakable . #t)
1170
1171         ;; debugging stuff: print column number.
1172         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1173
1174         (meta . ((class . Paper_column)
1175                  (interfaces . (paper-column-interface
1176                                 axis-group-interface
1177                                 spaceable-grob-interface))))))
1178
1179     (PercentRepeat
1180      . (
1181
1182         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1183         (stencil . ,ly:multi-measure-rest::percent)
1184
1185         (slope . 1.0)
1186         (thickness . 0.48)
1187         (font-encoding . fetaMusic)
1188         (meta . ((class . Spanner)
1189                  (interfaces . (multi-measure-rest-interface
1190                                 font-interface
1191                                 percent-repeat-interface))))))
1192     (PercentRepeatCounter
1193      . (
1194         (stencil . ,ly:text-interface::print)
1195         (X-offset . ,(ly:make-simple-closure
1196                       `(,+ ,(ly:make-simple-closure (list ly:self-alignment-interface::x-centered-on-y-parent))
1197                            ,(ly:make-simple-closure (list ly:self-alignment-interface::x-aligned-on-self)))))
1198         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1199         (self-alignment-X . 0)
1200         (direction . ,UP)
1201         (padding . 0.2)
1202         (staff-padding . 0.25)
1203         (font-size . -2) 
1204         (font-encoding . fetaNumber)
1205         (meta . ((class . Spanner)
1206                  (interfaces . (side-position-interface
1207                                 self-alignment-interface
1208                                 percent-repeat-interface
1209                                 font-interface
1210                                 text-interface))))))
1211
1212     ;; an example of a text spanner
1213     (PianoPedalBracket
1214      . (
1215
1216         (stencil . ,ly:piano-pedal-bracket::print)
1217
1218         (style . line)
1219         (bound-padding . 1.0)
1220         (direction . ,DOWN)
1221         (bracket-flare . (0.5 . 0.5))
1222         (edge-height . (1.0 . 1.0))
1223         (shorten-pair . (0.0 . 0.0))
1224         (thickness .  1.0)
1225         (meta . ((class . Spanner)
1226                  (interfaces . (line-interface
1227                                 piano-pedal-interface
1228                                 piano-pedal-bracket-interface))))))
1229
1230     (RehearsalMark
1231      . (
1232         (stencil . ,ly:text-interface::print)
1233         (X-offset . ,(ly:make-simple-closure
1234                       `(,+ ,(ly:make-simple-closure
1235                              `(,ly:self-alignment-interface::x-aligned-on-self))
1236                            ,(ly:make-simple-closure
1237                              `(,ly:self-alignment-interface::centered-on-x-parent)))
1238                       ))
1239         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1240         (self-alignment-X . 0)
1241         (direction . ,UP)
1242         (breakable . #t)
1243         (font-size . 2)
1244         (baseline-skip . 2)
1245         (break-visibility . ,end-of-line-invisible)
1246         (padding . 0.8)
1247         (meta . ((class . Item)
1248                  (interfaces . (text-interface
1249                                 side-position-interface
1250                                 font-interface
1251                                 mark-interface
1252                                 self-alignment-interface))))))
1253
1254
1255     (RepeatSlash
1256      . (
1257         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1258         (thickness . 0.48)
1259         (slope . 1.7)
1260         (meta . ((class . Item)
1261                  (interfaces . (percent-repeat-interface))))))
1262     (Rest
1263      . (
1264         (stencil . ,ly:rest::print)
1265         (X-extent . ,ly:rest::width)
1266         (Y-extent . ,ly:rest::height)
1267         (Y-offset . ,ly:rest::y-offset-callback)
1268         (minimum-distance . 0.25)
1269         (meta . ((class . Item)
1270                  (interfaces . (font-interface
1271                                 rhythmic-head-interface
1272                                 rhythmic-grob-interface
1273                                 staff-symbol-referencer-interface
1274                                 rest-interface))))))
1275
1276     (RestCollision
1277      . (
1278         (minimum-distance . 0.75)
1279         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1280                                         
1281         (meta . ((class . Item)
1282                  (interfaces . (rest-collision-interface))))))
1283
1284     (Script
1285      . (
1286         ;; don't set direction here: it breaks staccato.
1287
1288         ;; This value is sensitive: if too large, staccato dots will move a
1289         ;; space a away.
1290         (padding . 0.20)
1291         (staff-padding . 0.25)
1292         ;; (script-priority . 0) priorities for scripts, see script.scm
1293         (X-offset . , ly:self-alignment-interface::centered-on-x-parent)
1294         
1295
1296         (stencil . ,ly:script-interface::print)
1297         (direction . ,ly:script-interface::calc-direction)
1298
1299         (font-encoding . fetaMusic)
1300         (meta . ((class . Item)
1301                  (interfaces . (script-interface
1302                                 side-position-interface
1303                                 font-interface))))))
1304
1305     (ScriptColumn
1306      . (
1307
1308         (before-line-breaking . ,ly:script-column::before-line-breaking)
1309
1310         (meta . ((class . Item)
1311                  (interfaces . (script-column-interface))))))
1312
1313     (SeparationItem
1314      . (
1315         (X-extent . #f)
1316         (Y-extent . #f)
1317         (meta . ((class . Item)
1318                  (interfaces . (spacing-interface
1319                                 separation-item-interface))))))
1320
1321     (SeparatingGroupSpanner
1322      . (
1323
1324         (springs-and-rods . ,ly:separating-group-spanner::set-spacing-rods)
1325
1326         (meta . ((class . Spanner)
1327                  (interfaces . (only-prebreak-interface
1328                                 spacing-interface
1329                                 separation-spanner-interface))))))
1330
1331     (Slur
1332      . ((details . ,default-slur-details)
1333
1334         (control-points . ,ly:slur::calc-control-points)
1335         (direction . ,ly:slur::calc-direction)
1336         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1337         (Y-extent . ,ly:slur::height)
1338         (stencil . ,ly:slur::print)
1339         
1340         (thickness . 1.0)
1341         (minimum-length . 1.5)
1342                                         ; ly:slur::height)
1343         (height-limit . 2.0)
1344         (ratio . 0.25)
1345         (meta . ((class . Spanner)
1346                  (interfaces . (slur-interface))))))
1347
1348     (SpacingSpanner
1349      . (
1350
1351         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1352         (average-spacing-wishes . #t)
1353         (grace-space-factor . 0.6)
1354         (shortest-duration-space . 2.0)
1355         (spacing-increment . 1.2)
1356         (base-shortest-duration . ,(ly:make-moment 3 16))
1357         (meta . ((class . Spanner)
1358                  (interfaces . (spacing-interface
1359                                 spacing-spanner-interface))))))
1360
1361     (SpanBar
1362      . (
1363         (break-align-symbol . staff-bar)
1364         (Y-extent . ())
1365         (layer . 0)
1366         (breakable . #t)
1367
1368         (stencil . ,ly:span-bar::print)
1369         (bar-size . ,ly:span-bar::calc-bar-size)
1370         (X-extent . ,ly:span-bar::width)
1371         (glyph-name . ,ly:span-bar::calc-glyph-name)
1372         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1373
1374         ;; ugh duplication!
1375
1376         ;;
1377         ;; Ross. page 151 lists other values, we opt for a leaner look
1378         ;;
1379         (kern . 3.0)
1380         (thin-kern . 3.0)
1381         (hair-thickness . 1.6)
1382         (thick-thickness . 6.0)
1383         (meta . ((class . Item)
1384                  (interfaces . (span-bar-interface
1385                                 font-interface
1386                                 bar-line-interface))))))
1387
1388     (StanzaNumber
1389      . (
1390         (stencil . ,ly:text-interface::print)
1391
1392         (font-series . bold)
1393         (padding . 1.0)
1394         (X-offset . ,ly:side-position-interface::x-aligned-side)
1395         (side-axis . ,X)
1396         (direction . ,LEFT)
1397         (meta . ((class . Item)
1398                  (interfaces . (side-position-interface
1399                                 stanza-number-interface
1400                                 text-interface
1401                                 font-interface))))))
1402
1403     (StringNumber
1404      . (
1405
1406         (stencil . ,print-circled-text-callback)
1407
1408         (padding . 0.5)
1409         (staff-padding . 0.5)
1410         (self-alignment-X . 0)
1411         (self-alignment-Y . 0)
1412         (script-priority . 100)
1413         (font-encoding . fetaNumber)
1414         (font-size . -5)                ; don't overlap when next to heads.
1415         (meta . ((class . Item)
1416                  (interfaces . (string-number-interface
1417                                 font-interface
1418                                 text-script-interface
1419                                 text-interface
1420                                 side-position-interface
1421                                 self-alignment-interface
1422                                 item-interface))))))
1423
1424     (StaffSpacing
1425      . (
1426         (breakable . #t)
1427         (stem-spacing-correction . 0.4)
1428         (meta . ((class . Item)
1429                  (interfaces . (spacing-interface
1430                                 staff-spacing-interface))))))
1431
1432     (SostenutoPedal
1433      . (
1434
1435         (stencil . ,ly:text-interface::print)
1436
1437         (direction . ,RIGHT)
1438         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1439         (no-spacing-rods . #t)
1440         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1441         (font-shape . italic)
1442         (self-alignment-X . 0)
1443         (meta . ((class . Item)
1444                  (interfaces . (text-interface
1445                                 self-alignment-interface
1446                                 font-interface))))))
1447
1448     (SostenutoPedalLineSpanner
1449      . (
1450         (axes . (1))
1451
1452         (X-extent . ,ly:axis-group-interface::height)
1453
1454         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1455         (side-axis . ,Y)
1456
1457         (padding . 1.2)
1458         (minimum-space . 1.0)
1459         (direction . ,DOWN)
1460         (meta . ((class . Spanner)
1461                  (interfaces . (piano-pedal-interface
1462                                 axis-group-interface
1463                                 side-position-interface))))))
1464
1465     (StaffSymbol
1466      . (
1467         (Y-extent . ,ly:staff-symbol::height)
1468         (stencil . ,ly:staff-symbol::print)
1469         (line-count . 5)
1470         (ledger-line-thickness . (1.0 . 0.1))
1471         (layer . 0)
1472         (meta . ((class . Spanner)
1473                  (interfaces . (staff-symbol-interface))))))
1474
1475     (Stem
1476      . (
1477         (direction . ,ly:stem::calc-direction)
1478         (default-direction . ,ly:stem::calc-default-direction)
1479         (stem-end-position . ,ly:stem::calc-stem-end-position)
1480         (stem-info . ,ly:stem::calc-stem-info)
1481         (positioning-done . ,ly:stem::calc-positioning-done)
1482         (stencil . ,ly:stem::print)
1483         (X-extent . ,ly:stem::width)
1484         (Y-extent . ,ly:stem::height)
1485         (length . ,ly:stem::calc-length)
1486         
1487         (thickness . 1.3)
1488
1489         (details
1490          . (
1491             ;; 3.5 (or 3 measured from note head) is standard length
1492             ;; 32nd, 64th flagged stems should be longer
1493             (lengths . (3.5 3.5 3.5 4.5 5.0))
1494
1495             ;; FIXME.  3.5 yields too long beams (according to Ross and
1496             ;; looking at Baerenreiter examples) for a number of common
1497             ;; boundary cases.  Subtracting half a beam thickness fixes
1498             ;; this, but the bug may well be somewhere else.
1499
1500             ;; FIXME this should come from 'lengths
1501             (beamed-lengths . (3.26 3.5 3.6))
1502
1503             ;; The 'normal' minima
1504             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1505                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1506
1507             ;; The 'extreme case' minima
1508             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1509
1510             ;; Stems in unnatural (forced) direction should be shortened by
1511             ;; one staff space, according to [Roush & Gourlay].
1512             ;; Flagged stems we shorten only half a staff space.
1513             (stem-shorten . (1.0 0.5))
1514
1515             ))
1516
1517
1518         ;; default stem direction for note on middle line
1519         (neutral-direction . ,DOWN)
1520
1521         ;; We use the normal minima as minimum for the ideal lengths,
1522         ;; and the extreme minima as abolute minimum length.
1523
1524         (X-offset . ,ly:stem::offset-callback)
1525         (Y-offset . ,ly:staff-symbol-referencer::callback)
1526         (meta . ((class . Item)
1527                  (interfaces . (stem-interface
1528                                 font-interface))))))
1529
1530     (StemTremolo
1531      . (
1532         (Y-extent . ,ly:stem-tremolo::height)
1533         (stencil . ,ly:stem-tremolo::print)
1534         (X-extent . #f)
1535         (beam-width . 1.6) ; staff-space
1536         (beam-thickness . 0.48) ; staff-space
1537         (meta . ((class . Item)
1538                  (interfaces . (stem-tremolo-interface))))))
1539
1540     (SustainPedal
1541      . (
1542         (no-spacing-rods . #t)
1543         (stencil . ,ly:sustain-pedal::print)
1544         (self-alignment-X . 0)
1545         (direction . ,RIGHT)
1546         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1547         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1548         (meta . ((class . Item)
1549                  (interfaces . (piano-pedal-interface
1550                                 text-spanner-interface
1551                                 text-interface
1552                                 self-alignment-interface
1553                                 font-interface))))))
1554
1555     (SustainPedalLineSpanner
1556      . (
1557         (axes . (1))
1558         (X-extent . ,ly:axis-group-interface::height)
1559         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1560         (side-axis . ,Y)
1561         (padding . 1.2)
1562         (staff-padding . 1.2)
1563         (minimum-space . 1.0)
1564         (direction . ,DOWN)
1565         (meta . ((class . Spanner)
1566                  (interfaces . (piano-pedal-interface
1567                                 axis-group-interface
1568                                 side-position-interface))))))
1569
1570     (System
1571      . (
1572         (axes . (0 1))
1573         (X-extent . ,ly:axis-group-interface::width)
1574         (Y-extent . ,ly:axis-group-interface::height)
1575         (meta . ((class . System)
1576                  (interfaces . (system-interface
1577                                 axis-group-interface))))))
1578
1579     (SystemStartBrace
1580      . (
1581         (style . brace)
1582         (padding . 0.3)
1583         (stencil . ,ly:system-start-delimiter::print)
1584         (collapse-height . 5.0)
1585         (X-offset . ,ly:side-position-interface::x-aligned-side)
1586         (direction . ,LEFT)
1587         (font-encoding . fetaBraces)
1588         (Y-extent . #f)
1589         (meta . ((class . Spanner)
1590                  (interfaces . (system-start-delimiter-interface
1591                                 side-position-interface
1592                                 font-interface))))))
1593
1594
1595     (SystemStartSquare
1596      . (
1597         (Y-extent . #f)
1598         (X-offset . ,ly:side-position-interface::x-aligned-side)
1599         (direction . ,LEFT)
1600         (stencil . ,ly:system-start-delimiter::print)
1601         (style . line-bracket)
1602         (thickness . 1.0)
1603         (meta . ((class . Spanner)
1604                  (interfaces . (font-interface
1605                                 side-position-interface
1606                                 system-start-delimiter-interface))))))
1607     (SystemStartBracket
1608      . (
1609         (Y-extent . #f)
1610         (padding . 0.8)
1611         (X-offset . ,ly:side-position-interface::x-aligned-side)
1612         (direction . ,LEFT)
1613         (stencil . ,ly:system-start-delimiter::print)
1614         (style . bracket)
1615         (collapse-height . 5.0)
1616         (thickness . 0.45)
1617         (meta . ((class . Spanner)
1618                  (interfaces . (font-interface
1619                                 side-position-interface
1620                                 system-start-delimiter-interface))))))
1621
1622     (SystemStartBar
1623      . (
1624         (Y-extent . #f)
1625         (padding . 0.0)
1626         (X-offset . ,ly:side-position-interface::x-aligned-side)
1627         (direction . ,LEFT)
1628         (style . bar-line)
1629         (thickness . 1.6)
1630         (stencil . ,ly:system-start-delimiter::print)
1631         (meta . ((class . Spanner)
1632                  (interfaces . (side-position-interface
1633                                 system-start-delimiter-interface))))))
1634
1635
1636     (TabNoteHead
1637      . (
1638
1639         (stencil . ,ly:text-interface::print)
1640         (Y-offset . ,ly:staff-symbol-referencer::callback)
1641         (font-size . -2)
1642         (stem-attachment . (1.0 . 1.35))
1643         (font-series . bold)
1644         (meta . ((class . Item)
1645                  (interfaces
1646                   . (rhythmic-head-interface
1647                      font-interface rhythmic-grob-interface
1648                      note-head-interface
1649                      staff-symbol-referencer-interface
1650                      text-interface))))))
1651
1652     (TextScript
1653      . (
1654         (no-spacing-rods . #t)
1655         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1656         (direction . ,DOWN)
1657
1658         ;; sync with Fingering ?
1659         (padding . 0.5)
1660         (staff-padding . 0.5)
1661
1662         (stencil . ,ly:text-interface::print)
1663         (direction . ,ly:script-interface::calc-direction)
1664
1665         (avoid-slur . around)
1666         (slur-padding . 0.5)
1667         (script-priority . 200)
1668         ;; todo: add X self alignment?
1669         (meta . ((class . Item)
1670                  (interfaces . (text-script-interface
1671                                 text-interface
1672                                 side-position-interface
1673                                 font-interface))))))
1674
1675     (TextSpanner
1676      . (
1677         (stencil . ,ly:text-spanner::print)
1678         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1679         (font-shape . italic)
1680         (style . dashed-line)
1681         (staff-padding . 0.8)
1682         (dash-fraction . 0.2)
1683         (dash-period . 3.0)
1684         (side-axis . ,Y)
1685         (direction . ,UP)
1686         (meta . ((class . Spanner)
1687                  (interfaces . (text-spanner-interface
1688                                 side-position-interface
1689                                 font-interface))))))
1690
1691     (Tie
1692      . (
1693         (control-points . ,ly:tie::calc-control-points)
1694         (avoid-slur . inside)
1695         (direction . ,ly:tie::calc-direction)
1696         (stencil . ,ly:tie::print)
1697         (details . (
1698                     ;; for a full list, see tie-helper.cc
1699                     (ratio . 0.333)
1700                     (center-staff-line-clearance . 0.6)
1701                     (tip-staff-line-clearance . 0.45)
1702                     (note-head-gap . 0.2)
1703                     (stem-gap . 0.35)
1704                     (height-limit . 1.0)
1705                     (horizontal-distance-penalty-factor . 10)
1706                     (tie-tie-collision-distance . 0.45) 
1707                     (tie-tie-collision-penalty . 25.0)
1708                     (intra-space-threshold . 1.25)
1709                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
1710                     (outer-tie-length-symmetry-penalty-factor . 10)
1711                     (between-length-limit . 1.0)))
1712         (thickness . 1.0)
1713         (meta . ((class . Spanner)
1714                  (interfaces . (tie-interface))))
1715         ))
1716
1717     (TieColumn
1718      . (
1719         (positioning-done . ,ly:tie-column::calc-positioning-done)
1720         (before-line-breaking . ,ly:tie-column::before-line-breaking)
1721         (X-extent . #f)
1722         (Y-extent . #f)
1723         (meta . ((class . Spanner)
1724                  (interfaces . (tie-column-interface))))))
1725
1726     (TimeSignature
1727      . (
1728         (stencil . ,ly:time-signature::print)
1729         (break-align-symbol . time-signature)
1730         (break-visibility . ,all-visible)
1731         (space-alist . (
1732                         (first-note . (fixed-space . 2.0))
1733                         (right-edge . (extra-space . 0.5))
1734                         (staff-bar . (minimum-space . 2.0))))
1735         (breakable . #t)
1736         (style . C)
1737         (meta . ((class . Item)
1738                  (interfaces . (time-signature-interface
1739                                 break-aligned-interface
1740                                 font-interface))))))
1741
1742     (TrillSpanner
1743      . (
1744         (stencil . ,ly:dynamic-text-spanner::print)
1745         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1746                             ""))
1747         (style . trill)
1748         (staff-padding . 1.0)
1749         (padding . 0.5)
1750         (direction . ,UP)
1751         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1752         (side-axis . ,Y)
1753         (meta . ((class . Spanner)
1754                  (interfaces . (text-spanner-interface
1755                                 side-position-interface
1756                                 font-interface))))))
1757
1758     (TrillPitchAccidental
1759      . ((X-offset . ,ly:side-position-interface::x-aligned-side)
1760         (padding . 0.2)
1761         (direction . ,LEFT)
1762         (font-size . -4)
1763         (side-axis . ,X)
1764         (stencil . ,ly:accidental-interface::print)
1765         (meta . ((class . Item)
1766                  (interfaces . (item-interface
1767                                 accidental-interface
1768                                 side-position-interface
1769                                 font-interface))))))
1770
1771     (TrillPitchGroup
1772      . ((X-offset . ,ly:side-position-interface::x-aligned-side)
1773         (axes . (,X))
1774         (font-size . -4)
1775         (stencil . ,parenthesize-elements)
1776         (direction . ,RIGHT)
1777         (side-axis . ,X)
1778         (padding . 0.3)
1779         (meta . ((class . Item)
1780                  (interfaces . (side-position-interface
1781                                 note-head-interface
1782                                 rhythmic-head-interface
1783                                 font-interface
1784                                 accidental-interface
1785                                 axis-group-interface))))))
1786
1787     (TrillPitchHead
1788      . (
1789         (stencil . ,ly:note-head::print)
1790         (duration-log . 2)
1791         (Y-offset . ,ly:staff-symbol-referencer::callback)
1792         (font-size . -4)
1793         (meta . ((class . Item)
1794                  (interfaces . (item-interface
1795                                 rhythmic-head-interface
1796                                 font-interface
1797                                 pitched-trill-interface
1798                                 ledgered-interface
1799                                 staff-symbol-referencer-interface))))))
1800
1801     (TupletBracket
1802      . (
1803         (padding . 1.1)
1804         (thickness . 1.6)
1805         (edge-height . (0.7 . 0.7))
1806         (shorten-pair . (-0.2 . -0.2))
1807         (staff-padding . 0.25)
1808         
1809         (direction  . ,ly:tuplet-bracket::calc-direction)
1810         (positions . ,ly:tuplet-bracket::calc-positions)
1811         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1812         (control-points . ,ly:tuplet-bracket::calc-control-points)
1813         (stencil . ,ly:tuplet-bracket::print)
1814         
1815         (meta . ((class . Spanner)
1816                  (interfaces . (line-interface
1817                                 tuplet-bracket-interface))))))
1818
1819     (TupletNumber
1820      . (
1821         (stencil . ,ly:tuplet-number::print)
1822         (font-shape . italic)
1823         (font-size . -2)
1824         (avoid-slur . inside)
1825         (meta . ((class . Spanner)
1826                  (interfaces . (text-interface tuplet-number-interface
1827                                 font-interface))))))
1828     
1829     (UnaCordaPedal
1830      . (
1831         (stencil . ,ly:text-interface::print)
1832         (font-shape . italic)
1833         (no-spacing-rods . #t)
1834         (self-alignment-X . 0)
1835         (direction . ,RIGHT)
1836         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1837         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1838         (meta . ((class . Item)
1839                  (interfaces . (text-interface
1840                                 self-alignment-interface
1841                                 font-interface))))))
1842
1843     (UnaCordaPedalLineSpanner
1844      . (
1845         (axes . (1))
1846         (X-extent . ,ly:axis-group-interface::height)
1847         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1848         (side-axis . ,Y)
1849         (padding . 1.2)
1850         (staff-padding . 1.2)
1851         (minimum-space . 1.0)
1852         (direction . ,DOWN)
1853         (meta . ((class . Spanner)
1854                  (interfaces . (piano-pedal-interface
1855                                 axis-group-interface
1856                                 side-position-interface))))))
1857
1858     (VaticanaLigature
1859      . (
1860         (thickness . 0.6)
1861         (flexa-width . 2.0)
1862         (stencil . ,ly:vaticana-ligature::print)
1863         (meta . ((class . Spanner)
1864                  (interfaces . (vaticana-ligature-interface
1865                                 font-interface))))))
1866
1867     (VerticalAlignment
1868      . (
1869         (axes . (1))
1870         (positioning-done . ,ly:align-interface::calc-positioning-done)
1871         (after-line-breaking . ,ly:align-interface::stretch-after-break)
1872         (Y-extent . ,ly:axis-group-interface::height)
1873         (X-extent . ,ly:axis-group-interface::width)
1874         (stacking-dir . -1)
1875         (meta . ((class . Spanner)
1876                  (interfaces . (align-interface
1877                                 axis-group-interface))))))
1878     (VerticalAxisGroup
1879      . (
1880         (axes . (1))
1881         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
1882
1883         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
1884         (X-extent . ,ly:axis-group-interface::width)
1885         (meta . ((class . Spanner)
1886                  (interfaces . (axis-group-interface
1887                                 hara-kiri-group-interface
1888                                 vertically-spaceable-interface))))))
1889
1890
1891     (VoltaBracket
1892      . (
1893         (stencil . ,ly:volta-bracket-interface::print)
1894         (after-line-breaking . ,ly:volta-bracket-interface::after-line-breaking)
1895         (direction . ,UP)
1896         (padding . 1)
1897         (font-encoding . fetaNumber)
1898         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1899         (side-axis . ,Y)
1900         (thickness . 1.6)  ;;  line-thickness
1901         (edge-height . (2.0 . 2.0)) ;; staff-space;
1902         (minimum-space . 5)
1903         (font-size . -4)
1904         (meta . ((class . Spanner)
1905                  (interfaces . (volta-bracket-interface
1906                                 horizontal-bracket-interface                            
1907                                 line-interface
1908                                 text-interface
1909                                 side-position-interface
1910                                 font-interface)))
1911               )))
1912
1913
1914     (VoiceFollower
1915      . (
1916         (style . line)
1917         (gap . 0.5)
1918         (breakable . #t)
1919         (X-extent . #f)
1920         (Y-extent . #f)
1921         (stencil . ,ly:line-spanner::print)
1922         (after-line-breaking . ,ly:line-spanner::after-line-breaking)
1923         (meta . ((class . Spanner)
1924                  (interfaces . (line-spanner-interface
1925                                 line-interface))))
1926         ))
1927
1928 ))
1929
1930 (define (completize-grob-entry x)
1931   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1932 "
1933   ;;  (display (car x))
1934   ;;  (newline)
1935   (let* ((name-sym  (car x))
1936          (grob-entry (cdr x))
1937          (meta-entry (cdr (assoc 'meta grob-entry)))
1938          (class (cdr (assoc 'class meta-entry)))
1939          (ifaces-entry
1940           (cdr (assoc 'interfaces meta-entry))))
1941
1942     (cond
1943      ((eq? 'Item class)
1944       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1945      ((eq? 'Spanner class)
1946       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1947      ((eq? 'Paper_column class)
1948       (set! ifaces-entry (cons 'item-interface
1949                                (cons 'paper-column-interface ifaces-entry))))
1950      ((eq? 'System class)
1951       (set! ifaces-entry (cons 'system-interface
1952                                (cons 'spanner-interface ifaces-entry))))
1953      (else
1954       (ly:warning "Unknown class ~a" class)))
1955     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1956
1957     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1958     (set! meta-entry (assoc-set! meta-entry 'interfaces
1959                                  ifaces-entry))
1960     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1961     (cons name-sym grob-entry)))
1962
1963 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1964
1965 ;;  (display (map pair? all-grob-descriptions))
1966
1967 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1968
1969 (map (lambda (x)
1970        ;; (display (car x)) (newline)
1971
1972        (set-object-property! (car x) 'translation-type? list?)
1973        (set-object-property! (car x) 'is-grob? #t))
1974      all-grob-descriptions)
1975
1976 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1977