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