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