]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
* clef-key-distance.ly: add note.
[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 . 3.5))
425                         (key-signature . (minimum-space . 3.5))
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.15))
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         (X-offset . ,(ly:make-simple-closure
1100                       `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self))
1101                            ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent)))))
1102         
1103         (Y-offset . ,Side_position_interface::y_aligned_side)
1104
1105         (stencil . ,Text_interface::print)
1106
1107
1108         ;; no Y dimensions, because of lyrics under tenor clef.
1109         (Y-extent . (0 . 0))
1110         (font-shape . italic)
1111         (padding . 0.6)
1112         (staff-padding . 0.2)
1113         (font-size . -4)
1114         (meta . ((class . Item)
1115                  (interfaces . (text-interface
1116                                 self-alignment-interface
1117                                 side-position-interface
1118                                 font-interface))))))
1119
1120     (OttavaBracket
1121      . (
1122         (Y-offset . ,Side_position_interface::y_aligned_side)
1123
1124         (stencil . ,Ottava_bracket::print)
1125
1126         (font-shape . italic)
1127         (shorten-pair . (0.0 . -0.6))
1128         (staff-padding . 1.0)
1129         (padding . 0.5)
1130         (minimum-length . 1.0)
1131         (dash-fraction . 0.3)
1132         (edge-height . (0 . 1.2))
1133         (direction . 1)
1134         (meta . ((class . Spanner)
1135                  (interfaces . (ottava-bracket-interface
1136                                 horizontal-bracket-interface
1137                                 line-interface
1138                                 side-position-interface
1139                                 font-interface
1140                                 text-interface))))))
1141
1142     (PaperColumn
1143      . (
1144         (axes . (0))
1145
1146         (before-line-breaking . ,Paper_column::before_line_breaking)
1147         ;; (stencil . ,Paper_column::print)
1148         (X-extent . ,Axis_group_interface::width)
1149         
1150
1151         ;; debugging
1152         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1153         (meta . ((class . Paper_column)
1154                  (interfaces . (paper-column-interface
1155                                 axis-group-interface
1156                                 spaceable-grob-interface))))))
1157
1158     (PhrasingSlur
1159      . ((slur-details . ,default-slur-details)
1160
1161         (control-points . ,Slur::calc_control_points)
1162         (direction . ,Slur::calc_direction)
1163         (springs-and-rods . ,Spanner::set_spacing_rods)
1164         (Y-extent . ,Slur::height)
1165         (stencil . ,Slur::print)                      
1166         
1167
1168         (thickness . 1.1)
1169         (minimum-length . 1.5)
1170         (height-limit . 2.0)
1171         (ratio . 0.333)
1172         (meta . ((class . Spanner)
1173                  (interfaces . (slur-interface))))))
1174
1175     (NonMusicalPaperColumn
1176      . (
1177         (axes . (0))
1178
1179         (before-line-breaking . ,Paper_column::before_line_breaking)
1180         (X-extent . ,Axis_group_interface::width)
1181         ;;                    (stencil . ,Paper_column::print)
1182         
1183         (breakable . #t)
1184
1185         ;; debugging stuff: print column number.
1186         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1187
1188         (meta . ((class . Paper_column)
1189                  (interfaces . (paper-column-interface
1190                                 axis-group-interface
1191                                 spaceable-grob-interface))))))
1192
1193     (PercentRepeat
1194      . (
1195
1196         (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
1197         (stencil . ,Multi_measure_rest::percent)
1198
1199         (slope . 1.0)
1200         (thickness . 0.48)
1201         (font-encoding . fetaMusic)
1202         (meta . ((class . Spanner)
1203                  (interfaces . (multi-measure-rest-interface
1204                                 font-interface
1205                                 percent-repeat-interface))))))
1206     (PercentRepeatCounter
1207      . (
1208         (stencil . ,Text_interface::print)
1209         (X-offset . ,(ly:make-simple-closure
1210                       `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent))
1211                            ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
1212         (Y-offset . ,Side_position_interface::y_aligned_side)
1213         (self-alignment-X . 0)
1214         (direction . 1)
1215         (padding . 0.2)
1216         (staff-padding . 0.25)
1217         (font-size . -2) 
1218         (font-encoding . fetaNumber)
1219         (meta . ((class . Spanner)
1220                  (interfaces . (side-position-interface
1221                                 self-alignment-interface
1222                                 percent-repeat-interface
1223                                 font-interface
1224                                 text-interface))))))
1225
1226     ;; an example of a text spanner
1227     (PianoPedalBracket
1228      . (
1229
1230         (stencil . ,Piano_pedal_bracket::print)
1231
1232         (style . line)
1233         (bound-padding . 1.0)
1234         (direction . -1)
1235         (bracket-flare . (0.5 . 0.5))
1236         (edge-height . (1.0 . 1.0))
1237         (shorten-pair . (0.0 . 0.0))
1238         (thickness .  1.0)
1239         (meta . ((class . Spanner)
1240                  (interfaces . (line-interface
1241                                 piano-pedal-interface
1242                                 piano-pedal-bracket-interface))))))
1243
1244     (RehearsalMark
1245      . (
1246
1247         (stencil . ,Text_interface::print)
1248
1249         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1250         (Y-offset . ,Side_position_interface::y_aligned_side)
1251
1252         (after-line-breaking . ,shift-right-at-line-begin)
1253
1254         (self-alignment-X . 0)
1255         (direction . 1)
1256         (breakable . #t)
1257         (font-size . 2)
1258         (baseline-skip . 2)
1259         (break-visibility . ,end-of-line-invisible)
1260         (padding . 0.8)
1261         (meta . ((class . Item)
1262                  (interfaces . (text-interface
1263                                 side-position-interface
1264                                 font-interface
1265                                 mark-interface
1266                                 self-alignment-interface))))))
1267
1268
1269     (RepeatSlash
1270      . (
1271
1272         (stencil . ,Percent_repeat_item_interface::beat_slash)
1273
1274         (thickness . 0.48)
1275         (slope . 1.7)
1276         (meta . ((class . Item)
1277                  (interfaces . (percent-repeat-interface))))))
1278     (Rest
1279      . (
1280
1281         (stencil . ,Rest::print)
1282         (X-extent . ,Rest::width)
1283         (Y-extent . ,Rest::height)
1284         (Y-offset . ,Rest::y_offset_callback)
1285         (minimum-distance . 0.25)
1286         (meta . ((class . Item)
1287                  (interfaces . (font-interface
1288                                 rhythmic-head-interface
1289                                 rhythmic-grob-interface
1290                                 staff-symbol-referencer-interface
1291                                 rest-interface))))))
1292
1293     (RestCollision
1294      . (
1295         (minimum-distance . 0.75)
1296         (positioning-done . ,Rest_collision::calc_positioning_done)
1297                                         
1298         (meta . ((class . Item)
1299                  (interfaces . (rest-collision-interface))))))
1300
1301     (Script
1302      . (
1303         ;; don't set direction here: it breaks staccato.
1304
1305         ;; This value is sensitive: if too large, staccato dots will move a
1306         ;; space a away.
1307         (padding . 0.20)
1308         (staff-padding . 0.25)
1309         ;; (script-priority . 0) priorities for scripts, see script.scm
1310         (X-offset . ,Self_alignment_interface::centered_on_x_parent)
1311
1312         (stencil . ,Script_interface::print)
1313         (direction . ,Script_interface::calc_direction)
1314
1315         (font-encoding . fetaMusic)
1316         (meta . ((class . Item)
1317                  (interfaces . (script-interface
1318                                 side-position-interface
1319                                 font-interface))))))
1320
1321     (ScriptColumn
1322      . (
1323
1324         (before-line-breaking . ,Script_column::before_line_breaking)
1325
1326         (meta . ((class . Item)
1327                  (interfaces . (script-column-interface))))))
1328
1329     (SeparationItem
1330      . (
1331         (X-extent . #f)
1332         (Y-extent . #f)
1333         (meta . ((class . Item)
1334                  (interfaces . (spacing-interface
1335                                 separation-item-interface))))))
1336
1337     (SeparatingGroupSpanner
1338      . (
1339
1340         (springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1341
1342         (meta . ((class . Spanner)
1343                  (interfaces . (only-prebreak-interface
1344                                 spacing-interface
1345                                 separation-spanner-interface))))))
1346
1347     (Slur
1348      . ((slur-details . ,default-slur-details)
1349
1350         (control-points . ,Slur::calc_control_points)
1351         (direction . ,Slur::calc_direction)
1352         (springs-and-rods . ,Spanner::set_spacing_rods)
1353         (Y-extent . ,Slur::height)
1354         (stencil . ,Slur::print)
1355         
1356         (thickness . 1.0)
1357         (minimum-length . 1.5)
1358                                         ; Slur::height)
1359         (height-limit . 2.0)
1360         (ratio . 0.25)
1361         (meta . ((class . Spanner)
1362                  (interfaces . (slur-interface))))))
1363
1364     (SpacingSpanner
1365      . (
1366
1367         (springs-and-rods . ,Spacing_spanner::set_springs)
1368
1369         (grace-space-factor . 0.6)
1370         (shortest-duration-space . 2.0)
1371         (spacing-increment . 1.2)
1372         (base-shortest-duration . ,(ly:make-moment 3 16))
1373         (meta . ((class . Spanner)
1374                  (interfaces . (spacing-interface
1375                                 spacing-spanner-interface))))))
1376
1377     (SpanBar
1378      . (
1379         (break-align-symbol . staff-bar)
1380         (Y-extent . ())
1381         (layer . 0)
1382         (breakable . #t)
1383
1384         (stencil . ,Span_bar::print)
1385         (bar-size . ,Span_bar::calc_bar_size)
1386         (X-extent . ,Span_bar::width)
1387         (glyph-name . ,Span_bar::calc_glyph_name)
1388         (before-line-breaking . ,Span_bar::before_line_breaking)
1389
1390         ;; ugh duplication!
1391
1392         ;;
1393         ;; Ross. page 151 lists other values, we opt for a leaner look
1394         ;;
1395         (kern . 3.0)
1396         (thin-kern . 3.0)
1397         (hair-thickness . 1.6)
1398         (thick-thickness . 6.0)
1399         (meta . ((class . Item)
1400                  (interfaces . (span-bar-interface
1401                                 font-interface
1402                                 bar-line-interface))))))
1403
1404     (StanzaNumber
1405      . (
1406         (stencil . ,Text_interface::print)
1407
1408         (font-series . bold)
1409         (padding . 1.0)
1410         (X-offset . ,Side_position_interface::x_aligned_side)
1411         (direction . ,LEFT)
1412         (meta . ((class . Item)
1413                  (interfaces . (side-position-interface
1414                                 stanza-number-interface
1415                                 text-interface
1416                                 font-interface))))))
1417
1418     (StringNumber
1419      . (
1420
1421         (stencil . ,print-circled-text-callback)
1422
1423         (padding . 0.5)
1424         (staff-padding . 0.5)
1425         (self-alignment-X . 0)
1426         (self-alignment-Y . 0)
1427         (script-priority . 100)
1428         (font-encoding . fetaNumber)
1429         (font-size . -5)                ; don't overlap when next to heads.
1430         (meta . ((class . Item)
1431                  (interfaces . (string-number-interface
1432                                 font-interface
1433                                 text-script-interface
1434                                 text-interface
1435                                 side-position-interface
1436                                 self-alignment-interface
1437                                 item-interface))))))
1438
1439     (StaffSpacing
1440      . (
1441         (breakable . #t)
1442         (stem-spacing-correction . 0.4)
1443         (meta . ((class . Item)
1444                  (interfaces . (spacing-interface
1445                                 staff-spacing-interface))))))
1446
1447     (SostenutoPedal
1448      . (
1449
1450         (stencil . ,Text_interface::print)
1451
1452         (direction . 1)
1453         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1454         (no-spacing-rods . #t)
1455         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1456         (font-shape . italic)
1457         (self-alignment-X . 0)
1458         (meta . ((class . Item)
1459                  (interfaces . (text-interface
1460                                 self-alignment-interface
1461                                 font-interface))))))
1462
1463     (SostenutoPedalLineSpanner
1464      . (
1465         (axes . (1))
1466
1467         (X-extent . ,Axis_group_interface::height)
1468
1469         (Y-offset . ,Side_position_interface::y_aligned_side)
1470
1471         (padding . 1.2)
1472         (minimum-space . 1.0)
1473         (direction . -1)
1474         (meta . ((class . Spanner)
1475                  (interfaces . (piano-pedal-interface
1476                                 axis-group-interface
1477                                 side-position-interface))))))
1478
1479     (StaffSymbol
1480      . (
1481
1482         (stencil . ,Staff_symbol::print)
1483
1484         (line-count . 5)
1485         (ledger-line-thickness . (1.0 . 0.1))
1486         (layer . 0)
1487         (meta . ((class . Spanner)
1488                  (interfaces . (staff-symbol-interface))))))
1489
1490     (Stem
1491      . (
1492         (direction . ,Stem::calc_direction)
1493         (stem-end-position . ,Stem::calc_stem_end_position)
1494         (stem-info . ,Stem::calc_stem_info)
1495         (positioning-done . ,Stem::calc_positioning_done)
1496         (stencil . ,Stem::print)
1497         (X-extent . ,Stem::width)
1498         (Y-extent . ,Stem::height)
1499         (length . ,Stem::calc_length)
1500         
1501         (thickness . 1.3)
1502
1503         (details
1504          . (
1505             ;; 3.5 (or 3 measured from note head) is standard length
1506             ;; 32nd, 64th flagged stems should be longer
1507             (lengths . (3.5 3.5 3.5 4.5 5.0))
1508
1509             ;; FIXME.  3.5 yields too long beams (according to Ross and
1510             ;; looking at Baerenreiter examples) for a number of common
1511             ;; boundary cases.  Subtracting half a beam thickness fixes
1512             ;; this, but the bug may well be somewhere else.
1513
1514             ;; FIXME this should come from 'lengths
1515             (beamed-lengths . (3.26 3.5 3.6))
1516
1517             ;; The 'normal' minima
1518             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1519                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1520
1521             ;; The 'extreme case' minima
1522             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1523
1524             ;; Stems in unnatural (forced) direction should be shortened by
1525             ;; one staff space, according to [Roush & Gourlay].
1526             ;; Flagged stems we shorten only half a staff space.
1527             (stem-shorten . (1.0 0.5))
1528
1529             ))
1530
1531
1532         ;; default stem direction for note on middle line
1533         (neutral-direction . -1)
1534
1535         ;; We use the normal minima as minimum for the ideal lengths,
1536         ;; and the extreme minima as abolute minimum length.
1537
1538         (X-offset . ,Stem::offset_callback)
1539         (Y-offset . ,Staff_symbol_referencer::callback)
1540         (meta . ((class . Item)
1541                  (interfaces . (stem-interface
1542                                 font-interface))))))
1543
1544     (StemTremolo
1545      . (
1546         (Y-extent . ,Stem_tremolo::height)
1547         (stencil . ,Stem_tremolo::print)
1548         (X-extent . #f)
1549         (beam-width . 1.6) ; staff-space
1550         (beam-thickness . 0.48) ; staff-space
1551         (meta . ((class . Item)
1552                  (interfaces . (stem-tremolo-interface))))))
1553
1554     (SustainPedal
1555      . (
1556         (no-spacing-rods . #t)
1557         (stencil . ,Sustain_pedal::print)
1558         (self-alignment-X . 0)
1559         (direction . 1)
1560         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1561         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1562         (meta . ((class . Item)
1563                  (interfaces . (piano-pedal-interface
1564                                 text-spanner-interface
1565                                 text-interface
1566                                 self-alignment-interface
1567                                 font-interface))))))
1568
1569     (SustainPedalLineSpanner
1570      . (
1571         (axes . (1))
1572         (X-extent . ,Axis_group_interface::height)
1573         (Y-offset . ,Side_position_interface::y_aligned_side)
1574         (padding . 1.2)
1575         (staff-padding . 1.2)
1576         (minimum-space . 1.0)
1577         (direction . -1)
1578         (meta . ((class . Spanner)
1579                  (interfaces . (piano-pedal-interface
1580                                 axis-group-interface
1581                                 side-position-interface))))))
1582
1583     (System
1584      . (
1585         (axes . (0 1))
1586         (X-extent . ,Axis_group_interface::width)
1587         (Y-extent . ,Axis_group_interface::height)
1588         (meta . ((class . System)
1589                  (interfaces . (system-interface
1590                                 axis-group-interface))))))
1591
1592     (SystemStartBrace
1593      . (
1594         (glyph . "brace")
1595         (stencil . ,System_start_delimiter::print)
1596         (collapse-height . 5.0)
1597         (font-encoding . fetaBraces)
1598         (Y-extent . #f)
1599         (meta . ((class . Spanner)
1600                  (interfaces . (system-start-delimiter-interface
1601                                 font-interface))))))
1602
1603     (SystemStartBracket
1604      . (
1605         (Y-extent . #f)
1606         (X-offset . -0.8)
1607         (stencil . ,System_start_delimiter::print)
1608         (glyph . "bracket")
1609         (collapse-height . 5.0)
1610         (thickness . 0.45)
1611         (meta . ((class . Spanner)
1612                  (interfaces . (font-interface
1613                                 system-start-delimiter-interface))))))
1614
1615     (SystemStartBar
1616      . (
1617         (Y-extent . #f)
1618         (glyph . "bar-line")
1619         (thickness . 1.6)
1620         (stencil . ,System_start_delimiter::print)
1621         (meta . ((class . Spanner)
1622                  (interfaces . (system-start-delimiter-interface))))))
1623
1624     (TabNoteHead
1625      . (
1626
1627         (stencil . ,Text_interface::print)
1628         (Y-offset . ,Staff_symbol_referencer::callback)
1629         (font-size . -2)
1630         (stem-attachment . (1.0 . 1.35))
1631         (font-series . bold)
1632         (meta . ((class . Item)
1633                  (interfaces
1634                   . (rhythmic-head-interface
1635                      font-interface
1636                      note-head-interface
1637                      staff-symbol-referencer-interface
1638                      text-interface))))))
1639
1640     (TextScript
1641      . (
1642         (no-spacing-rods . #t)
1643         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1644         (direction . -1)
1645
1646         ;; sync with Fingering ?
1647         (padding . 0.5)
1648         (staff-padding . 0.5)
1649
1650         (stencil . ,Text_interface::print)
1651         (direction . ,Script_interface::calc_direction)
1652
1653         (avoid-slur . around)
1654         (slur-padding . 0.5)
1655         (script-priority . 200)
1656         ;; todo: add X self alignment?
1657         (meta . ((class . Item)
1658                  (interfaces . (text-script-interface
1659                                 text-interface
1660                                 side-position-interface
1661                                 font-interface))))))
1662
1663     (TextSpanner
1664      . (
1665         (stencil . ,Text_spanner::print)
1666         (font-shape . italic)
1667         (style . dashed-line)
1668         (staff-padding . 0.8)
1669         (dash-fraction . 0.2)
1670         (dash-period . 3.0)
1671         (direction . 1)
1672         (meta . ((class . Spanner)
1673                  (interfaces . (text-spanner-interface
1674                                 side-position-interface
1675                                 font-interface))))))
1676
1677     (Tie
1678      . (
1679         (control-points . ,Tie::calc_control_points)
1680         (direction . ,Tie::calc_direction)
1681         (stencil . ,Tie::print)
1682         (details . ((ratio . 0.333)
1683                     (height-limit . 1.0)
1684                     (between-length-limit . 1.0)))
1685         (thickness . 1.0)
1686         (meta . ((class . Spanner)
1687                  (interfaces . (tie-interface))))
1688         ))
1689
1690     (TieColumn
1691      . (
1692         (positioning-done . ,Tie_column::calc_positioning_done)
1693         (before-line-breaking . ,Tie_column::before_line_breaking)
1694         (X-extent . #f)
1695         (Y-extent . #f)
1696         (meta . ((class . Spanner)
1697                  (interfaces . (tie-column-interface))))))
1698
1699     (TimeSignature
1700      . (
1701         (stencil . ,Time_signature::print)
1702         (break-align-symbol . time-signature)
1703         (break-visibility . ,all-visible)
1704         (space-alist . (
1705                         (first-note . (fixed-space . 2.0))
1706                         (right-edge . (extra-space . 0.5))
1707                         (staff-bar . (minimum-space . 2.0))))
1708         (breakable . #t)
1709         (style . C)
1710         (meta . ((class . Item)
1711                  (interfaces . (time-signature-interface
1712                                 break-aligned-interface
1713                                 font-interface))))))
1714
1715     (TrillSpanner
1716      . (
1717         (stencil . ,Dynamic_text_spanner::print)
1718         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1719                             ""))
1720         (style . trill)
1721         (staff-padding . 1.0)
1722         (padding . 0.5)
1723         (direction . 1)
1724         (Y-offset . ,Side_position_interface::y_aligned_side)
1725         (meta . ((class . Spanner)
1726                  (interfaces . (text-spanner-interface
1727                                 side-position-interface
1728                                 font-interface))))))
1729
1730     (TrillPitchAccidental
1731      . ((X-offset . ,Side_position_interface::x_aligned_side)
1732         (padding . 0.2)
1733         (direction . ,LEFT)
1734         (font-size . -4)
1735         (stencil . ,Accidental_interface::print)
1736         (meta . ((class . Item)
1737                  (interfaces . (item-interface
1738                                 accidental-interface
1739                                 side-position-interface
1740                                 font-interface))))))
1741
1742     (TrillPitchGroup
1743      . ((X-offset . ,Side_position_interface::x_aligned_side)
1744         (axes . (,X))
1745         (font-size . -4)
1746         (stencil . ,parenthesize-elements)
1747         (direction . ,RIGHT)
1748         (padding . 0.3)
1749         (meta . ((class . Item)
1750                  (interfaces . (side-position-interface
1751                                 note-head-interface
1752                                 rhythmic-head-interface
1753                                 font-interface
1754                                 accidental-interface
1755                                 axis-group-interface))))))
1756
1757     (TrillPitchHead
1758      . (
1759         (stencil . ,Note_head::print)
1760         (duration-log . 2)
1761         (Y-offset . ,Staff_symbol_referencer::callback)
1762         (font-size . -4)
1763         (meta . ((class . Item)
1764                  (interfaces . (item-interface
1765                                 rhythmic-head-interface
1766                                 font-interface
1767                                 pitched-trill-interface
1768                                 ledgered-interface
1769                                 staff-symbol-referencer-interface))))))
1770
1771     (TupletBracket
1772      . (
1773         (padding . 1.1)
1774         (thickness . 1.6)
1775         (edge-height . (0.7 . 0.7))
1776         (shorten-pair . (-0.2 . -0.2))
1777         (direction  . ,Tuplet_bracket::calc_direction)
1778         (positions . ,Tuplet_bracket::calc_positions)
1779         (stencil . ,Tuplet_bracket::print)
1780         (font-shape . italic)
1781         (font-size . -2)
1782         (meta . ((class . Spanner)
1783                  (interfaces . (text-interface
1784                                 line-interface
1785                                 tuplet-bracket-interface
1786                                 font-interface))))))
1787
1788     (UnaCordaPedal
1789      . (
1790         (stencil . ,Text_interface::print)
1791         (font-shape . italic)
1792         (no-spacing-rods . #t)
1793         (self-alignment-X . 0)
1794         (direction . 1)
1795         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1796         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1797         (meta . ((class . Item)
1798                  (interfaces . (text-interface
1799                                 self-alignment-interface
1800                                 font-interface))))))
1801
1802     (UnaCordaPedalLineSpanner
1803      . (
1804         (axes . (1))
1805         (X-extent . ,Axis_group_interface::height)
1806         (Y-offset . ,Side_position_interface::y_aligned_side)
1807         (padding . 1.2)
1808         (staff-padding . 1.2)
1809         (minimum-space . 1.0)
1810         (direction . -1)
1811         (meta . ((class . Spanner)
1812                  (interfaces . (piano-pedal-interface
1813                                 axis-group-interface
1814                                 side-position-interface))))))
1815
1816     (VaticanaLigature
1817      . (
1818         (thickness . 0.6)
1819         (flexa-width . 2.0)
1820         (stencil . ,Vaticana_ligature::print)
1821         (meta . ((class . Spanner)
1822                  (interfaces . (vaticana-ligature-interface
1823                                 font-interface))))))
1824
1825     (VerticalAlignment
1826      . (
1827         (axes . (1))
1828         (positioning-done . ,Align_interface::calc_positioning_done)
1829         (after-line-breaking . ,Align_interface::stretch_after_break)
1830         (Y-extent . ,Axis_group_interface::height)
1831         (X-extent . ,Axis_group_interface::width)
1832         (stacking-dir . -1)
1833         (meta . ((class . Spanner)
1834                  (interfaces . (align-interface
1835                                 axis-group-interface))))))
1836     (VerticalAxisGroup
1837      . (
1838         (axes . (1))
1839         (Y-offset . ,Hara_kiri_group_spanner::force_hara_kiri_callback)
1840         (Y-extent . ,Hara_kiri_group_spanner::y_extent)
1841         (X-extent . ,Axis_group_interface::width)
1842         (meta . ((class . Spanner)
1843                  (interfaces . (axis-group-interface
1844                                 hara-kiri-group-interface
1845                                 vertically-spaceable-interface))))))
1846
1847     (VocalName
1848      . (
1849         (breakable . #t)
1850         (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
1851         (direction . 0)
1852         (space-alist . ((left-edge . (extra-space . 1.0))))
1853         (break-align-symbol . instrument-name)
1854         (stencil . ,Text_interface::print)
1855         (break-align-symbol . clef)
1856         (break-visibility . ,begin-of-line-visible)
1857         (baseline-skip . 2)
1858         (meta . ((class . Item)
1859                  (interfaces . (font-interface
1860                                 self-alignment-interface
1861                                 side-position-interface
1862                                 text-interface
1863                                 break-aligned-interface))))))
1864
1865     (VoltaBracket
1866      . (
1867         (stencil . ,Volta_bracket_interface::print)
1868         (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)
1869         (direction . ,UP)
1870         (padding . 1)
1871         (font-encoding . fetaNumber)
1872         (Y-offset . ,Side_position_interface::y_aligned_side)
1873         (thickness . 1.6)  ;;  linethickness
1874         (edge-height . (2.0 . 2.0)) ;; staffspace;
1875         (minimum-space . 5)
1876         (font-size . -4)
1877         (meta . ((class . Spanner)
1878                  (interfaces . (volta-bracket-interface
1879                                 horizontal-bracket-interface                            
1880                                 line-interface
1881                                 text-interface
1882                                 side-position-interface
1883                                 font-interface)))
1884               )))
1885
1886
1887     (VoiceFollower
1888      . (
1889         (style . line)
1890         (gap . 0.5)
1891         (breakable . #t)
1892         (X-extent . #f)
1893         (Y-extent . #f)
1894         (stencil . ,Line_spanner::print)
1895         (after-line-breaking . ,Line_spanner::after_line_breaking)
1896         (meta . ((class . Spanner)
1897                  (interfaces . (line-spanner-interface
1898                                 line-interface))))
1899         ))
1900
1901 ))
1902
1903 (define (completize-grob-entry x)
1904   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1905 "
1906   ;;  (display (car x))
1907   ;;  (newline)
1908   (let* ((name-sym  (car x))
1909          (grob-entry (cdr x))
1910          (meta-entry (cdr (assoc 'meta grob-entry)))
1911          (class (cdr (assoc 'class meta-entry)))
1912          (ifaces-entry
1913           (cdr (assoc 'interfaces meta-entry))))
1914
1915     (cond
1916      ((eq? 'Item class)
1917       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1918      ((eq? 'Spanner class)
1919       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1920      ((eq? 'Paper_column class)
1921       (set! ifaces-entry (cons 'item-interface
1922                                (cons 'paper-column-interface ifaces-entry))))
1923      ((eq? 'System class)
1924       (set! ifaces-entry (cons 'system-interface
1925                                (cons 'spanner-interface ifaces-entry))))
1926      (else
1927       (ly:warning "Unknown class ~a" class)))
1928     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1929
1930     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1931     (set! meta-entry (assoc-set! meta-entry 'interfaces
1932                                  ifaces-entry))
1933     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1934     (cons name-sym grob-entry)))
1935
1936 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1937
1938 ;;  (display (map pair? all-grob-descriptions))
1939
1940 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1941
1942 (map (lambda (x)
1943        ;; (display (car x)) (newline)
1944
1945        (set-object-property! (car x) 'translation-type? list?)
1946        (set-object-property! (car x) 'is-grob? #t))
1947      all-grob-descriptions)
1948
1949 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1950