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