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