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