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