1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;;; distances are given in linethickness (thicknesses) and
9 ;;;; staffspace (distances)
11 ;;;; WARNING: the meta field should be the last one.
12 ;;;; WARNING: don't use anonymous functions for initialization.
14 ;; TODO: junk the meta field in favor of something more compact?
15 (define-public all-grob-descriptions
19 (print-function . ,Accidental_interface::print)
21 (cautionary-style . parentheses)
22 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface font-interface))))
27 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
30 ;; this is quite small, but it is very ugly to have
31 ;; accs closer to the previous note than to the next one.
32 (right-padding . 0.15)
33 (meta . ((interfaces . (item-interface accidental-placement-interface))))
39 (break-align-symbol . ambitus)
40 (print-function . ,Ambitus::print)
42 (note-head-style . "noteheads-2")
43 (break-visibility . ,begin-of-line-visible)
46 (clef . (extra-space . 0.0))
47 (key-signature . (extra-space . 0.0))
48 (staff-bar . (extra-space . 0.0))
49 (time-signature . (extra-space . 0.0))
50 (first-note . (fixed-space . 0.0))
52 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface break-aligned-interface item-interface font-interface))))
57 (X-extent-callback . ,Arpeggio::width_callback)
58 (Y-extent-callback . #f)
59 (print-function . ,Arpeggio::print)
60 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
61 (X-offset-callbacks . (,Side_position_interface::aligned_side))
64 (staff-position . 0.0)
65 (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
70 (break-align-symbol . staff-bar)
72 (break-glyph-function . ,default-break-barline)
73 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
74 (print-function . ,Bar_line::print)
75 (break-visibility . ,all-visible)
77 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
79 (time-signature . (extra-space . 0.75))
80 (custos . (minimum-space . 2.0))
81 (clef . (minimum-space . 1.0))
82 (key-signature . (extra-space . 1.0))
83 (first-note . (fixed-space . 1.3))
84 (next-note . (semi-fixed-space . 1.3))
85 (right-edge . (extra-space . 0.0))
89 ;; Ross. page 151 lists other values, we opt for a leaner look
93 (hair-thickness . 1.6)
94 (thick-thickness . 6.0)
95 (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
101 (print-function . ,Text_item::print)
103 (break-visibility . ,begin-of-line-visible)
106 (font-family . roman)
108 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
109 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
110 (self-alignment-X . 1)
112 ;; hmm. why did we do this: ?
113 (extra-offset . (1.3 . 0))
115 ((interfaces . (side-position-interface
117 self-alignment-interface
118 font-interface item-interface break-aligned-interface))))
124 (print-function . ,Text_item::print)
125 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
127 (font-family . number)
129 ;; We must do this, other BFs in
130 ;; paper16 become too small.
133 (meta . ((interfaces . (text-interface rhythmic-grob-interface
134 bass-figure-interface item-interface
135 self-alignment-interface font-interface))))
139 ;; todo: clean this up a bit: the list is getting
141 (print-function . ,Beam::print)
142 (concaveness-gap . 1.85)
143 (concaveness-threshold . 0.26)
145 (positions . (#f . #f))
146 (position-callbacks . (,Beam::least_squares
149 ,Beam::shift_region_to_valid
153 ;; TODO: should be in SLT.
154 (thickness . 0.48) ; in staff-space
155 (before-line-breaking-callback . ,Beam::before_line_breaking)
156 (after-line-breaking-callback . ,Beam::after_line_breaking)
157 (neutral-direction . -1)
158 (dir-function . ,beam-dir-majority-median)
160 ;; Whe have some unreferenced problems here.
162 ;; If we shorten beamed stems less than normal stems (1 staffspace),
163 ;; or high order less than 8th beams, patterns like
164 ;; c''4 [c''8 c''] c''4 [c''16 c]
165 ;; are ugly (different stem lengths).
167 ;; But if we shorten 16th beams as much as 8th beams, a single
168 ;; forced 16th beam looks *very* short.
170 ;; We choose to shorten 8th beams the same as single stems,
171 ;; and high order beams less than 8th beams, so that all
172 ;; isolated shortened beams look nice and a bit shortened,
173 ;; sadly possibly breaking patterns with high order beams.
174 (beamed-stem-shorten . (1.0 0.5 0.25))
177 (flag-width-function . ,beam-flag-width-function)
179 (auto-knee-gap . 5.5)
181 ;; only for debugging.
182 (font-family . roman)
184 (space-function . ,Beam::space_function)
185 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
192 (break-align-orders . #((instrument-name left-edge ambitus breathing-sign
193 clef key-signature staff-bar
194 time-signature custos)
195 (instrument-name left-edge ambitus breathing-sign
196 clef staff-bar key-signature
198 time-signature custos)
199 (instrument-name left-edge ambitus breathing-sign
200 clef key-signature staff-bar
201 time-signature custos)
205 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
206 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
212 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
213 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
214 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
219 (break-align-symbol . breathing-sign)
222 (ambitus . (extra-space . 2.0))
223 (custos . (minimum-space . 1.0))
224 (key-signature . (minimum-space . 1.5))
225 (staff-bar . (minimum-space . 1.5))
226 (clef . (minimum-space . 2.0))
227 (first-note . (fixed-space . 1.0)) ;huh?
228 (right-edge . (extra-space . 0.1))
230 (print-function . ,Text_item::print)
231 (text . ,(make-musicglyph-markup "scripts-rcomma"))
232 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
233 (break-visibility . ,begin-of-line-invisible)
234 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
239 (print-function . ,Clef::print)
240 (before-line-breaking-callback . ,Clef::before_line_breaking)
242 (font-family . music)
243 (break-align-symbol . clef)
244 (break-visibility . ,begin-of-line-visible)
245 (space-alist . ((ambitus . (extra-space . 2.0))
246 (staff-bar . (extra-space . 0.7))
247 (key-signature . (minimum-space . 4.0))
248 (time-signature . (minimum-space . 4.2))
249 (first-note . (minimum-fixed-space . 5.0))
250 (next-note . (extra-space . 0.5))
251 (right-edge . (extra-space . 0.5))
253 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
254 (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
257 (ClusterSpannerBeacon
259 (print-function . #f)
260 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
265 (print-function . ,Cluster::print)
266 (spacing-procedure . ,Spanner::set_spacing_rods)
267 (minimum-length . 0.0)
270 (meta . ((interfaces . (cluster-interface spanner-interface))))
275 (print-function . ,Text_item::print)
276 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
280 (meta . ((interfaces . (font-interface rhythmic-grob-interface
281 text-interface chord-name-interface item-interface ))))
286 (break-align-symbol . custos)
288 (print-function . ,Custos::print)
289 (break-visibility . ,end-of-line-visible)
291 (neutral-direction . -1)
292 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
294 (first-note . (minimum-fixed-space . 0.0))
295 (right-edge . (extra-space . 0.1))
298 . (custos-interface staff-symbol-referencer-interface
300 break-aligned-interface item-interface ))))
308 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
309 (X-offset-callbacks . (,Dot_column::side_position))
310 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
315 (print-function . ,Dots::print)
317 (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
320 (DoublePercentRepeat .
322 (print-function . ,Percent_repeat_item_interface::double_percent)
325 (font-encoding . music)
328 (break-align-symbol . staff-bar)
329 (break-visibility . ,begin-of-line-invisible)
330 (meta . ((interfaces . (font-interface
331 break-aligned-interface
332 percent-repeat-interface item-interface ))))
337 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
338 (print-function . ,Text_item::print)
339 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
340 ,Self_alignment_interface::centered_on_parent))
341 (self-alignment-X . 0)
342 (no-spacing-rods . #t)
343 (script-priority . 100)
345 (font-encoding . dynamic)
346 (font-shape . italic)
347 (self-alignment-Y . 0)
348 (meta . ((interfaces . (font-interface text-interface self-alignment-interface dynamic-interface script-interface item-interface))))
354 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
355 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
356 (staff-padding . 0.1)
358 (minimum-space . 1.2)
360 (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface spanner-interface))))
365 (break-align-symbol . left-edge)
369 (custos . (extra-space . 0.0))
370 (ambitus . (extra-space . 2.0))
371 (time-signature . (extra-space . 0.0))
372 (staff-bar . (extra-space . 0.0))
373 (breathing-sign . (minimum-space . 0.0))
374 (clef . (extra-space . 0.85))
375 (first-note . (fixed-space . 1.0))
376 (right-edge . (extra-space . 0.0))
377 (key-signature . (extra-space . 0.0))
379 (meta . ((interfaces . (break-aligned-interface item-interface ))))
384 (print-function . ,Text_item::print)
386 (staff-padding . 0.6)
387 (self-alignment-X . 0)
388 (self-alignment-Y . 0)
389 (script-priority . 100)
390 (font-encoding . number)
391 (font-size . -5) ; don't overlap when next to heads.
392 (font-shape . upright)
393 (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
400 (zigzag-width . 0.75)
402 (X-extent-callback . #f)
403 (Y-extent-callback . #f)
404 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
405 (print-function . ,Line_spanner::print)
406 (meta . ((interfaces . (line-spanner-interface spanner-interface))))
411 (print-function . ,Hairpin::print)
414 (spacing-procedure . ,Spanner::set_spacing_rods)
415 (minimum-length . 2.0)
416 (if-text-padding . 1.0)
417 (self-alignment-Y . 0)
418 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
419 (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
425 (print-function . ,Horizontal_bracket::print)
426 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
429 (meta . ((interfaces . (horizontal-bracket-interface side-position-interface spanner-interface))))
434 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
435 ,Side_position_interface::aligned_on_support_refpoints))
436 ;; This direction is for aligned_on_support_refpoints
440 (left-edge . (extra-space . 1.0))
443 (self-alignment-Y . 0)
444 (print-function . ,Text_item::print)
445 (break-align-symbol . instrument-name)
446 (break-visibility . ,begin-of-line-visible)
448 (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
454 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
456 (space-alist . ((left-edge . (extra-space . 1.0))
458 (print-function . ,Text_item::print)
459 (break-align-symbol . clef)
460 (break-visibility . ,begin-of-line-visible)
462 (meta . ((interfaces . (font-interface
463 self-alignment-interface
464 side-position-interface text-interface
465 break-aligned-interface item-interface ))))
470 (print-function . ,Key_signature_interface::print)
472 (time-signature . (extra-space . 1.25))
473 (staff-bar . (extra-space . 1.1))
474 (right-edge . (extra-space . 0.5))
475 (first-note . (fixed-space . 2.5))
477 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
478 (break-align-symbol . key-signature)
479 (break-visibility . ,begin-of-line-visible)
481 (meta . ((interfaces . (key-signature-interface font-interface break-aligned-interface item-interface ))))
486 (ligature-primitive-callback . ,Note_head::print)
491 (edge-height . (0.7 . 0.7))
492 (shorten-pair . (-0.2 . -0.2))
493 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
494 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
495 (print-function . ,Tuplet_bracket::print)
496 (meta . ((interfaces . (tuplet-bracket-interface spanner-interface))))
505 (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
506 (print-function . ,Hyphen_spanner::print)
508 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
509 spanner-interface))))
514 (print-function . ,Lyric_extender::print)
515 (thickness . 0.8) ; linethickness
516 (minimum-length . 1.5)
518 (meta . ((interfaces . (lyric-interface
519 lyric-extender-interface spanner-interface))))
523 . ((print-function . ,Text_item::print)
524 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
525 (self-alignment-X . 0)
527 (font-series . bold-narrow)
529 (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
536 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
537 (print-function . ,Mensural_ligature::print)
538 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
543 (print-function . ,Text_item::print)
544 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
545 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
546 (after-line-breaking-callback . ,shift-right-at-line-begin)
547 (self-alignment-X . 0)
552 (break-visibility . ,end-of-line-invisible)
554 (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
558 (print-function . ,Text_item::print)
559 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
562 (break-visibility . ,end-of-line-invisible)
564 (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
568 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
569 (print-function . ,Measure_grouping::print)
575 (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
579 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
580 (print-function . ,Multi_measure_rest::print)
581 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
584 (thick-thickness . 6.6)
585 (hair-thickness . 2.0)
587 (font-encoding . music)
588 (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
591 (MultiMeasureRestNumber
593 (print-function . ,Text_item::print)
594 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
595 ,Self_alignment_interface::centered_on_other_axis_parent))
596 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
597 (self-alignment-X . 0)
600 (staff-padding . 1.3)
601 (font-encoding . number)
602 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
604 (MultiMeasureRestText
606 (print-function . ,Text_item::print)
607 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
608 ,Self_alignment_interface::centered_on_other_axis_parent))
609 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
610 (self-alignment-X . 0)
613 (staff-padding . 1.5)
614 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
619 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
620 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
621 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
627 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
628 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
629 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
635 (print-function . ,Note_head::print)
636 (ligature-primitive-callback . ,Note_head::print)
637 (glyph-name-procedure . ,find-notehead-symbol)
638 (X-extent-callback . ,Note_head::extent)
639 (Y-extent-callback . ,Note_head::extent)
640 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
641 (stem-attachment-function . ,note-head-style->attachment-coordinates)
642 (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
647 (stem-spacing-correction . 0.5)
649 ;; Changed this from 0.75.
650 ;; If you ever change this back, please document! --hwn
651 (knee-spacing-correction . 1.0)
653 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
661 (X-extent-callback . #f)
662 (Y-extent-callback . #f)
663 (print-function . ,Line_spanner::print)
664 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
665 (meta . ((interfaces . (line-spanner-interface spanner-interface))))
670 (print-function . ,Text_item::print)
671 (meta . ((interfaces . (note-name-interface
672 text-interface font-interface item-interface ))))
677 (self-alignment-X . 0)
678 (break-visibility . ,begin-of-line-visible)
679 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
680 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
681 (print-function . ,Text_item::print)
682 (font-shape . italic)
684 (staff-padding . 0.2)
686 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
692 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
693 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
695 ; (print-function . ,Paper_column::print) (font-name . "cmr8") (Y-extent-callback . #f)
696 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
701 (print-function . ,Slur::print)
703 (spacing-procedure . ,Spanner::set_spacing_rods)
704 (minimum-length . 1.5)
705 (after-line-breaking-callback . ,Slur::after_line_breaking)
706 (extremity-function . ,calc-slur-extremity)
707 (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
708 (de-uglify-parameters . (1.5 0.8 -2.0))
709 (Y-extent-callback . ,Slur::height)
714 (attachment . (#f . #f))
715 (attachment-offset . ((0 . 0) . (0 . 0)))
717 (details . ((force-blowfit . 0.5)
718 (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
719 (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
720 (bezier-area-steps . 1.0)))
721 (meta . ((interfaces . (slur-interface spanner-interface))))
724 (NonMusicalPaperColumn
727 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
728 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
730 ;; debugging stuff: print column number.
731 ; (print-function . ,Paper_column::print) (font-name . "cmr8") (Y-extent-callback . #f)
734 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
739 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
740 (print-function . ,Multi_measure_rest::percent)
743 (font-encoding . music)
744 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
747 (PianoPedalBracket ;; an example of a text spanner
749 (print-function . ,Piano_pedal_bracket::print)
751 (if-text-padding . 1.0)
753 (bracket-flare . (0.5 . 0.5))
754 (edge-height . (1.0 . 1.0))
755 (shorten-pair . (0.0 . 0.0))
757 (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
761 (RemoveEmptyVerticalGroup
763 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
764 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
767 (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface spanner-interface))))
772 (print-function . ,Percent_repeat_item_interface::beat_slash)
775 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
779 (after-line-breaking-callback . ,Rest::after_line_breaking)
780 (X-extent-callback . ,Rest::extent_callback)
781 (Y-extent-callback . ,Rest::extent_callback)
782 (print-function . ,Rest::print)
783 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
784 ,Rest::polyphonic_offset_callback
786 (minimum-distance . 0.25)
788 (interfaces . (font-interface
789 rhythmic-head-interface
790 rhythmic-grob-interface
791 staff-symbol-referencer-interface
792 rest-interface item-interface ))
797 (minimum-distance . 0.75)
798 (meta . ((interfaces . (rest-collision-interface item-interface ))))
803 ;; don't set direction here: it breaks staccato.
804 (print-function . ,Script_interface::print)
806 ;; This value is sensitive: if too large, staccato dots will move a
809 (staff-padding . 0.25)
810 ;; (script-priority . 0) priorities for scripts, see script.scm
811 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
812 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
813 (font-encoding . music)
814 (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
819 (before-line-breaking-callback . ,Script_column::before_line_breaking)
820 (meta . ((interfaces . (script-column-interface item-interface ))))
825 (print-function . ,Slur::print)
827 (spacing-procedure . ,Spanner::set_spacing_rods)
828 (minimum-length . 1.5)
829 (after-line-breaking-callback . ,Slur::after_line_breaking)
830 (extremity-function . ,calc-slur-extremity)
831 (extremity-offset-alist . ,default-slur-extremity-offset-alist)
832 (de-uglify-parameters . (1.5 0.8 -2.0))
833 (Y-extent-callback . ,Slur::height)
838 (attachment . (#f . #f))
839 (attachment-offset . ((0 . 0) . (0 . 0)))
841 (details . ((force-blowfit . 0.5)
842 (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
843 (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
844 (bezier-area-steps . 1.0)))
845 (meta . ((interfaces . (slur-interface spanner-interface))))
850 (spacing-procedure . ,Spacing_spanner::set_springs)
851 (grace-space-factor . 0.6)
852 (shortest-duration-space . 2.0)
853 (spacing-increment . 1.2)
854 (base-shortest-duration . ,(ly:make-moment 1 8))
855 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
860 (break-align-symbol . staff-bar)
861 (bar-size-procedure . ,Span_bar::get_bar_size)
862 (print-function . ,Span_bar::print)
863 (break-visibility . ,begin-of-line-invisible)
864 (X-extent-callback . ,Span_bar::width_callback)
865 (Y-extent-callback . ())
867 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
871 ;; Ross. page 151 lists other values, we opt for a leaner look
875 (hair-thickness . 1.6)
876 (thick-thickness . 6.0)
877 (meta . ((interfaces . (span-bar-interface font-interface
878 bar-line-interface item-interface ))))
882 . ((print-function . ,Text_item::print)
885 (X-offset-callbacks . (,Side_position_interface::aligned_side))
887 (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))
893 (stem-spacing-correction . 0.4)
895 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
900 (print-function . ,Text_item::print)
902 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
903 (no-spacing-rods . #t)
904 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
905 (font-shape . italic)
906 (self-alignment-X . 0)
907 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
910 (SostenutoPedalLineSpanner
913 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
914 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
918 (minimum-space . 1.0)
920 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
925 (print-function . ,Staff_symbol::print)
927 (ledger-line-thickness . (1.0 . 0.1))
929 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
934 ;; this list is rather long. Trim --hwn
935 (before-line-breaking-callback . ,Stem::before_line_breaking)
936 (print-function . ,Stem::print)
939 ;; 3.5 (or 3 measured from note head) is standard length
940 ;; 32nd, 64th flagged stems should be longer
941 (lengths . (3.5 3.5 3.5 4.5 5.0))
943 ;; Stems in unnatural (forced) direction should be shortened by
944 ;; one staff space, according to [Roush & Gourlay].
945 ;; Flagged stems we shorten only half a staff space.
946 (stem-shorten . (1.0 0.5))
948 ;; default stem direction for note on middle line
949 (neutral-direction . -1)
953 ;; FIXME. 3.5 yields too long beams (according to Ross and
954 ;; looking at Baerenreiter examples) for a number of common
955 ;; boundary cases. Subtracting half a beam thickness fixes
956 ;; this, but the bug may well be somewhere else.
958 ;; FIXME this should come from 'lengths
960 ; (beamed-lengths . (3.26 3.26 1.5))
961 (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
963 ;; We use the normal minima as minimum for the ideal lengths,
964 ;; and the extreme minima as abolute minimum length.
966 ;; The 'normal' minima
967 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
969 ;; The 'extreme case' minima
970 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
972 (X-offset-callbacks . (,Stem::off_callback))
973 (X-extent-callback . ,Stem::dim_callback)
974 (Y-extent-callback . ,Stem::height)
975 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
976 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
981 (print-function . ,Stem_tremolo::print)
982 (Y-extent-callback . ,Stem_tremolo::height)
983 (X-extent-callback . #f)
985 (beam-width . 1.6) ; staff-space
986 (beam-thickness . 0.48) ; staff-space
987 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
992 (X-extent-callback . #f)
993 (Y-extent-callback . #f)
994 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
997 (SeparatingGroupSpanner
999 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1000 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1005 (no-spacing-rods . #t)
1006 (print-function . ,Sustain_pedal::print)
1007 (self-alignment-X . 0)
1009 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1010 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1011 (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
1014 (SustainPedalLineSpanner
1017 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1018 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1021 (staff-padding . 1.2)
1022 (minimum-space . 1.0)
1024 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1030 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1031 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1032 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1038 (print-function . ,System_start_delimiter::print)
1039 (collapse-height . 5.0)
1040 (font-encoding . braces)
1041 (Y-extent-callback . #f)
1042 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1047 (Y-extent-callback . #f)
1048 (print-function . ,System_start_delimiter::print)
1054 (collapse-height . 1)
1056 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1061 (Y-extent-callback . #f)
1062 (print-function . ,System_start_delimiter::print)
1063 (glyph . "bar-line")
1065 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1066 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1071 (print-function . ,Text_item::print)
1072 (no-spacing-rods . #t)
1073 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1076 (staff-padding . 0.5)
1077 (script-priority . 200)
1078 ;; todo: add X self alignment?
1079 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1083 (print-function . ,Text_item::print)
1084 (no-spacing-rods . #t)
1085 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1086 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1088 (extra-offset . (-1 . 0))
1090 (staff-padding . 0.5)
1091 (script-priority . 200)
1092 ;; todo: add X self alignment?
1094 (font-series . bold)
1095 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1099 (print-function . ,Text_spanner::print)
1100 (font-shape . italic)
1101 (style . dashed-line)
1102 (staff-padding . 0.1)
1104 ;; urg, only for (de)cresc. text spanners
1105 (if-text-padding . 1.0)
1106 (dash-fraction . 0.2)
1109 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1114 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1115 (print-function . ,Ottava_bracket::print)
1116 (font-shape . italic)
1117 (shorten-pair . (0.0 . -0.6))
1118 (staff-padding . 1.0)
1120 (minimum-length . 1.0)
1121 (dash-fraction . 0.3)
1122 (edge-height . (0 . 1.2))
1124 (meta . ((interfaces . (ottava-bracket-interface
1125 line-interface side-position-interface
1126 font-interface text-interface spanner-interface))))
1132 (print-function . ,Text_item::print)
1133 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1134 (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
1135 (stem-attachment-function . ,tablature-stem-attachment-function)
1136 (meta . ((interfaces
1137 . (rhythmic-head-interface
1139 note-head-interface staff-symbol-referencer-interface
1140 text-interface item-interface ))))
1146 (print-function . ,Tie::print)
1147 (spacing-procedure . ,Spanner::set_spacing_rods)
1148 (staffline-clearance . 0.35)
1149 (details . ((ratio . 0.333) (height-limit . 1.0)))
1153 (minimum-length . 2.5)
1154 (meta . ((interfaces . (tie-interface spanner-interface))))
1159 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1160 (X-extent-callback . #f)
1161 (Y-extent-callback . #f)
1162 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1167 (print-function . ,Time_signature::print)
1168 ; (print-function . ,Text_item::print)
1169 (break-align-symbol . time-signature)
1170 (break-visibility . ,all-visible)
1172 (first-note . (fixed-space . 2.0))
1173 (right-edge . (extra-space . 0.5))
1174 (staff-bar . (minimum-space . 2.0))
1178 ; (text . (,time-signature-glue-markup))
1179 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1187 (edge-height . (0.7 . 0.7))
1188 (shorten-pair . (-0.2 . -0.2))
1189 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1190 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1191 (print-function . ,Tuplet_bracket::print)
1192 (font-shape . italic)
1193 (font-series . bold)
1196 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1201 (print-function . ,Text_item::print)
1202 (font-shape . italic)
1203 (no-spacing-rods . #t)
1204 (self-alignment-X . 0)
1206 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1207 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1208 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1211 (UnaCordaPedalLineSpanner
1214 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1215 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1217 (staff-padding . 1.2)
1218 (minimum-space . 1.0)
1220 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1227 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1228 (print-function . ,Vaticana_ligature::print)
1229 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1234 (print-function . ,Volta_bracket_interface::print)
1237 (font-encoding . number)
1238 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1239 (thickness . 1.6) ; linethickness
1240 (height . 2.0) ; staffspace;
1243 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1249 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1250 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1252 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1258 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1259 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1261 (meta . ((interfaces . (axis-group-interface spanner-interface))))
1269 (define (completize-grob-entry x)
1270 "transplant assoc key into 'name entry of 'meta of X
1272 (let* ((name-sym (car x))
1273 (grob-entry (cdr x))
1274 (metaentry (cdr (assoc 'meta grob-entry)))
1276 (cdr (assoc 'interfaces metaentry)))
1279 (set! metaentry (assoc-set! metaentry 'name name-sym))
1280 (set! metaentry (assoc-set! metaentry 'interfaces
1281 (cons 'grob-interface ifaces-entry)))
1282 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1283 (cons name-sym grob-entry)))
1285 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1289 ; (display (map pair? all-grob-descriptions))
1292 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1295 ; (display (car x)) (newline)
1297 (set-object-property! (car x) 'translation-type? list?)
1298 (set-object-property! (car x) 'is-grob? #t))
1299 all-grob-descriptions)
1302 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))