]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
* lily/tuplet-bracket.cc (print): suicide if no control-points.
[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         (avoid-slur . avoid)
597         (no-spacing-rods . #t)
598         (script-priority . 100)
599         (meta . ((class . Item)
600                  (interfaces . (font-interface
601                                 text-interface
602                                 self-alignment-interface
603                                 dynamic-interface
604                                 script-interface))))))
605
606     (DynamicTextSpanner
607      . (
608
609         (stencil . ,Dynamic_text_spanner::print)
610
611         ;; rather ugh with NCSB
612         ;; (font-series . bold)
613         (font-shape . italic)
614         (style . dashed-line)
615
616         ;; need to blend with dynamic texts.
617         (font-size . 1)
618         (bound-padding . 0.75)
619         (dash-fraction . 0.2)
620         (dash-period . 3.0)
621         (meta . ((class . Spanner)
622                  (interfaces . (font-interface
623                                 text-interface
624                                 dynamic-interface
625                                 dynamic-text-spanner-interface
626                                 spanner-interface))))))
627
628     (Fingering
629      . (
630
631         ;; sync with TextScript (?)
632
633         (padding . 0.5)
634         (avoid-slur . around)
635         (slur-padding . 0.2)
636         (staff-padding . 0.5)
637         (self-alignment-X . 0)
638         (self-alignment-Y . 0)
639         (script-priority . 100)
640
641         (stencil . ,Text_interface::print)
642         (direction . ,Script_interface::calc_direction)
643
644         (font-encoding . fetaNumber)
645         (font-size . -5)                ; don't overlap when next to heads.
646         (meta . ((class . Item)
647                  (interfaces . (finger-interface
648                                 font-interface
649                                 text-script-interface
650                                 text-interface
651                                 side-position-interface
652                                 self-alignment-interface
653                                 item-interface))))))
654     (Glissando
655      . (
656         (style . line)
657         (gap . 0.5)
658         (zigzag-width . 0.75)
659         (breakable . #t)
660         (X-extent . #f)
661         (Y-extent . #f)
662
663         (stencil . ,Line_spanner::print)
664         (after-line-breaking . ,Line_spanner::after_line_breaking)
665         
666
667         (meta . ((class . Spanner)
668                  (interfaces . (line-interface
669                                 line-spanner-interface))))))
670
671     (GridPoint
672      . (
673         (X-extent . (0 . 0))
674         (Y-extent . (0 . 0))
675         (meta . ((class . Item)
676                  (interfaces . (grid-point-interface))))))
677
678     (GridLine
679      . (
680
681         (X-extent  . ,Grid_line_interface::width)
682         (stencil . ,Grid_line_interface::print)
683
684         (self-alignment-X . ,CENTER)
685         (X-offset . ,(ly:make-simple-closure
686                       `(,+  ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent))
687                             ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
688         (layer . 0)
689         (meta . ((class . Item)
690                  (interfaces . (self-alignment-interface
691                                 grid-line-interface))))))
692
693     (Hairpin
694      . (
695
696
697         (stencil . ,Hairpin::print)
698         (springs-and-rods . ,Spanner::set_spacing_rods)
699         (after-line-breaking . ,Hairpin::after_line_breaking)
700
701         (thickness . 1.0)
702         (height . 0.6666)
703         (minimum-length . 2.0)
704         (bound-padding . 1.0)
705         (self-alignment-Y . 0)
706         (Y-offset . ,Self_alignment_interface::y_aligned_on_self)
707         (meta . ((class . Spanner)
708                  (interfaces . (hairpin-interface
709                                 line-interface
710                                 self-alignment-interface
711                                 dynamic-interface
712                                 spanner-interface))))))
713
714     (HorizontalBracket
715      . (
716         (thickness . 1.0)
717         (stencil . ,Horizontal_bracket::print)
718         (Y-offset . ,Side_position_interface::y_aligned_side)
719         (padding . 0.2)
720         (staff-padding . 0.2)
721         (direction . -1)
722         (side-axis . ,Y)
723         (bracket-flare . (0.5 . 0.5))
724         (meta . ((class . Spanner)
725                  (interfaces . (horizontal-bracket-interface
726                                 side-position-interface
727                                 line-interface
728                                 spanner-interface))))))
729     (InstrumentName
730      . (
731         (breakable . #t)
732         (Y-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::y_aligned_on_self))
733                                                   ,(ly:make-simple-closure (list Side_position_interface::y_aligned_on_support_refpoints)))))
734         
735         ;; This direction is for aligned_on_support_refpoints
736         ;; (?) --hwn
737         (direction . 0)
738         (space-alist . (
739                         (left-edge . (extra-space . 1.0))))
740
741         (self-alignment-Y . 0)
742         (stencil . ,Text_interface::print)
743         (break-align-symbol . instrument-name)
744         (break-visibility . ,begin-of-line-visible)
745         (baseline-skip . 2)
746         (side-axis . ,X)
747         (meta . ((class . Item)
748                  (interfaces . (font-interface
749                                 self-alignment-interface
750                                 side-position-interface
751                                 text-interface
752                                 break-aligned-interface))))))
753
754     (KeyCancellation
755      . (
756
757         (stencil . ,Key_signature_interface::print)
758
759         (space-alist . (
760                         (time-signature . (extra-space . 1.25))
761                         (staff-bar . (extra-space . 0.6))
762                         (key-signature . (extra-space . 0.5))
763                         (right-edge . (extra-space . 0.5))
764                         (first-note . (fixed-space . 2.5))))
765         (Y-offset . ,Staff_symbol_referencer::callback)
766         (break-align-symbol . key-cancellation)
767         (break-visibility . ,begin-of-line-invisible)
768         (breakable . #t)
769
770         (meta . ((class . Item)
771                  (interfaces . (key-signature-interface
772                                 font-interface
773                                 break-aligned-interface))))))
774     (KeySignature
775      . (
776
777         (stencil . ,Key_signature_interface::print)
778
779         (space-alist . (
780                         (time-signature . (extra-space . 1.15))
781                         (staff-bar . (extra-space . 1.1))
782                         (right-edge . (extra-space . 0.5))
783                         (first-note . (fixed-space . 2.5))))
784         (Y-offset . ,Staff_symbol_referencer::callback)
785         (break-align-symbol . key-signature)
786         (break-visibility . ,begin-of-line-visible)
787         (breakable . #t)
788
789         (meta . ((class . Item)
790                  (interfaces . (key-signature-interface
791                                 font-interface
792                                 break-aligned-interface))))))
793     (LaissezVibrerTie
794      . (
795
796         (stencil  . ,Tie::print)
797         (control-points . ,Laissez_vibrer_tie::calc_control_points)
798         (direction . ,Laissez_vibrer_tie::calc_direction)
799         
800         (details . ((ratio . 0.333)
801                     (height-limit . 1.0)))
802         (thickness . 1.0)
803         (meta . ((class . Item)
804                  (interfaces . (laissez-vibrer-tie-interface))
805                  ))
806         ))
807
808     (LaissezVibrerTieColumn
809      . (
810         (X-extent . #f)
811         (Y-extent . #f)
812
813         (positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
814         
815         (meta . ((class . Item)
816                  (interfaces . (laissez-vibrer-tie-column-interface))
817                  ))
818         ))
819
820     (LedgerLineSpanner
821      . (
822
823         (springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
824
825         (stencil . ,Ledger_line_spanner::print)
826
827         (X-extent . #f)
828         (Y-extent . #f)
829         (minimum-length-fraction . 0.25)
830         (length-fraction . 0.25)
831         (layer . 0)
832         (meta . ((class . Spanner)
833                  (interfaces . (ledger-line-interface))))))
834
835     (LeftEdge
836      . (
837         (break-align-symbol . left-edge)
838         (X-extent . (0 . 0))
839         (breakable . #t)
840         (break-visibility . ,center-invisible)
841         (space-alist . (
842                         (custos . (extra-space . 0.0))
843                         (ambitus . (extra-space . 2.0))
844                         (time-signature . (extra-space . 1.0))
845                         (staff-bar . (extra-space . 0.0))
846                         (breathing-sign . (minimum-space . 0.0))
847                         (clef . (extra-space . 0.8))
848                         (first-note . (fixed-space . 2.0))
849                         (right-edge . (extra-space . 0.0))
850                         (key-signature . (extra-space . 0.0))
851                         (key-cancellation . (extra-space . 0.0))
852                         ))
853         (meta . ((class . Item)
854                  (interfaces . (break-aligned-interface))))))
855
856     (LigatureBracket
857      . (
858         ;; ugh.  A ligature bracket is totally different from
859         ;; a tuplet bracket.
860
861         (padding . 2.0)
862         (thickness . 1.6)
863         (edge-height . (0.7 . 0.7))
864         (shorten-pair . (-0.2 . -0.2))
865         (direction . 1)
866         (positions . ,Tuplet_bracket::calc_positions)
867         (stencil . ,Tuplet_bracket::print)
868         
869         (meta . ((class . Spanner)
870                  (interfaces . (tuplet-bracket-interface
871                                 line-interface))))))
872
873     (LyricHyphen
874      . (
875         (thickness . 1.3)
876         (height . 0.42)
877         (dash-period . 10.0)
878         (length . 0.66)
879         (minimum-length . 0.3)
880         (minimum-distance . 0.1)
881         (padding . 0.07)
882         (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
883         
884         (stencil . ,Hyphen_spanner::print)
885
886         (Y-extent . (0 . 0))
887         (meta . ((class . Spanner)
888                  (interfaces . (lyric-interface
889                                 lyric-hyphen-interface
890                                 spanner-interface))))))
891
892     (LyricExtender
893      . (
894
895         (stencil . ,Lyric_extender::print)
896
897         (thickness . 0.8) ; linethickness
898         (minimum-length . 1.5)
899         (Y-extent . (0 . 0))
900         (meta . ((class . Spanner)
901                  (interfaces . (lyric-interface
902                                 lyric-extender-interface))))))
903
904     (LyricSpace
905      . ((minimum-distance . 0.3)
906         (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
907         (padding . 0.0)
908         (Y-extent . #f)
909         (X-extent . #f)
910         (meta . ((class . Spanner)
911                  (interfaces . (spanner-interface
912                                 lyric-hyphen-interface spacing-interface))
913                  ))
914         ))
915     (LyricText
916      . (
917
918         (stencil . ,Text_interface::print)
919
920         (X-offset . ,Self_alignment_interface::aligned_on_x_parent)
921         (self-alignment-X . 0)
922         (word-space . 0.6)
923         (font-series . bold-narrow)
924         (font-size . 1.0)
925         (meta . ((class . Item)
926                  (interfaces . (rhythmic-grob-interface
927                                 lyric-syllable-interface
928                                 self-alignment-interface
929                                 text-interface
930                                 font-interface))))))
931
932     (MensuralLigature
933      . (
934         (thickness . 1.4)
935         (flexa-width . 2.0)
936         (stencil . ,Mensural_ligature::print)
937
938         (meta . ((class . Spanner)
939                  (interfaces . (mensural-ligature-interface
940                                 font-interface))))))
941
942     (MetronomeMark
943      . (
944
945         (stencil . ,Text_interface::print)
946
947         (Y-offset . ,Side_position_interface::y_aligned_side)
948         (direction . 1)
949         (padding . 0.8)
950         (side-axis . ,Y)
951         (meta . ((class . Item)
952                  (interfaces . (text-interface
953                                 side-position-interface
954                                 font-interface
955                                 metronome-mark-interface))))))
956
957     (MeasureGrouping
958      . (
959         (Y-offset . ,Side_position_interface::y_aligned_side)
960         (side-axis . ,Y)
961
962         (stencil . ,Measure_grouping::print)
963
964         (padding . 2)
965         (direction . 1)
966         (thickness . 1)
967         (height . 2.0)
968         (staff-padding . 3)
969         (meta . ((class . Spanner)
970                  (interfaces . (side-position-interface
971                                 measure-grouping-interface))))))
972
973     (MultiMeasureRest
974      . (
975         (stencil . ,Multi_measure_rest::print)
976         (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
977         (Y-offset . ,Staff_symbol_referencer::callback)
978         (staff-position . 0)
979         (expand-limit . 10)
980         (thick-thickness . 6.6)
981         (hair-thickness . 2.0)
982         (padding . 1)
983         (meta . ((class . Spanner)
984                  (interfaces . (multi-measure-rest-interface
985                                 multi-measure-interface
986                                 rest-interface
987                                 font-interface
988                                 staff-symbol-referencer-interface))))))
989
990
991     (MultiMeasureRestNumber
992      . (
993         (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
994         (stencil . ,Text_interface::print)
995         (X-offset . ,(ly:make-simple-closure
996                       `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self))
997                            ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent)))))
998         (Y-offset . ,Side_position_interface::y_aligned_side)
999         (side-axis . ,Y)
1000
1001         (self-alignment-X . 0)
1002         (direction . 1)
1003         (padding . 0.4)
1004         (staff-padding . 0.4)
1005         (font-encoding . fetaNumber)
1006         (meta . ((class . Spanner)
1007                  (interfaces . (side-position-interface
1008                                 multi-measure-interface
1009                                 self-alignment-interface
1010                                 font-interface
1011                                 text-interface))))
1012               ))
1013
1014     (MultiMeasureRestText
1015      . (
1016         (stencil . ,Text_interface::print)
1017         (X-offset . ,(ly:make-simple-closure
1018                       `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent))
1019                            ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
1020         
1021         (Y-offset . ,Side_position_interface::y_aligned_side)
1022         (self-alignment-X . 0)
1023         (direction . 1)
1024         (padding . 0.2)
1025         (staff-padding . 0.25)
1026         (meta . ((class . Spanner)
1027                  (interfaces . (side-position-interface
1028                                 multi-measure-interface
1029                                 self-alignment-interface
1030                                 font-interface
1031                                 text-interface))))))
1032
1033     (NoteCollision
1034      . (
1035         (axes . (0 1))
1036
1037         (X-extent . ,Axis_group_interface::width)
1038         (Y-extent . ,Axis_group_interface::height)
1039         (positioning-done . ,Note_collision_interface::calc_positioning_done)
1040         
1041         (meta . ((class . Item)
1042                  (interfaces . (note-collision-interface
1043                                 axis-group-interface))))))
1044
1045     (NoteColumn
1046      . (
1047         (axes . (0 1))
1048         (X-extent . ,Axis_group_interface::width)
1049         (Y-extent . ,Axis_group_interface::height)
1050
1051         (meta . ((class . Item)
1052                  (interfaces . (axis-group-interface
1053                                 note-column-interface))))))
1054
1055     (NoteHead
1056      . (
1057
1058         (stencil . ,Note_head::print)
1059         (stem-attachment . ,Note_head::calc_stem_attachment)
1060         (glyph-name . ,note-head::calc-glyph-name) 
1061         (Y-offset . ,Staff_symbol_referencer::callback)
1062         (X-offset . ,Note_head::stem_x_shift)
1063         (meta . ((class . Item)
1064                  (interfaces . (rhythmic-grob-interface
1065                                 rhythmic-head-interface
1066                                 font-interface
1067                                 note-head-interface
1068                                 ledgered-interface
1069                                 staff-symbol-referencer-interface))))))
1070
1071     (NoteSpacing
1072      . (
1073         (stem-spacing-correction . 0.5)
1074         (same-direction-correction . 0.25)
1075         ;; Changed this from 0.75.
1076         ;; If you ever change this back, please document! --hwn
1077         (knee-spacing-correction . 1.0)
1078
1079         (meta . ((class . Item)
1080                  (interfaces . (spacing-interface
1081                                 note-spacing-interface))))))
1082
1083     (NoteName
1084      . (
1085
1086         (stencil . ,Text_interface::print)
1087
1088         (meta . ((class . Item)
1089                  (interfaces . (note-name-interface
1090                                 text-interface
1091                                 font-interface))))))
1092
1093     (OctavateEight
1094      . (
1095         (self-alignment-X . 0)
1096         (break-visibility . ,begin-of-line-visible)
1097         (X-offset . ,(ly:make-simple-closure
1098                       `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self))
1099                            ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent)))))
1100         
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      . ((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         (stencil . ,Text_interface::print)
1207         (X-offset . ,(ly:make-simple-closure
1208                       `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent))
1209                            ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
1210         (Y-offset . ,Side_position_interface::y_aligned_side)
1211         (self-alignment-X . 0)
1212         (direction . 1)
1213         (padding . 0.2)
1214         (staff-padding . 0.25)
1215         (font-size . -2) 
1216         (font-encoding . fetaNumber)
1217         (meta . ((class . Spanner)
1218                  (interfaces . (side-position-interface
1219                                 self-alignment-interface
1220                                 percent-repeat-interface
1221                                 font-interface
1222                                 text-interface))))))
1223
1224     ;; an example of a text spanner
1225     (PianoPedalBracket
1226      . (
1227
1228         (stencil . ,Piano_pedal_bracket::print)
1229
1230         (style . line)
1231         (bound-padding . 1.0)
1232         (direction . -1)
1233         (bracket-flare . (0.5 . 0.5))
1234         (edge-height . (1.0 . 1.0))
1235         (shorten-pair . (0.0 . 0.0))
1236         (thickness .  1.0)
1237         (meta . ((class . Spanner)
1238                  (interfaces . (line-interface
1239                                 piano-pedal-interface
1240                                 piano-pedal-bracket-interface))))))
1241
1242     (RehearsalMark
1243      . (
1244         (stencil . ,Text_interface::print)
1245         (X-offset . ,(ly:make-simple-closure
1246                       `(,+ ,(ly:make-simple-closure
1247                              `(,Self_alignment_interface::x_aligned_on_self))
1248                            ,(ly:make-simple-closure
1249                              `(,Self_alignment_interface::centered_on_x_parent)))
1250                       ))
1251         (Y-offset . ,Side_position_interface::y_aligned_side)
1252         (self-alignment-X . 0)
1253         (direction . 1)
1254         (breakable . #t)
1255         (font-size . 2)
1256         (baseline-skip . 2)
1257         (break-visibility . ,end-of-line-invisible)
1258         (padding . 0.8)
1259         (meta . ((class . Item)
1260                  (interfaces . (text-interface
1261                                 side-position-interface
1262                                 font-interface
1263                                 mark-interface
1264                                 self-alignment-interface))))))
1265
1266
1267     (RepeatSlash
1268      . (
1269
1270         (stencil . ,Percent_repeat_item_interface::beat_slash)
1271
1272         (thickness . 0.48)
1273         (slope . 1.7)
1274         (meta . ((class . Item)
1275                  (interfaces . (percent-repeat-interface))))))
1276     (Rest
1277      . (
1278         (stencil . ,Rest::print)
1279         (X-extent . ,Rest::width)
1280         (Y-extent . ,Rest::height)
1281         (Y-offset . ,Rest::y_offset_callback)
1282         (minimum-distance . 0.25)
1283         (meta . ((class . Item)
1284                  (interfaces . (font-interface
1285                                 rhythmic-head-interface
1286                                 rhythmic-grob-interface
1287                                 staff-symbol-referencer-interface
1288                                 rest-interface))))))
1289
1290     (RestCollision
1291      . (
1292         (minimum-distance . 0.75)
1293         (positioning-done . ,Rest_collision::calc_positioning_done)
1294                                         
1295         (meta . ((class . Item)
1296                  (interfaces . (rest-collision-interface))))))
1297
1298     (Script
1299      . (
1300         ;; don't set direction here: it breaks staccato.
1301
1302         ;; This value is sensitive: if too large, staccato dots will move a
1303         ;; space a away.
1304         (padding . 0.20)
1305         (staff-padding . 0.25)
1306         ;; (script-priority . 0) priorities for scripts, see script.scm
1307         (X-offset . , Self_alignment_interface::centered_on_x_parent)
1308         
1309
1310         (stencil . ,Script_interface::print)
1311         (direction . ,Script_interface::calc_direction)
1312
1313         (font-encoding . fetaMusic)
1314         (meta . ((class . Item)
1315                  (interfaces . (script-interface
1316                                 side-position-interface
1317                                 font-interface))))))
1318
1319     (ScriptColumn
1320      . (
1321
1322         (before-line-breaking . ,Script_column::before_line_breaking)
1323
1324         (meta . ((class . Item)
1325                  (interfaces . (script-column-interface))))))
1326
1327     (SeparationItem
1328      . (
1329         (X-extent . #f)
1330         (Y-extent . #f)
1331         (meta . ((class . Item)
1332                  (interfaces . (spacing-interface
1333                                 separation-item-interface))))))
1334
1335     (SeparatingGroupSpanner
1336      . (
1337
1338         (springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1339
1340         (meta . ((class . Spanner)
1341                  (interfaces . (only-prebreak-interface
1342                                 spacing-interface
1343                                 separation-spanner-interface))))))
1344
1345     (Slur
1346      . ((details . ,default-slur-details)
1347
1348         (control-points . ,Slur::calc_control_points)
1349         (direction . ,Slur::calc_direction)
1350         (springs-and-rods . ,Spanner::set_spacing_rods)
1351         (Y-extent . ,Slur::height)
1352         (stencil . ,Slur::print)
1353         
1354         (thickness . 1.0)
1355         (minimum-length . 1.5)
1356                                         ; Slur::height)
1357         (height-limit . 2.0)
1358         (ratio . 0.25)
1359         (meta . ((class . Spanner)
1360                  (interfaces . (slur-interface))))))
1361
1362     (SpacingSpanner
1363      . (
1364
1365         (springs-and-rods . ,Spacing_spanner::set_springs)
1366         (average-spacing-wishes . #t)
1367         (grace-space-factor . 0.6)
1368         (shortest-duration-space . 2.0)
1369         (spacing-increment . 1.2)
1370         (base-shortest-duration . ,(ly:make-moment 3 16))
1371         (meta . ((class . Spanner)
1372                  (interfaces . (spacing-interface
1373                                 spacing-spanner-interface))))))
1374
1375     (SpanBar
1376      . (
1377         (break-align-symbol . staff-bar)
1378         (Y-extent . ())
1379         (layer . 0)
1380         (breakable . #t)
1381
1382         (stencil . ,Span_bar::print)
1383         (bar-size . ,Span_bar::calc_bar_size)
1384         (X-extent . ,Span_bar::width)
1385         (glyph-name . ,Span_bar::calc_glyph_name)
1386         (before-line-breaking . ,Span_bar::before_line_breaking)
1387
1388         ;; ugh duplication!
1389
1390         ;;
1391         ;; Ross. page 151 lists other values, we opt for a leaner look
1392         ;;
1393         (kern . 3.0)
1394         (thin-kern . 3.0)
1395         (hair-thickness . 1.6)
1396         (thick-thickness . 6.0)
1397         (meta . ((class . Item)
1398                  (interfaces . (span-bar-interface
1399                                 font-interface
1400                                 bar-line-interface))))))
1401
1402     (StanzaNumber
1403      . (
1404         (stencil . ,Text_interface::print)
1405
1406         (font-series . bold)
1407         (padding . 1.0)
1408         (X-offset . ,Side_position_interface::x_aligned_side)
1409         (side-axis . ,X)
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         (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         (side-axis . ,Y)
1470
1471         (padding . 1.2)
1472         (minimum-space . 1.0)
1473         (direction . -1)
1474         (meta . ((class . Spanner)
1475                  (interfaces . (piano-pedal-interface
1476                                 axis-group-interface
1477                                 side-position-interface))))))
1478
1479     (StaffSymbol
1480      . (
1481
1482         (stencil . ,Staff_symbol::print)
1483
1484         (line-count . 5)
1485         (ledger-line-thickness . (1.0 . 0.1))
1486         (layer . 0)
1487         (meta . ((class . Spanner)
1488                  (interfaces . (staff-symbol-interface))))))
1489
1490     (Stem
1491      . (
1492         (direction . ,Stem::calc_direction)
1493         (stem-end-position . ,Stem::calc_stem_end_position)
1494         (stem-info . ,Stem::calc_stem_info)
1495         (positioning-done . ,Stem::calc_positioning_done)
1496         (stencil . ,Stem::print)
1497         (X-extent . ,Stem::width)
1498         (Y-extent . ,Stem::height)
1499         (length . ,Stem::calc_length)
1500         
1501         (thickness . 1.3)
1502
1503         (details
1504          . (
1505             ;; 3.5 (or 3 measured from note head) is standard length
1506             ;; 32nd, 64th flagged stems should be longer
1507             (lengths . (3.5 3.5 3.5 4.5 5.0))
1508
1509             ;; FIXME.  3.5 yields too long beams (according to Ross and
1510             ;; looking at Baerenreiter examples) for a number of common
1511             ;; boundary cases.  Subtracting half a beam thickness fixes
1512             ;; this, but the bug may well be somewhere else.
1513
1514             ;; FIXME this should come from 'lengths
1515             (beamed-lengths . (3.26 3.5 3.6))
1516
1517             ;; The 'normal' minima
1518             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1519                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1520
1521             ;; The 'extreme case' minima
1522             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1523
1524             ;; Stems in unnatural (forced) direction should be shortened by
1525             ;; one staff space, according to [Roush & Gourlay].
1526             ;; Flagged stems we shorten only half a staff space.
1527             (stem-shorten . (1.0 0.5))
1528
1529             ))
1530
1531
1532         ;; default stem direction for note on middle line
1533         (neutral-direction . -1)
1534
1535         ;; We use the normal minima as minimum for the ideal lengths,
1536         ;; and the extreme minima as abolute minimum length.
1537
1538         (X-offset . ,Stem::offset_callback)
1539         (Y-offset . ,Staff_symbol_referencer::callback)
1540         (meta . ((class . Item)
1541                  (interfaces . (stem-interface
1542                                 font-interface))))))
1543
1544     (StemTremolo
1545      . (
1546         (Y-extent . ,Stem_tremolo::height)
1547         (stencil . ,Stem_tremolo::print)
1548         (X-extent . #f)
1549         (beam-width . 1.6) ; staff-space
1550         (beam-thickness . 0.48) ; staff-space
1551         (meta . ((class . Item)
1552                  (interfaces . (stem-tremolo-interface))))))
1553
1554     (SustainPedal
1555      . (
1556         (no-spacing-rods . #t)
1557         (stencil . ,Sustain_pedal::print)
1558         (self-alignment-X . 0)
1559         (direction . 1)
1560         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1561         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1562         (meta . ((class . Item)
1563                  (interfaces . (piano-pedal-interface
1564                                 text-spanner-interface
1565                                 text-interface
1566                                 self-alignment-interface
1567                                 font-interface))))))
1568
1569     (SustainPedalLineSpanner
1570      . (
1571         (axes . (1))
1572         (X-extent . ,Axis_group_interface::height)
1573         (Y-offset . ,Side_position_interface::y_aligned_side)
1574         (side-axis . ,Y)
1575         (padding . 1.2)
1576         (staff-padding . 1.2)
1577         (minimum-space . 1.0)
1578         (direction . -1)
1579         (meta . ((class . Spanner)
1580                  (interfaces . (piano-pedal-interface
1581                                 axis-group-interface
1582                                 side-position-interface))))))
1583
1584     (System
1585      . (
1586         (axes . (0 1))
1587         (X-extent . ,Axis_group_interface::width)
1588         (Y-extent . ,Axis_group_interface::height)
1589         (meta . ((class . System)
1590                  (interfaces . (system-interface
1591                                 axis-group-interface))))))
1592
1593     (SystemStartBrace
1594      . (
1595         (style . brace)
1596         (padding . 0.3)
1597         (stencil . ,System_start_delimiter::print)
1598         (collapse-height . 5.0)
1599         (X-offset . ,Side_position_interface::x_aligned_side)
1600         (direction . ,LEFT)
1601         (font-encoding . fetaBraces)
1602         (Y-extent . #f)
1603         (meta . ((class . Spanner)
1604                  (interfaces . (system-start-delimiter-interface
1605                                 side-position-interface
1606                                 font-interface))))))
1607
1608     (SystemStartSquare
1609      . (
1610         (Y-extent . #f)
1611         (X-offset . ,Side_position_interface::x_aligned_side)
1612         (direction . ,LEFT)
1613         (stencil . ,System_start_delimiter::print)
1614         (style . line-bracket)
1615         (thickness . 1.0)
1616         (meta . ((class . Spanner)
1617                  (interfaces . (font-interface
1618                                 side-position-interface
1619                                 system-start-delimiter-interface))))))
1620     (SystemStartBracket
1621      . (
1622         (Y-extent . #f)
1623         (padding . 0.8)
1624         (X-offset . ,Side_position_interface::x_aligned_side)
1625         (direction . ,LEFT)
1626         (stencil . ,System_start_delimiter::print)
1627         (style . bracket)
1628         (collapse-height . 5.0)
1629         (thickness . 0.45)
1630         (meta . ((class . Spanner)
1631                  (interfaces . (font-interface
1632                                 side-position-interface
1633                                 system-start-delimiter-interface))))))
1634
1635     (SystemStartBar
1636      . (
1637         (Y-extent . #f)
1638         (padding . 0.0)
1639         (X-offset . ,Side_position_interface::x_aligned_side)
1640         (direction . ,LEFT)
1641         (style . bar-line)
1642         (thickness . 1.6)
1643         (stencil . ,System_start_delimiter::print)
1644         (meta . ((class . Spanner)
1645                  (interfaces . (side-position-interface
1646                                 system-start-delimiter-interface))))))
1647
1648
1649     (TabNoteHead
1650      . (
1651
1652         (stencil . ,Text_interface::print)
1653         (Y-offset . ,Staff_symbol_referencer::callback)
1654         (font-size . -2)
1655         (stem-attachment . (1.0 . 1.35))
1656         (font-series . bold)
1657         (meta . ((class . Item)
1658                  (interfaces
1659                   . (rhythmic-head-interface
1660                      font-interface rhythmic-grob-interface
1661                      note-head-interface
1662                      staff-symbol-referencer-interface
1663                      text-interface))))))
1664
1665     (TextScript
1666      . (
1667         (no-spacing-rods . #t)
1668         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1669         (direction . -1)
1670
1671         ;; sync with Fingering ?
1672         (padding . 0.5)
1673         (staff-padding . 0.5)
1674
1675         (stencil . ,Text_interface::print)
1676         (direction . ,Script_interface::calc_direction)
1677
1678         (avoid-slur . around)
1679         (slur-padding . 0.5)
1680         (script-priority . 200)
1681         ;; todo: add X self alignment?
1682         (meta . ((class . Item)
1683                  (interfaces . (text-script-interface
1684                                 text-interface
1685                                 side-position-interface
1686                                 font-interface))))))
1687
1688     (TextSpanner
1689      . (
1690         (stencil . ,Text_spanner::print)
1691         (Y-offset . ,Side_position_interface::y_aligned_side)
1692         (font-shape . italic)
1693         (style . dashed-line)
1694         (staff-padding . 0.8)
1695         (dash-fraction . 0.2)
1696         (dash-period . 3.0)
1697         (side-axis . ,Y)
1698         (direction . 1)
1699         (meta . ((class . Spanner)
1700                  (interfaces . (text-spanner-interface
1701                                 side-position-interface
1702                                 font-interface))))))
1703
1704     (Tie
1705      . (
1706         (control-points . ,Tie::calc_control_points)
1707         (avoid-slur . inside)
1708         (direction . ,Tie::calc_direction)
1709         (stencil . ,Tie::print)
1710         (details . ((ratio . 0.333)
1711                     (height-limit . 1.0)
1712                     (between-length-limit . 1.0)))
1713         (thickness . 1.0)
1714         (meta . ((class . Spanner)
1715                  (interfaces . (tie-interface))))
1716         ))
1717
1718     (TieColumn
1719      . (
1720         (positioning-done . ,Tie_column::calc_positioning_done)
1721         (before-line-breaking . ,Tie_column::before_line_breaking)
1722         (X-extent . #f)
1723         (Y-extent . #f)
1724         (meta . ((class . Spanner)
1725                  (interfaces . (tie-column-interface))))))
1726
1727     (TimeSignature
1728      . (
1729         (stencil . ,Time_signature::print)
1730         (break-align-symbol . time-signature)
1731         (break-visibility . ,all-visible)
1732         (space-alist . (
1733                         (first-note . (fixed-space . 2.0))
1734                         (right-edge . (extra-space . 0.5))
1735                         (staff-bar . (minimum-space . 2.0))))
1736         (breakable . #t)
1737         (style . C)
1738         (meta . ((class . Item)
1739                  (interfaces . (time-signature-interface
1740                                 break-aligned-interface
1741                                 font-interface))))))
1742
1743     (TrillSpanner
1744      . (
1745         (stencil . ,Dynamic_text_spanner::print)
1746         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1747                             ""))
1748         (style . trill)
1749         (staff-padding . 1.0)
1750         (padding . 0.5)
1751         (direction . 1)
1752         (Y-offset . ,Side_position_interface::y_aligned_side)
1753         (side-axis . ,Y)
1754         (meta . ((class . Spanner)
1755                  (interfaces . (text-spanner-interface
1756                                 side-position-interface
1757                                 font-interface))))))
1758
1759     (TrillPitchAccidental
1760      . ((X-offset . ,Side_position_interface::x_aligned_side)
1761         (padding . 0.2)
1762         (direction . ,LEFT)
1763         (font-size . -4)
1764         (side-axis . ,X)
1765         (stencil . ,Accidental_interface::print)
1766         (meta . ((class . Item)
1767                  (interfaces . (item-interface
1768                                 accidental-interface
1769                                 side-position-interface
1770                                 font-interface))))))
1771
1772     (TrillPitchGroup
1773      . ((X-offset . ,Side_position_interface::x_aligned_side)
1774         (axes . (,X))
1775         (font-size . -4)
1776         (stencil . ,parenthesize-elements)
1777         (direction . ,RIGHT)
1778         (side-axis . ,X)
1779         (padding . 0.3)
1780         (meta . ((class . Item)
1781                  (interfaces . (side-position-interface
1782                                 note-head-interface
1783                                 rhythmic-head-interface
1784                                 font-interface
1785                                 accidental-interface
1786                                 axis-group-interface))))))
1787
1788     (TrillPitchHead
1789      . (
1790         (stencil . ,Note_head::print)
1791         (duration-log . 2)
1792         (Y-offset . ,Staff_symbol_referencer::callback)
1793         (font-size . -4)
1794         (meta . ((class . Item)
1795                  (interfaces . (item-interface
1796                                 rhythmic-head-interface
1797                                 font-interface
1798                                 pitched-trill-interface
1799                                 ledgered-interface
1800                                 staff-symbol-referencer-interface))))))
1801
1802     (TupletBracket
1803      . (
1804         (padding . 1.1)
1805         (thickness . 1.6)
1806         (edge-height . (0.7 . 0.7))
1807         (shorten-pair . (-0.2 . -0.2))
1808         (staff-padding . 0.25)
1809         
1810         (direction  . ,Tuplet_bracket::calc_direction)
1811         (positions . ,Tuplet_bracket::calc_positions)
1812         (connect-to-neighbor . ,Tuplet_bracket::calc_connect_to_neighbors)
1813         (control-points . ,Tuplet_bracket::calc_control_points)
1814         (stencil . ,Tuplet_bracket::print)
1815         
1816         (meta . ((class . Spanner)
1817                  (interfaces . (line-interface
1818                                 tuplet-bracket-interface))))))
1819
1820     (TupletNumber
1821      . (
1822         (stencil . ,Tuplet_number::print)
1823         (font-shape . italic)
1824         (font-size . -2)
1825         (avoid-slur . inside)
1826         (meta . ((class . Spanner)
1827                  (interfaces . (text-interface tuplet-number-interface
1828                                 font-interface))))))
1829     
1830     (UnaCordaPedal
1831      . (
1832         (stencil . ,Text_interface::print)
1833         (font-shape . italic)
1834         (no-spacing-rods . #t)
1835         (self-alignment-X . 0)
1836         (direction . 1)
1837         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1838         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1839         (meta . ((class . Item)
1840                  (interfaces . (text-interface
1841                                 self-alignment-interface
1842                                 font-interface))))))
1843
1844     (UnaCordaPedalLineSpanner
1845      . (
1846         (axes . (1))
1847         (X-extent . ,Axis_group_interface::height)
1848         (Y-offset . ,Side_position_interface::y_aligned_side)
1849         (side-axis . ,Y)
1850         (padding . 1.2)
1851         (staff-padding . 1.2)
1852         (minimum-space . 1.0)
1853         (direction . -1)
1854         (meta . ((class . Spanner)
1855                  (interfaces . (piano-pedal-interface
1856                                 axis-group-interface
1857                                 side-position-interface))))))
1858
1859     (VaticanaLigature
1860      . (
1861         (thickness . 0.6)
1862         (flexa-width . 2.0)
1863         (stencil . ,Vaticana_ligature::print)
1864         (meta . ((class . Spanner)
1865                  (interfaces . (vaticana-ligature-interface
1866                                 font-interface))))))
1867
1868     (VerticalAlignment
1869      . (
1870         (axes . (1))
1871         (positioning-done . ,Align_interface::calc_positioning_done)
1872         (after-line-breaking . ,Align_interface::stretch_after_break)
1873         (Y-extent . ,Axis_group_interface::height)
1874         (X-extent . ,Axis_group_interface::width)
1875         (stacking-dir . -1)
1876         (meta . ((class . Spanner)
1877                  (interfaces . (align-interface
1878                                 axis-group-interface))))))
1879     (VerticalAxisGroup
1880      . (
1881         (axes . (1))
1882         (Y-offset . ,Hara_kiri_group_spanner::force_hara_kiri_callback)
1883         (Y-extent . ,Hara_kiri_group_spanner::y_extent)
1884         (X-extent . ,Axis_group_interface::width)
1885         (meta . ((class . Spanner)
1886                  (interfaces . (axis-group-interface
1887                                 hara-kiri-group-interface
1888                                 vertically-spaceable-interface))))))
1889
1890     (VocalName
1891      . (
1892         (breakable . #t)
1893         (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
1894         (direction . 0)
1895         (space-alist . ((left-edge . (extra-space . 1.0))))
1896         (break-align-symbol . instrument-name)
1897         (stencil . ,Text_interface::print)
1898         (break-align-symbol . clef)
1899         (break-visibility . ,begin-of-line-visible)
1900         (baseline-skip . 2)
1901         (side-axis . ,Y)
1902         (meta . ((class . Item)
1903                  (interfaces . (font-interface
1904                                 self-alignment-interface
1905                                 side-position-interface
1906                                 text-interface
1907                                 break-aligned-interface))))))
1908
1909     (VoltaBracket
1910      . (
1911         (stencil . ,Volta_bracket_interface::print)
1912         (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)
1913         (direction . ,UP)
1914         (padding . 1)
1915         (font-encoding . fetaNumber)
1916         (Y-offset . ,Side_position_interface::y_aligned_side)
1917         (side-axis . ,Y)
1918         (thickness . 1.6)  ;;  linethickness
1919         (edge-height . (2.0 . 2.0)) ;; staffspace;
1920         (minimum-space . 5)
1921         (font-size . -4)
1922         (meta . ((class . Spanner)
1923                  (interfaces . (volta-bracket-interface
1924                                 horizontal-bracket-interface                            
1925                                 line-interface
1926                                 text-interface
1927                                 side-position-interface
1928                                 font-interface)))
1929               )))
1930
1931
1932     (VoiceFollower
1933      . (
1934         (style . line)
1935         (gap . 0.5)
1936         (breakable . #t)
1937         (X-extent . #f)
1938         (Y-extent . #f)
1939         (stencil . ,Line_spanner::print)
1940         (after-line-breaking . ,Line_spanner::after_line_breaking)
1941         (meta . ((class . Spanner)
1942                  (interfaces . (line-spanner-interface
1943                                 line-interface))))
1944         ))
1945
1946 ))
1947
1948 (define (completize-grob-entry x)
1949   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1950 "
1951   ;;  (display (car x))
1952   ;;  (newline)
1953   (let* ((name-sym  (car x))
1954          (grob-entry (cdr x))
1955          (meta-entry (cdr (assoc 'meta grob-entry)))
1956          (class (cdr (assoc 'class meta-entry)))
1957          (ifaces-entry
1958           (cdr (assoc 'interfaces meta-entry))))
1959
1960     (cond
1961      ((eq? 'Item class)
1962       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1963      ((eq? 'Spanner class)
1964       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1965      ((eq? 'Paper_column class)
1966       (set! ifaces-entry (cons 'item-interface
1967                                (cons 'paper-column-interface ifaces-entry))))
1968      ((eq? 'System class)
1969       (set! ifaces-entry (cons 'system-interface
1970                                (cons 'spanner-interface ifaces-entry))))
1971      (else
1972       (ly:warning "Unknown class ~a" class)))
1973     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1974
1975     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1976     (set! meta-entry (assoc-set! meta-entry 'interfaces
1977                                  ifaces-entry))
1978     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1979     (cons name-sym grob-entry)))
1980
1981 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1982
1983 ;;  (display (map pair? all-grob-descriptions))
1984
1985 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1986
1987 (map (lambda (x)
1988        ;; (display (car x)) (newline)
1989
1990        (set-object-property! (car x) 'translation-type? list?)
1991        (set-object-property! (car x) 'is-grob? #t))
1992      all-grob-descriptions)
1993
1994 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1995