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