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