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