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