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