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