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