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