1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2005 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
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))))
38 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
39 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
41 (clef . (extra-space . 0.5))
42 (key-signature . (extra-space . 0.0))
43 (staff-bar . (extra-space . 0.0))
44 (time-signature . (extra-space . 0.0))
45 (first-note . (fixed-space . 0.0))
48 (break-align-symbol . ambitus)
49 (break-visibility . ,begin-of-line-visible)
50 (meta . ((interfaces . (axis-group-interface break-aligned-interface ambitus-interface item-interface))))
55 (print-function . ,Ambitus::print)
58 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
60 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
64 (print-function . ,Accidental_interface::print)
67 (X-offset-callbacks . (,Side_position_interface::aligned_side))
69 (cautionary-style . parentheses)
70 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface break-aligned-interface side-position-interface font-interface))))
77 (print-function . ,Note_head::print)
78 (glyph-name-procedure . ,find-notehead-symbol)
79 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
80 (meta . ((interfaces . (font-interface note-head-interface
82 staff-symbol-referencer-interface
83 rhythmic-head-interface
90 (X-extent-callback . ,Arpeggio::width_callback)
91 (Y-extent-callback . #f)
92 (print-function . ,Arpeggio::print)
93 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
94 (X-offset-callbacks . (,Side_position_interface::aligned_side))
97 (staff-position . 0.0)
98 (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
103 (break-align-symbol . staff-bar)
105 (break-glyph-function . ,default-break-barline)
106 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
107 (print-function . ,Bar_line::print)
108 (break-visibility . ,all-visible)
110 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
112 (time-signature . (extra-space . 0.75))
113 (custos . (minimum-space . 2.0))
114 (clef . (minimum-space . 1.0))
115 (key-signature . (extra-space . 1.0))
116 (key-cancellation . (extra-space . 1.0))
117 (first-note . (fixed-space . 1.3))
118 (next-note . (semi-fixed-space . 1.3))
119 (right-edge . (extra-space . 0.0))
123 ;; Ross. page 151 lists other values, we opt for a leaner look
126 ;; kern should scale with linethickness too.
129 (hair-thickness . 1.9)
130 (thick-thickness . 6.0)
131 (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
137 (print-function . ,Text_interface::print)
139 (break-visibility . ,begin-of-line-visible)
142 (font-family . roman)
144 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
145 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
146 (self-alignment-X . 1)
149 ((interfaces . (side-position-interface
151 self-alignment-interface
152 font-interface item-interface break-aligned-interface))))
158 (print-function . ,Text_interface::print)
159 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
161 (font-family . number)
163 ;; We must do this, other BFs in
164 ;; layout16 become too small.
167 (meta . ((interfaces . (text-interface rhythmic-grob-interface
168 bass-figure-interface item-interface
169 self-alignment-interface font-interface))))
173 ;; todo: clean this up a bit: the list is getting
175 (print-function . ,Beam::print)
177 (positions . (#f . #f))
178 (position-callbacks . (,Beam::least_squares
181 ,Beam::shift_region_to_valid
185 ;; TODO: should be in SLT.
186 (thickness . 0.48) ; in staff-space
187 (before-line-breaking-callback . ,Beam::before_line_breaking)
188 (after-line-breaking-callback . ,Beam::after_line_breaking)
189 (neutral-direction . -1)
190 (dir-function . ,beam-dir-majority-median)
192 ;; Whe have some unreferenced problems here.
194 ;; If we shorten beamed stems less than normal stems (1 staffspace),
195 ;; or high order less than 8th beams, patterns like
196 ;; c''4 [c''8 c''] c''4 [c''16 c]
197 ;; are ugly (different stem lengths).
199 ;; But if we shorten 16th beams as much as 8th beams, a single
200 ;; forced 16th beam looks *very* short.
202 ;; We choose to shorten 8th beams the same as single stems,
203 ;; and high order beams less than 8th beams, so that all
204 ;; isolated shortened beams look nice and a bit shortened,
205 ;; sadly possibly breaking patterns with high order beams.
206 (beamed-stem-shorten . (1.0 0.5 0.25))
208 (flag-width-function . ,beam-flag-width-function)
210 (auto-knee-gap . 5.5)
212 ;; only for debugging.
213 (font-family . roman)
215 (space-function . ,Beam::space_function)
216 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
223 (break-align-orders . #(; end-of-line:
225 left-edge ambitus breathing-sign
226 clef staff-bar key-cancellation key-signature
227 time-signature custos)
230 (instrument-name left-edge ambitus breathing-sign
231 clef staff-bar key-cancellation key-signature
233 time-signature custos)
235 (instrument-name left-edge ambitus breathing-sign
236 clef key-cancellation key-signature staff-bar
237 time-signature custos)
241 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
242 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
248 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
249 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
250 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
255 (break-align-symbol . breathing-sign)
258 (ambitus . (extra-space . 2.0))
259 (custos . (minimum-space . 1.0))
260 (key-signature . (minimum-space . 1.5))
261 (staff-bar . (minimum-space . 1.5))
262 (clef . (minimum-space . 2.0))
263 (first-note . (fixed-space . 1.0)) ;huh?
264 (right-edge . (extra-space . 0.1))
266 (print-function . ,Text_interface::print)
267 (text . ,(make-musicglyph-markup "scripts.rcomma"))
268 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
269 (break-visibility . ,begin-of-line-invisible)
270 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
275 (print-function . ,Clef::print)
276 (before-line-breaking-callback . ,Clef::before_line_breaking)
278 (font-family . music)
279 (break-align-symbol . clef)
280 (break-visibility . ,begin-of-line-visible)
281 (space-alist . ((ambitus . (extra-space . 2.0))
282 (staff-bar . (extra-space . 0.7))
283 (key-cancellation . (minimum-space . 4.0))
284 (key-signature . (minimum-space . 4.0))
285 (time-signature . (minimum-space . 4.2))
286 (first-note . (minimum-fixed-space . 5.0))
287 (next-note . (extra-space . 0.5))
288 (right-edge . (extra-space . 0.5))
290 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
291 (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
294 (ClusterSpannerBeacon
296 (print-function . #f)
297 (Y-extent-callback . ,Cluster_beacon::height)
298 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
303 (print-function . ,Cluster::print)
304 (spacing-procedure . ,Spanner::set_spacing_rods)
305 (minimum-length . 0.0)
308 (meta . ((interfaces . (cluster-interface spanner-interface))))
313 (print-function . ,Text_interface::print)
314 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
318 (meta . ((interfaces . (font-interface rhythmic-grob-interface
319 text-interface chord-name-interface item-interface ))))
324 (break-align-symbol . custos)
326 (print-function . ,Custos::print)
327 (break-visibility . ,end-of-line-visible)
329 (neutral-direction . -1)
330 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
332 (first-note . (minimum-fixed-space . 0.0))
333 (right-edge . (extra-space . 0.1))
336 . (custos-interface staff-symbol-referencer-interface
338 break-aligned-interface item-interface ))))
345 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
346 (X-offset-callbacks . (,Dot_column::side_position))
347 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
352 (print-function . ,Dots::print)
354 (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
359 (print-function . ,Percent_repeat_item_interface::double_percent)
362 (font-encoding . fetaMusic)
365 (break-align-symbol . staff-bar)
366 (break-visibility . ,begin-of-line-invisible)
367 (meta . ((interfaces . (font-interface
368 break-aligned-interface
369 percent-repeat-interface item-interface ))))
373 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
374 (print-function . ,Text_interface::print)
375 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
376 ,Self_alignment_interface::centered_on_parent))
377 (self-alignment-X . 0)
378 (no-spacing-rods . #t)
379 (script-priority . 100)
381 (font-encoding . fetaDynamic)
382 (font-shape . italic)
383 (self-alignment-Y . 0)
384 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
385 dynamic-interface script-interface item-interface))))
388 . ((print-function . ,Dynamic_text_spanner::print)
390 ;; rather ugh with NCSB
391 ; (font-series . bold)
392 (font-shape . italic)
393 (style . dashed-line)
395 ; need to blend with dynamic texts.
397 (bound-padding . 0.75)
398 (dash-fraction . 0.2)
400 (meta . ((interfaces . (font-interface
402 dynamic-interface dynamic-text-spanner-interface
409 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
410 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
411 (staff-padding . 0.1)
413 (minimum-space . 1.2)
416 (meta . ((interfaces . (dynamic-interface axis-group-interface
417 side-position-interface spanner-interface))))))
421 (break-align-symbol . left-edge)
424 (break-visibility . ,center-invisible)
426 (custos . (extra-space . 0.0))
427 (ambitus . (extra-space . 2.0))
428 (time-signature . (extra-space . 0.0))
429 (staff-bar . (extra-space . 0.0))
430 (breathing-sign . (minimum-space . 0.0))
431 (clef . (extra-space . 0.8))
432 (first-note . (fixed-space . 1.0))
433 (right-edge . (extra-space . 0.0))
434 (key-signature . (extra-space . 0.0))
435 (key-cancellation . (extra-space . 0.0))
438 (meta . ((interfaces . (break-aligned-interface item-interface ))))
443 (print-function . ,Text_interface::print)
445 ; sync with TextScript (?)
447 (staff-padding . 0.5)
448 (self-alignment-X . 0)
449 (self-alignment-Y . 0)
450 (script-priority . 100)
451 (font-encoding . fetaNumber)
452 (font-size . -5) ; don't overlap when next to heads.
453 (meta . ((interfaces . (finger-interface
454 font-interface text-script-interface text-interface
455 side-position-interface self-alignment-interface
460 (print-function . ,print-circled-text-callback)
462 (staff-padding . 0.5)
463 (self-alignment-X . 0)
464 (self-alignment-Y . 0)
465 (script-priority . 100)
466 (font-encoding . fetaNumber)
467 (font-size . -5) ; don't overlap when next to heads.
468 (meta . ((interfaces . (string-number-interface
469 font-interface text-script-interface text-interface
470 side-position-interface self-alignment-interface
478 (zigzag-width . 0.75)
480 (X-extent-callback . #f)
481 (Y-extent-callback . #f)
482 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
483 (print-function . ,Line_spanner::print)
484 (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
489 (print-function . ,Hairpin::print)
492 (spacing-procedure . ,Spanner::set_spacing_rods)
493 (minimum-length . 2.0)
494 (bound-padding . 1.0)
495 (self-alignment-Y . 0)
496 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
497 (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
503 (print-function . ,Horizontal_bracket::print)
504 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
507 (bracket-flare . (0.5 . 0.5))
508 (meta . ((interfaces . (horizontal-bracket-interface
509 side-position-interface
511 spanner-interface))))
516 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
517 ,Side_position_interface::aligned_on_support_refpoints))
518 ;; This direction is for aligned_on_support_refpoints
522 (left-edge . (extra-space . 1.0))
525 (self-alignment-Y . 0)
526 (print-function . ,Text_interface::print)
527 (break-align-symbol . instrument-name)
528 (break-visibility . ,begin-of-line-visible)
530 (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
536 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
538 (space-alist . ((left-edge . (extra-space . 1.0))
540 (break-align-symbol . instrument-name)
541 (print-function . ,Text_interface::print)
542 (break-align-symbol . clef)
543 (break-visibility . ,begin-of-line-visible)
545 (meta . ((interfaces . (font-interface
546 self-alignment-interface
547 side-position-interface text-interface
548 break-aligned-interface item-interface ))))
552 (print-function . ,Key_signature_interface::print)
554 (time-signature . (extra-space . 1.25))
555 (staff-bar . (extra-space . 0.6))
556 (key-signature . (extra-space . 0.5))
557 (right-edge . (extra-space . 0.5))
558 (first-note . (fixed-space . 2.5))
560 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
561 (break-align-symbol . key-cancellation)
562 (break-visibility . ,begin-of-line-invisible)
565 (meta . ((interfaces . (key-signature-interface font-interface
566 break-aligned-interface item-interface ))))
570 (print-function . ,Key_signature_interface::print)
572 (time-signature . (extra-space . 1.25))
573 (staff-bar . (extra-space . 1.1))
574 (right-edge . (extra-space . 0.5))
575 (first-note . (fixed-space . 2.5))
577 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
578 (break-align-symbol . key-signature)
579 (break-visibility . ,begin-of-line-visible)
582 (meta . ((interfaces . (key-signature-interface font-interface
583 break-aligned-interface item-interface ))))
587 (print-function . ,Ledger_line_spanner::print)
588 (X-extent-callback . #f)
589 (Y-extent-callback . #f)
590 (minimum-length-fraction . 0.25)
591 (length-fraction . 0.25)
592 (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
593 (print-function . ,Ledger_line_spanner::print)
595 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
600 (ligature-primitive-callback . ,Note_head::print)
605 (edge-height . (0.7 . 0.7))
606 (shorten-pair . (-0.2 . -0.2))
607 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
608 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
609 (print-function . ,Tuplet_bracket::print)
610 (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
619 (minimum-length . 0.3)
621 ; (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
622 (print-function . ,Hyphen_spanner::print)
624 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
625 spanner-interface))))
630 (print-function . ,Lyric_extender::print)
631 (thickness . 0.8) ; linethickness
632 (minimum-length . 1.5)
634 (meta . ((interfaces . (lyric-interface
635 lyric-extender-interface spanner-interface))))
639 . ((print-function . ,Text_interface::print)
640 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
641 (self-alignment-X . 0)
643 (font-series . bold-narrow)
645 (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
652 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
653 (print-function . ,Mensural_ligature::print)
654 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
659 (print-function . ,Text_interface::print)
660 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
661 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
662 (after-line-breaking-callback . ,shift-right-at-line-begin)
663 (self-alignment-X . 0)
668 (break-visibility . ,end-of-line-invisible)
670 (meta . ((interfaces . (text-interface
671 side-position-interface font-interface mark-interface
672 self-alignment-interface item-interface ))))
676 (print-function . ,Text_interface::print)
677 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
680 (meta . ((interfaces . (text-interface
681 side-position-interface font-interface
682 metronome-mark-interface item-interface))))
686 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
687 (print-function . ,Measure_grouping::print)
693 (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
697 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
698 (print-function . ,Multi_measure_rest::print)
699 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
702 (thick-thickness . 6.6)
703 (hair-thickness . 2.0)
705 (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
708 (MultiMeasureRestNumber
710 (print-function . ,Text_interface::print)
711 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
712 ,Self_alignment_interface::centered_on_other_axis_parent))
713 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
714 (self-alignment-X . 0)
717 (staff-padding . 0.4)
718 (font-encoding . fetaNumber)
719 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
721 (MultiMeasureRestText
723 (print-function . ,Text_interface::print)
724 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
725 ,Self_alignment_interface::centered_on_other_axis_parent))
726 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
727 (self-alignment-X . 0)
730 (staff-padding . 0.25)
731 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
737 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
738 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
739 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
745 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
746 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
747 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
753 (print-function . ,Note_head::print)
754 (ligature-primitive-callback . ,Note_head::print)
755 (glyph-name-procedure . ,find-notehead-symbol)
756 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
757 (stem-attachment-function . ,note-head-style->attachment-coordinates)
758 (meta . ((interfaces . (rhythmic-grob-interface
759 rhythmic-head-interface font-interface note-head-interface
761 staff-symbol-referencer-interface item-interface ))))
766 (stem-spacing-correction . 0.5)
768 ;; Changed this from 0.75.
769 ;; If you ever change this back, please document! --hwn
770 (knee-spacing-correction . 1.0)
772 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
780 (X-extent-callback . #f)
781 (Y-extent-callback . #f)
782 (print-function . ,Line_spanner::print)
783 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
784 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
789 (print-function . ,Text_interface::print)
790 (meta . ((interfaces . (note-name-interface
791 text-interface font-interface item-interface ))))
796 (self-alignment-X . 0)
797 (break-visibility . ,begin-of-line-visible)
798 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
799 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
800 (print-function . ,Text_interface::print)
802 ;; no Y dimensions, because of lyrics under tenor clef.
804 (font-shape . italic)
806 (staff-padding . 0.2)
808 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
814 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
815 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
817 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
818 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
822 . ((slur-details . ,default-slur-details)
823 (print-function . ,Slur::print)
825 (spacing-procedure . ,Spanner::set_spacing_rods)
826 (minimum-length . 1.5)
827 (after-line-breaking-callback . ,Slur::after_line_breaking)
828 (Y-extent-callback . ,Slur::height)
831 (meta . ((interfaces . (slur-interface spanner-interface))))
834 (NonMusicalPaperColumn
837 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
838 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
840 ;; debugging stuff: print column number.
841 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
844 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
849 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
850 (print-function . ,Multi_measure_rest::percent)
853 (font-encoding . fetaMusic)
854 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
857 ;; an example of a text spanner
860 (print-function . ,Piano_pedal_bracket::print)
862 (bound-padding . 1.0)
864 (bracket-flare . (0.5 . 0.5))
865 (edge-height . (1.0 . 1.0))
866 (shorten-pair . (0.0 . 0.0))
868 (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
872 (RemoveEmptyVerticalGroup
874 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
875 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
878 (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface hara-kiri-group-interface item-interface spanner-interface))))
883 (print-function . ,Percent_repeat_item_interface::beat_slash)
886 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
890 (after-line-breaking-callback . ,Rest::after_line_breaking)
891 (X-extent-callback . ,Rest::extent_callback)
892 (Y-extent-callback . ,Rest::extent_callback)
893 (print-function . ,Rest::print)
894 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
895 ,Rest::polyphonic_offset_callback
897 (minimum-distance . 0.25)
899 (interfaces . (font-interface
900 rhythmic-head-interface
901 rhythmic-grob-interface
902 staff-symbol-referencer-interface
903 rest-interface item-interface ))
908 (minimum-distance . 0.75)
909 (meta . ((interfaces . (rest-collision-interface item-interface ))))
914 ;; don't set direction here: it breaks staccato.
915 (print-function . ,Script_interface::print)
917 ;; This value is sensitive: if too large, staccato dots will move a
920 (staff-padding . 0.25)
921 ;; (script-priority . 0) priorities for scripts, see script.scm
922 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
923 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
924 (font-encoding . fetaMusic)
925 (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
930 (before-line-breaking-callback . ,Script_column::before_line_breaking)
931 (meta . ((interfaces . (script-column-interface item-interface ))))
935 . ((slur-details . ,default-slur-details)
936 (print-function . ,Slur::print)
938 (spacing-procedure . ,Spanner::set_spacing_rods)
939 (minimum-length . 1.5)
940 (after-line-breaking-callback . ,Slur::after_line_breaking)
941 (Y-extent-callback . ,Slur::height)
945 (meta . ((interfaces . (slur-interface spanner-interface))))
950 (spacing-procedure . ,Spacing_spanner::set_springs)
951 (grace-space-factor . 0.6)
952 (shortest-duration-space . 2.0)
953 (spacing-increment . 1.2)
954 (base-shortest-duration . ,(ly:make-moment 3 16))
955 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
960 (break-align-symbol . staff-bar)
961 (bar-size-procedure . ,Span_bar::get_bar_size)
962 (print-function . ,Span_bar::print)
963 (X-extent-callback . ,Span_bar::width_callback)
964 (Y-extent-callback . ())
966 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
970 ;; Ross. page 151 lists other values, we opt for a leaner look
974 (hair-thickness . 1.6)
975 (thick-thickness . 6.0)
976 (meta . ((interfaces . (span-bar-interface font-interface
977 bar-line-interface item-interface ))))
981 . ((print-function . ,Text_interface::print)
984 (X-offset-callbacks . (,Side_position_interface::aligned_side))
986 (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))
992 (stem-spacing-correction . 0.4)
994 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
999 (print-function . ,Text_interface::print)
1001 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1002 (no-spacing-rods . #t)
1003 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1004 (font-shape . italic)
1005 (self-alignment-X . 0)
1006 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
1009 (SostenutoPedalLineSpanner
1012 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1013 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1017 (minimum-space . 1.0)
1019 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1024 (print-function . ,Staff_symbol::print)
1026 (ledger-line-thickness . (1.0 . 0.1))
1028 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1033 ;; this list is rather long. Trim --hwn
1034 (before-line-breaking-callback . ,Stem::before_line_breaking)
1035 (print-function . ,Stem::print)
1038 ;; 3.5 (or 3 measured from note head) is standard length
1039 ;; 32nd, 64th flagged stems should be longer
1040 (lengths . (3.5 3.5 3.5 4.5 5.0))
1042 ;; Stems in unnatural (forced) direction should be shortened by
1043 ;; one staff space, according to [Roush & Gourlay].
1044 ;; Flagged stems we shorten only half a staff space.
1045 (stem-shorten . (1.0 0.5))
1047 ;; default stem direction for note on middle line
1048 (neutral-direction . -1)
1052 ;; FIXME. 3.5 yields too long beams (according to Ross and
1053 ;; looking at Baerenreiter examples) for a number of common
1054 ;; boundary cases. Subtracting half a beam thickness fixes
1055 ;; this, but the bug may well be somewhere else.
1057 ;; FIXME this should come from 'lengths
1059 (beamed-lengths . (3.26 3.5 3.6))
1061 ;; We use the normal minima as minimum for the ideal lengths,
1062 ;; and the extreme minima as abolute minimum length.
1064 ;; The 'normal' minima
1065 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1066 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1068 ;; The 'extreme case' minima
1069 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1071 (X-offset-callbacks . (,Stem::offset_callback))
1072 (X-extent-callback . ,Stem::width_callback)
1073 (Y-extent-callback . ,Stem::height)
1074 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1075 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1080 (print-function . ,Stem_tremolo::print)
1081 (Y-extent-callback . ,Stem_tremolo::height)
1082 (X-extent-callback . #f)
1084 (beam-width . 1.6) ; staff-space
1085 (beam-thickness . 0.48) ; staff-space
1086 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1091 (X-extent-callback . #f)
1092 (Y-extent-callback . #f)
1093 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1096 (SeparatingGroupSpanner
1098 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1099 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1104 (no-spacing-rods . #t)
1105 (print-function . ,Sustain_pedal::print)
1106 (self-alignment-X . 0)
1108 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1109 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1110 (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
1113 (SustainPedalLineSpanner
1116 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1117 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1120 (staff-padding . 1.2)
1121 (minimum-space . 1.0)
1123 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1129 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1130 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1131 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1137 (print-function . ,System_start_delimiter::print)
1138 (collapse-height . 5.0)
1139 (font-encoding . fetaBraces)
1140 (Y-extent-callback . #f)
1141 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1146 (Y-extent-callback . #f)
1147 (print-function . ,System_start_delimiter::print)
1153 (collapse-height . 1)
1155 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1160 (Y-extent-callback . #f)
1161 (print-function . ,System_start_delimiter::print)
1162 (glyph . "bar-line")
1164 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1165 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1170 (print-function . ,Text_interface::print)
1171 (no-spacing-rods . #t)
1172 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1175 ; sync with Fingering ?
1177 (staff-padding . 0.5)
1178 (script-priority . 200)
1179 ;; todo: add X self alignment?
1180 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1184 (print-function . ,Text_interface::print)
1185 (no-spacing-rods . #t)
1186 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1187 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1190 (staff-padding . 0.5)
1191 (script-priority . 200)
1192 ;; todo: add X self alignment?
1194 (font-series . bold)
1195 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1199 (print-function . ,Text_spanner::print)
1200 (font-shape . italic)
1201 (style . dashed-line)
1202 (staff-padding . 0.1)
1203 (dash-fraction . 0.2)
1206 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1210 (print-function . ,Dynamic_text_spanner::print)
1211 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1214 (staff-padding . 1.0)
1217 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1218 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1223 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1224 (print-function . ,Ottava_bracket::print)
1225 (font-shape . italic)
1226 (shorten-pair . (0.0 . -0.6))
1227 (staff-padding . 1.0)
1229 (minimum-length . 1.0)
1230 (dash-fraction . 0.3)
1231 (edge-height . (0 . 1.2))
1233 (meta . ((interfaces . (ottava-bracket-interface
1234 line-interface side-position-interface
1235 font-interface text-interface spanner-interface))))
1241 (print-function . ,Text_interface::print)
1242 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1243 (stem-attachment-function . ,tablature-stem-attachment-function)
1244 (font-series . bold)
1245 (meta . ((interfaces
1246 . (rhythmic-head-interface
1248 note-head-interface staff-symbol-referencer-interface
1249 text-interface item-interface ))))
1255 (print-function . ,Tie::print)
1256 (spacing-procedure . ,Spanner::set_spacing_rods)
1257 (staffline-clearance . 0.35)
1258 (details . ((ratio . 0.333) (height-limit . 1.0)))
1262 (minimum-length . 2.5)
1263 (meta . ((interfaces . (tie-interface spanner-interface))))
1268 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1269 (before-line-breaking-callback . ,Tie_column::before_line_breaking)
1270 (X-extent-callback . #f)
1271 (Y-extent-callback . #f)
1272 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1277 (print-function . ,Time_signature::print)
1278 ; (print-function . ,Text_interface::print)
1279 (break-align-symbol . time-signature)
1280 (break-visibility . ,all-visible)
1282 (first-note . (fixed-space . 2.0))
1283 (right-edge . (extra-space . 0.5))
1284 (staff-bar . (minimum-space . 2.0))
1288 ; (text . (,time-signature-glue-markup))
1289 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1296 (edge-height . (0.7 . 0.7))
1297 (shorten-pair . (-0.2 . -0.2))
1298 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1299 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1300 (print-function . ,Tuplet_bracket::print)
1301 (font-shape . italic)
1302 ; (font-series . bold)
1305 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1310 (print-function . ,Text_interface::print)
1311 (font-shape . italic)
1312 (no-spacing-rods . #t)
1313 (self-alignment-X . 0)
1315 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1316 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1317 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1320 (UnaCordaPedalLineSpanner
1323 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1324 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1326 (staff-padding . 1.2)
1327 (minimum-space . 1.0)
1329 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1336 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1337 (print-function . ,Vaticana_ligature::print)
1338 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1343 (print-function . ,Volta_bracket_interface::print)
1346 (font-encoding . fetaNumber)
1347 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1348 (thickness . 1.6) ;; linethickness
1349 (height . 2.0) ;; staffspace;
1352 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1358 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1359 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1361 ;; (threshold . (6 . 1000))
1362 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1368 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1369 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1371 (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface spanner-interface))))
1379 (define (completize-grob-entry x)
1380 "transplant assoc key into 'name entry of 'meta of X
1382 (let* ((name-sym (car x))
1383 (grob-entry (cdr x))
1384 (metaentry (cdr (assoc 'meta grob-entry)))
1386 (cdr (assoc 'interfaces metaentry)))
1389 (set! metaentry (assoc-set! metaentry 'name name-sym))
1390 (set! metaentry (assoc-set! metaentry 'interfaces
1391 (cons 'grob-interface ifaces-entry)))
1392 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1393 (cons name-sym grob-entry)))
1395 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1398 ;; (display (map pair? all-grob-descriptions))
1400 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1403 ;; (display (car x)) (newline)
1405 (set-object-property! (car x) 'translation-type? list?)
1406 (set-object-property! (car x) 'is-grob? #t))
1407 all-grob-descriptions)
1409 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))