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?
16 ;;; todo:: reorder sensibly.
18 (define-public all-grob-descriptions
23 (cautionary-style . parentheses)
25 (stencil . ,Accidental_interface::print)
27 . ,Accidental_interface::after_line_breaking)
29 (meta . ((class . Item)
30 (interfaces . (accidental-interface
35 (stencil . ,Accidental_interface::print)
36 (X-offset . ,(ly:make-simple-closure
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)
42 (cautionary-style . smaller)
43 (Y-offset . ,Side_position_interface::y_aligned_side)
44 (cautionary-style . parentheses)
46 (staff-padding . 0.25)
49 (meta . ((class . Item)
50 (interfaces . (side-position-interface
53 accidental-suggestion-interface
54 self-alignment-interface
60 (positioning-done . ,Accidental_placement::calc_positioning_done)
61 (X-extent . ,Axis_group_interface::width)
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))))))
71 (X-extent . ,Axis_group_interface::width)
72 (X-extent . ,Axis_group_interface::height)
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))))
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))))))
91 (stencil . ,Ambitus::print)
95 (X-offset . ,Self_alignment_interface::centered_on_x_parent)
97 (meta . ((class . Item)
98 (interfaces . (ambitus-interface
99 staff-symbol-referencer-interface
103 (font-family . music)
105 (X-offset . ,Side_position_interface::x_aligned_side)
107 (cautionary-style . parentheses)
109 (stencil . ,Accidental_interface::print)
110 (after-line-breaking . ,Accidental_interface::after_line_breaking)
113 (meta . ((class . Item)
114 (interfaces . (item-interface
116 break-aligned-interface
117 side-position-interface
124 (stencil . ,Note_head::print)
125 (glyph-name . ,note-head::calc-glyph-name)
127 (Y-offset . ,Staff_symbol_referencer::callback)
128 (meta . ((class . Item)
129 (interfaces . (font-interface
132 staff-symbol-referencer-interface
133 rhythmic-head-interface
134 ledgered-interface))))))
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)
144 (staff-position . 0.0)
145 (meta . ((class . Item)
146 (interfaces . (arpeggio-interface
147 staff-symbol-referencer-interface
148 side-position-interface
153 (break-align-symbol . staff-bar)
156 (break-visibility . ,all-visible)
159 (stencil . ,Bar_line::print)
160 (glyph-name . ,bar-line::calc-glyph-name)
161 (bar-size . ,Bar_line::calc_bar_size)
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))))
174 ;; Ross. page 151 lists other values, we opt for a leaner look
177 ;; kern should scale with linethickness too.
180 (hair-thickness . 1.9)
181 (thick-thickness . 6.0)
182 (meta . ((class . Item)
183 (interfaces . (bar-line-interface
184 break-aligned-interface
189 (stencil . ,Text_interface::print)
191 (break-visibility . ,begin-of-line-visible)
194 (font-family . roman)
196 (Y-offset . ,Side_position_interface::y_aligned_side)
198 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
199 (self-alignment-X . 1)
203 (interfaces . (side-position-interface
205 self-alignment-interface
207 break-aligned-interface))))
213 (stencil . ,Text_interface::print)
215 (meta . ((class . Item)
216 (interfaces . (text-interface
217 rhythmic-grob-interface
218 bass-figure-interface
223 (stencil . ,Enclosing_bracket::print)
225 (edge-height . (0.2 . 0.2))
226 (meta . ((class . Item)
227 (interfaces . (enclosing-bracket-interface)) ))
229 (BassFigureContinuation
232 (stencil . ,Figured_bass_continuation::print)
234 (Y-offset . ,Figured_bass_continuation::center_on_figures)
235 (meta . ((class . Spanner)
236 (interfaces . (figured-bass-continuation-interface))
242 (Y-extent . ,Axis_group_interface::height)
244 (meta . ((class . Spanner)
245 (interfaces . (axis-group-interface
251 (threshold . (2 . 1000))
253 (positioning-done . ,Align_interface::calc_positioning_done)
254 (Y-extent . ,Axis_group_interface::height)
257 (meta . ((class . Spanner)
258 (interfaces . (align-interface
259 axis-group-interface))))))
263 ;; todo: clean this up a bit: the list is getting
266 (positions . ,(ly:make-simple-closure
267 (ly:make-simple-closure
268 (list chain-grob-member-functions
270 Beam::calc_least_squares_positions
272 Beam::shift_region_to_valid
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)
284 ;; TODO: should be in SLT.
285 (thickness . 0.48) ; in staff-space
286 (neutral-direction . -1)
288 ;; Whe have some unreferenced problems here.
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).
295 ;; But if we shorten 16th beams as much as 8th beams, a single
296 ;; forced 16th beam looks *very* short.
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))
304 (auto-knee-gap . 5.5)
306 ;; only for debugging.
307 (font-family . roman)
308 (meta . ((class . Spanner)
309 (interfaces . (staff-symbol-referencer-interface
317 (positioning-done . ,Break_align_interface::calc_positioning_done)
318 (X-extent . ,Axis_group_interface::width)
320 (break-align-orders . ;; end of line
342 time-signature custos)
356 (meta . ((class . Item)
357 (interfaces . (break-alignment-interface
358 axis-group-interface))))))
364 (X-extent . ,Axis_group_interface::width)
366 (meta . ((class . Item)
367 (interfaces . (break-aligned-interface
368 axis-group-interface))))))
372 (break-align-symbol . breathing-sign)
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))))
384 (stencil . ,Text_interface::print)
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
398 (stencil . ,Clef::print)
399 (glyph-name . ,Clef::calc_glyph_name)
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
418 break-aligned-interface))))))
420 (ClusterSpannerBeacon
423 (Y-extent . ,Cluster_beacon::height)
425 (meta . ((class . Item)
426 (interfaces . (cluster-beacon-interface))))))
431 (springs-and-rods . ,Spanner::set_spacing_rods)
432 (stencil . ,Cluster::print)
435 (minimum-length . 0.0)
438 (meta . ((class . Spanner)
439 (interfaces . (cluster-interface))))))
444 (stencil . ,Text_interface::print)
445 (after-line-breaking . ,Chord_name::after_line_breaking)
450 (meta . ((class . Item)
451 (interfaces . (font-interface
452 rhythmic-grob-interface
460 (stencil . ,Text_interface::print)
462 (no-spacing-rods . #t)
463 (Y-offset . ,Side_position_interface::y_aligned_side)
464 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
467 (staff-padding . 0.5)
468 (script-priority . 200)
469 ;; todo: add X self alignment?
473 (meta . ((class . Item)
474 (interfaces . (text-script-interface
476 side-position-interface
481 (break-align-symbol . custos)
484 (stencil . ,Custos::print)
486 (break-visibility . ,end-of-line-visible)
488 (neutral-direction . -1)
489 (Y-offset . ,Staff_symbol_referencer::callback)
491 (first-note . (minimum-fixed-space . 0.0))
492 (right-edge . (extra-space . 0.1))))
493 (meta . ((class . Item)
496 staff-symbol-referencer-interface
498 break-aligned-interface))))))
505 (positioning-done . ,Dot_column::calc_positioning_done)
506 (X-extent . ,Axis_group_interface::width)
508 (X-offset . ,Dot_column::side_position)
509 (meta . ((class . Item)
510 (interfaces . (dot-column-interface
511 axis-group-interface))))))
516 (stencil . ,Dots::print)
519 (meta . ((class . Item)
520 (interfaces . (font-interface
521 staff-symbol-referencer-interface
526 (stencil . ,Percent_repeat_item_interface::double_percent)
529 (font-encoding . fetaMusic)
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))))))
539 (DoublePercentRepeatCounter
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)
551 (staff-padding . 0.25)
553 (meta . ((class . Item)
554 (interfaces . (side-position-interface
555 self-alignment-interface
556 percent-repeat-interface
562 (Y-offset . ,Side_position_interface::y_aligned_side)
563 (staff-padding . 0.1)
565 (avoid-slur . outside)
567 (minimum-space . 1.2)
571 (Y-extent . ,Axis_group_interface::height)
572 (X-extent . ,Axis_group_interface::width)
575 (meta . ((class . Spanner)
576 (interfaces . (axis-group-interface
578 dynamic-line-spanner-interface
579 side-position-interface))))))
586 (stencil . ,Text_interface::print)
587 (direction . ,Script_interface::calc_direction)
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)
594 (font-encoding . fetaDynamic)
595 (font-shape . italic)
597 (no-spacing-rods . #t)
598 (script-priority . 100)
599 (meta . ((class . Item)
600 (interfaces . (font-interface
602 self-alignment-interface
604 script-interface))))))
609 (stencil . ,Dynamic_text_spanner::print)
611 ;; rather ugh with NCSB
612 ;; (font-series . bold)
613 (font-shape . italic)
614 (style . dashed-line)
616 ;; need to blend with dynamic texts.
618 (bound-padding . 0.75)
619 (dash-fraction . 0.2)
621 (meta . ((class . Spanner)
622 (interfaces . (font-interface
625 dynamic-text-spanner-interface
626 spanner-interface))))))
631 ;; sync with TextScript (?)
634 (avoid-slur . around)
636 (staff-padding . 0.5)
637 (self-alignment-X . 0)
638 (self-alignment-Y . 0)
639 (script-priority . 100)
641 (stencil . ,Text_interface::print)
642 (direction . ,Script_interface::calc_direction)
644 (font-encoding . fetaNumber)
645 (font-size . -5) ; don't overlap when next to heads.
646 (meta . ((class . Item)
647 (interfaces . (finger-interface
649 text-script-interface
651 side-position-interface
652 self-alignment-interface
658 (zigzag-width . 0.75)
663 (stencil . ,Line_spanner::print)
664 (after-line-breaking . ,Line_spanner::after_line_breaking)
667 (meta . ((class . Spanner)
668 (interfaces . (line-interface
669 line-spanner-interface))))))
675 (meta . ((class . Item)
676 (interfaces . (grid-point-interface))))))
681 (X-extent . ,Grid_line_interface::width)
682 (stencil . ,Grid_line_interface::print)
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)))))
689 (meta . ((class . Item)
690 (interfaces . (self-alignment-interface
691 grid-line-interface))))))
697 (stencil . ,Hairpin::print)
698 (springs-and-rods . ,Spanner::set_spacing_rods)
699 (after-line-breaking . ,Hairpin::after_line_breaking)
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
710 self-alignment-interface
712 spanner-interface))))))
717 (stencil . ,Horizontal_bracket::print)
718 (Y-offset . ,Side_position_interface::y_aligned_side)
720 (staff-padding . 0.2)
723 (bracket-flare . (0.5 . 0.5))
724 (meta . ((class . Spanner)
725 (interfaces . (horizontal-bracket-interface
726 side-position-interface
728 spanner-interface))))))
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)))))
735 ;; This direction is for aligned_on_support_refpoints
739 (left-edge . (extra-space . 1.0))))
741 (self-alignment-Y . 0)
742 (stencil . ,Text_interface::print)
743 (break-align-symbol . instrument-name)
744 (break-visibility . ,begin-of-line-visible)
747 (meta . ((class . Item)
748 (interfaces . (font-interface
749 self-alignment-interface
750 side-position-interface
752 break-aligned-interface))))))
757 (stencil . ,Key_signature_interface::print)
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)
770 (meta . ((class . Item)
771 (interfaces . (key-signature-interface
773 break-aligned-interface))))))
777 (stencil . ,Key_signature_interface::print)
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)
789 (meta . ((class . Item)
790 (interfaces . (key-signature-interface
792 break-aligned-interface))))))
796 (stencil . ,Tie::print)
797 (control-points . ,Laissez_vibrer_tie::calc_control_points)
798 (direction . ,Laissez_vibrer_tie::calc_direction)
800 (details . ((ratio . 0.333)
801 (height-limit . 1.0)))
803 (meta . ((class . Item)
804 (interfaces . (laissez-vibrer-tie-interface))
808 (LaissezVibrerTieColumn
813 (positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
815 (meta . ((class . Item)
816 (interfaces . (laissez-vibrer-tie-column-interface))
823 (springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
825 (stencil . ,Ledger_line_spanner::print)
829 (minimum-length-fraction . 0.25)
830 (length-fraction . 0.25)
832 (meta . ((class . Spanner)
833 (interfaces . (ledger-line-interface))))))
837 (break-align-symbol . left-edge)
840 (break-visibility . ,center-invisible)
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))
853 (meta . ((class . Item)
854 (interfaces . (break-aligned-interface))))))
858 ;; ugh. A ligature bracket is totally different from
863 (edge-height . (0.7 . 0.7))
864 (shorten-pair . (-0.2 . -0.2))
866 (positions . ,Tuplet_bracket::calc_positions)
867 (stencil . ,Tuplet_bracket::print)
869 (meta . ((class . Spanner)
870 (interfaces . (tuplet-bracket-interface
879 (minimum-length . 0.3)
880 (minimum-distance . 0.1)
882 (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
884 (stencil . ,Hyphen_spanner::print)
887 (meta . ((class . Spanner)
888 (interfaces . (lyric-interface
889 lyric-hyphen-interface
890 spanner-interface))))))
895 (stencil . ,Lyric_extender::print)
897 (thickness . 0.8) ; linethickness
898 (minimum-length . 1.5)
900 (meta . ((class . Spanner)
901 (interfaces . (lyric-interface
902 lyric-extender-interface))))))
905 . ((minimum-distance . 0.3)
906 (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
910 (meta . ((class . Spanner)
911 (interfaces . (spanner-interface
912 lyric-hyphen-interface spacing-interface))
918 (stencil . ,Text_interface::print)
920 (X-offset . ,Self_alignment_interface::aligned_on_x_parent)
921 (self-alignment-X . 0)
923 (font-series . bold-narrow)
925 (meta . ((class . Item)
926 (interfaces . (rhythmic-grob-interface
927 lyric-syllable-interface
928 self-alignment-interface
936 (stencil . ,Mensural_ligature::print)
938 (meta . ((class . Spanner)
939 (interfaces . (mensural-ligature-interface
945 (stencil . ,Text_interface::print)
947 (Y-offset . ,Side_position_interface::y_aligned_side)
951 (meta . ((class . Item)
952 (interfaces . (text-interface
953 side-position-interface
955 metronome-mark-interface))))))
959 (Y-offset . ,Side_position_interface::y_aligned_side)
962 (stencil . ,Measure_grouping::print)
969 (meta . ((class . Spanner)
970 (interfaces . (side-position-interface
971 measure-grouping-interface))))))
975 (stencil . ,Multi_measure_rest::print)
976 (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
977 (Y-offset . ,Staff_symbol_referencer::callback)
980 (thick-thickness . 6.6)
981 (hair-thickness . 2.0)
983 (meta . ((class . Spanner)
984 (interfaces . (multi-measure-rest-interface
985 multi-measure-interface
988 staff-symbol-referencer-interface))))))
991 (MultiMeasureRestNumber
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)
1001 (self-alignment-X . 0)
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
1014 (MultiMeasureRestText
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)))))
1021 (Y-offset . ,Side_position_interface::y_aligned_side)
1022 (self-alignment-X . 0)
1025 (staff-padding . 0.25)
1026 (meta . ((class . Spanner)
1027 (interfaces . (side-position-interface
1028 multi-measure-interface
1029 self-alignment-interface
1031 text-interface))))))
1037 (X-extent . ,Axis_group_interface::width)
1038 (Y-extent . ,Axis_group_interface::height)
1039 (positioning-done . ,Note_collision_interface::calc_positioning_done)
1041 (meta . ((class . Item)
1042 (interfaces . (note-collision-interface
1043 axis-group-interface))))))
1048 (X-extent . ,Axis_group_interface::width)
1049 (Y-extent . ,Axis_group_interface::height)
1051 (meta . ((class . Item)
1052 (interfaces . (axis-group-interface
1053 note-column-interface))))))
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
1069 staff-symbol-referencer-interface))))))
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)
1079 (meta . ((class . Item)
1080 (interfaces . (spacing-interface
1081 note-spacing-interface))))))
1086 (stencil . ,Text_interface::print)
1088 (meta . ((class . Item)
1089 (interfaces . (note-name-interface
1091 font-interface))))))
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)))))
1101 (Y-offset . ,Side_position_interface::y_aligned_side)
1103 (stencil . ,Text_interface::print)
1106 ;; no Y dimensions, because of lyrics under tenor clef.
1107 (Y-extent . (0 . 0))
1108 (font-shape . italic)
1110 (staff-padding . 0.2)
1112 (meta . ((class . Item)
1113 (interfaces . (text-interface
1114 self-alignment-interface
1115 side-position-interface
1116 font-interface))))))
1120 (Y-offset . ,Side_position_interface::y_aligned_side)
1122 (stencil . ,Ottava_bracket::print)
1124 (font-shape . italic)
1125 (shorten-pair . (0.0 . -0.6))
1126 (staff-padding . 1.0)
1128 (minimum-length . 1.0)
1129 (dash-fraction . 0.3)
1130 (edge-height . (0 . 1.2))
1132 (meta . ((class . Spanner)
1133 (interfaces . (ottava-bracket-interface
1134 horizontal-bracket-interface
1136 side-position-interface
1138 text-interface))))))
1144 (before-line-breaking . ,Paper_column::before_line_breaking)
1145 ;; (stencil . ,Paper_column::print)
1146 (X-extent . ,Axis_group_interface::width)
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))))))
1157 . ((details . ,default-slur-details)
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)
1167 (minimum-length . 1.5)
1168 (height-limit . 2.0)
1170 (meta . ((class . Spanner)
1171 (interfaces . (slur-interface))))))
1173 (NonMusicalPaperColumn
1177 (before-line-breaking . ,Paper_column::before_line_breaking)
1178 (X-extent . ,Axis_group_interface::width)
1179 ;; (stencil . ,Paper_column::print)
1183 ;; debugging stuff: print column number.
1184 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1186 (meta . ((class . Paper_column)
1187 (interfaces . (paper-column-interface
1188 axis-group-interface
1189 spaceable-grob-interface))))))
1194 (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
1195 (stencil . ,Multi_measure_rest::percent)
1199 (font-encoding . fetaMusic)
1200 (meta . ((class . Spanner)
1201 (interfaces . (multi-measure-rest-interface
1203 percent-repeat-interface))))))
1204 (PercentRepeatCounter
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)
1214 (staff-padding . 0.25)
1216 (font-encoding . fetaNumber)
1217 (meta . ((class . Spanner)
1218 (interfaces . (side-position-interface
1219 self-alignment-interface
1220 percent-repeat-interface
1222 text-interface))))))
1224 ;; an example of a text spanner
1228 (stencil . ,Piano_pedal_bracket::print)
1231 (bound-padding . 1.0)
1233 (bracket-flare . (0.5 . 0.5))
1234 (edge-height . (1.0 . 1.0))
1235 (shorten-pair . (0.0 . 0.0))
1237 (meta . ((class . Spanner)
1238 (interfaces . (line-interface
1239 piano-pedal-interface
1240 piano-pedal-bracket-interface))))))
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)))
1251 (Y-offset . ,Side_position_interface::y_aligned_side)
1252 (self-alignment-X . 0)
1257 (break-visibility . ,end-of-line-invisible)
1259 (meta . ((class . Item)
1260 (interfaces . (text-interface
1261 side-position-interface
1264 self-alignment-interface))))))
1270 (stencil . ,Percent_repeat_item_interface::beat_slash)
1274 (meta . ((class . Item)
1275 (interfaces . (percent-repeat-interface))))))
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))))))
1292 (minimum-distance . 0.75)
1293 (positioning-done . ,Rest_collision::calc_positioning_done)
1295 (meta . ((class . Item)
1296 (interfaces . (rest-collision-interface))))))
1300 ;; don't set direction here: it breaks staccato.
1302 ;; This value is sensitive: if too large, staccato dots will move a
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)
1310 (stencil . ,Script_interface::print)
1311 (direction . ,Script_interface::calc_direction)
1313 (font-encoding . fetaMusic)
1314 (meta . ((class . Item)
1315 (interfaces . (script-interface
1316 side-position-interface
1317 font-interface))))))
1322 (before-line-breaking . ,Script_column::before_line_breaking)
1324 (meta . ((class . Item)
1325 (interfaces . (script-column-interface))))))
1331 (meta . ((class . Item)
1332 (interfaces . (spacing-interface
1333 separation-item-interface))))))
1335 (SeparatingGroupSpanner
1338 (springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1340 (meta . ((class . Spanner)
1341 (interfaces . (only-prebreak-interface
1343 separation-spanner-interface))))))
1346 . ((details . ,default-slur-details)
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)
1355 (minimum-length . 1.5)
1357 (height-limit . 2.0)
1359 (meta . ((class . Spanner)
1360 (interfaces . (slur-interface))))))
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))))))
1377 (break-align-symbol . staff-bar)
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)
1391 ;; Ross. page 151 lists other values, we opt for a leaner look
1395 (hair-thickness . 1.6)
1396 (thick-thickness . 6.0)
1397 (meta . ((class . Item)
1398 (interfaces . (span-bar-interface
1400 bar-line-interface))))))
1404 (stencil . ,Text_interface::print)
1406 (font-series . bold)
1408 (X-offset . ,Side_position_interface::x_aligned_side)
1411 (meta . ((class . Item)
1412 (interfaces . (side-position-interface
1413 stanza-number-interface
1415 font-interface))))))
1420 (stencil . ,print-circled-text-callback)
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
1432 text-script-interface
1434 side-position-interface
1435 self-alignment-interface
1436 item-interface))))))
1441 (stem-spacing-correction . 0.4)
1442 (meta . ((class . Item)
1443 (interfaces . (spacing-interface
1444 staff-spacing-interface))))))
1449 (stencil . ,Text_interface::print)
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))))))
1462 (SostenutoPedalLineSpanner
1466 (X-extent . ,Axis_group_interface::height)
1468 (Y-offset . ,Side_position_interface::y_aligned_side)
1472 (minimum-space . 1.0)
1474 (meta . ((class . Spanner)
1475 (interfaces . (piano-pedal-interface
1476 axis-group-interface
1477 side-position-interface))))))
1482 (stencil . ,Staff_symbol::print)
1485 (ledger-line-thickness . (1.0 . 0.1))
1487 (meta . ((class . Spanner)
1488 (interfaces . (staff-symbol-interface))))))
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)
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))
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.
1514 ;; FIXME this should come from 'lengths
1515 (beamed-lengths . (3.26 3.5 3.6))
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))
1521 ;; The 'extreme case' minima
1522 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
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))
1532 ;; default stem direction for note on middle line
1533 (neutral-direction . -1)
1535 ;; We use the normal minima as minimum for the ideal lengths,
1536 ;; and the extreme minima as abolute minimum length.
1538 (X-offset . ,Stem::offset_callback)
1539 (Y-offset . ,Staff_symbol_referencer::callback)
1540 (meta . ((class . Item)
1541 (interfaces . (stem-interface
1542 font-interface))))))
1546 (Y-extent . ,Stem_tremolo::height)
1547 (stencil . ,Stem_tremolo::print)
1549 (beam-width . 1.6) ; staff-space
1550 (beam-thickness . 0.48) ; staff-space
1551 (meta . ((class . Item)
1552 (interfaces . (stem-tremolo-interface))))))
1556 (no-spacing-rods . #t)
1557 (stencil . ,Sustain_pedal::print)
1558 (self-alignment-X . 0)
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
1566 self-alignment-interface
1567 font-interface))))))
1569 (SustainPedalLineSpanner
1572 (X-extent . ,Axis_group_interface::height)
1573 (Y-offset . ,Side_position_interface::y_aligned_side)
1576 (staff-padding . 1.2)
1577 (minimum-space . 1.0)
1579 (meta . ((class . Spanner)
1580 (interfaces . (piano-pedal-interface
1581 axis-group-interface
1582 side-position-interface))))))
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))))))
1597 (stencil . ,System_start_delimiter::print)
1598 (collapse-height . 5.0)
1599 (X-offset . ,Side_position_interface::x_aligned_side)
1601 (font-encoding . fetaBraces)
1603 (meta . ((class . Spanner)
1604 (interfaces . (system-start-delimiter-interface
1605 side-position-interface
1606 font-interface))))))
1611 (X-offset . ,Side_position_interface::x_aligned_side)
1613 (stencil . ,System_start_delimiter::print)
1614 (style . line-bracket)
1616 (meta . ((class . Spanner)
1617 (interfaces . (font-interface
1618 side-position-interface
1619 system-start-delimiter-interface))))))
1624 (X-offset . ,Side_position_interface::x_aligned_side)
1626 (stencil . ,System_start_delimiter::print)
1628 (collapse-height . 5.0)
1630 (meta . ((class . Spanner)
1631 (interfaces . (font-interface
1632 side-position-interface
1633 system-start-delimiter-interface))))))
1639 (X-offset . ,Side_position_interface::x_aligned_side)
1643 (stencil . ,System_start_delimiter::print)
1644 (meta . ((class . Spanner)
1645 (interfaces . (side-position-interface
1646 system-start-delimiter-interface))))))
1652 (stencil . ,Text_interface::print)
1653 (Y-offset . ,Staff_symbol_referencer::callback)
1655 (stem-attachment . (1.0 . 1.35))
1656 (font-series . bold)
1657 (meta . ((class . Item)
1659 . (rhythmic-head-interface
1660 font-interface rhythmic-grob-interface
1662 staff-symbol-referencer-interface
1663 text-interface))))))
1667 (no-spacing-rods . #t)
1668 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1671 ;; sync with Fingering ?
1673 (staff-padding . 0.5)
1675 (stencil . ,Text_interface::print)
1676 (direction . ,Script_interface::calc_direction)
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
1685 side-position-interface
1686 font-interface))))))
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)
1699 (meta . ((class . Spanner)
1700 (interfaces . (text-spanner-interface
1701 side-position-interface
1702 font-interface))))))
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)))
1714 (meta . ((class . Spanner)
1715 (interfaces . (tie-interface))))
1720 (positioning-done . ,Tie_column::calc_positioning_done)
1721 (before-line-breaking . ,Tie_column::before_line_breaking)
1724 (meta . ((class . Spanner)
1725 (interfaces . (tie-column-interface))))))
1729 (stencil . ,Time_signature::print)
1730 (break-align-symbol . time-signature)
1731 (break-visibility . ,all-visible)
1733 (first-note . (fixed-space . 2.0))
1734 (right-edge . (extra-space . 0.5))
1735 (staff-bar . (minimum-space . 2.0))))
1738 (meta . ((class . Item)
1739 (interfaces . (time-signature-interface
1740 break-aligned-interface
1741 font-interface))))))
1745 (stencil . ,Dynamic_text_spanner::print)
1746 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1749 (staff-padding . 1.0)
1752 (Y-offset . ,Side_position_interface::y_aligned_side)
1754 (meta . ((class . Spanner)
1755 (interfaces . (text-spanner-interface
1756 side-position-interface
1757 font-interface))))))
1759 (TrillPitchAccidental
1760 . ((X-offset . ,Side_position_interface::x_aligned_side)
1765 (stencil . ,Accidental_interface::print)
1766 (meta . ((class . Item)
1767 (interfaces . (item-interface
1768 accidental-interface
1769 side-position-interface
1770 font-interface))))))
1773 . ((X-offset . ,Side_position_interface::x_aligned_side)
1776 (stencil . ,parenthesize-elements)
1777 (direction . ,RIGHT)
1780 (meta . ((class . Item)
1781 (interfaces . (side-position-interface
1783 rhythmic-head-interface
1785 accidental-interface
1786 axis-group-interface))))))
1790 (stencil . ,Note_head::print)
1792 (Y-offset . ,Staff_symbol_referencer::callback)
1794 (meta . ((class . Item)
1795 (interfaces . (item-interface
1796 rhythmic-head-interface
1798 pitched-trill-interface
1800 staff-symbol-referencer-interface))))))
1806 (edge-height . (0.7 . 0.7))
1807 (shorten-pair . (-0.2 . -0.2))
1808 (staff-padding . 0.25)
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)
1816 (meta . ((class . Spanner)
1817 (interfaces . (line-interface
1818 tuplet-bracket-interface))))))
1822 (stencil . ,Tuplet_number::print)
1823 (font-shape . italic)
1825 (avoid-slur . inside)
1826 (meta . ((class . Spanner)
1827 (interfaces . (text-interface tuplet-number-interface
1828 font-interface))))))
1832 (stencil . ,Text_interface::print)
1833 (font-shape . italic)
1834 (no-spacing-rods . #t)
1835 (self-alignment-X . 0)
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))))))
1844 (UnaCordaPedalLineSpanner
1847 (X-extent . ,Axis_group_interface::height)
1848 (Y-offset . ,Side_position_interface::y_aligned_side)
1851 (staff-padding . 1.2)
1852 (minimum-space . 1.0)
1854 (meta . ((class . Spanner)
1855 (interfaces . (piano-pedal-interface
1856 axis-group-interface
1857 side-position-interface))))))
1863 (stencil . ,Vaticana_ligature::print)
1864 (meta . ((class . Spanner)
1865 (interfaces . (vaticana-ligature-interface
1866 font-interface))))))
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)
1876 (meta . ((class . Spanner)
1877 (interfaces . (align-interface
1878 axis-group-interface))))))
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))))))
1893 (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
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)
1902 (meta . ((class . Item)
1903 (interfaces . (font-interface
1904 self-alignment-interface
1905 side-position-interface
1907 break-aligned-interface))))))
1911 (stencil . ,Volta_bracket_interface::print)
1912 (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)
1915 (font-encoding . fetaNumber)
1916 (Y-offset . ,Side_position_interface::y_aligned_side)
1918 (thickness . 1.6) ;; linethickness
1919 (edge-height . (2.0 . 2.0)) ;; staffspace;
1922 (meta . ((class . Spanner)
1923 (interfaces . (volta-bracket-interface
1924 horizontal-bracket-interface
1927 side-position-interface
1939 (stencil . ,Line_spanner::print)
1940 (after-line-breaking . ,Line_spanner::after_line_breaking)
1941 (meta . ((class . Spanner)
1942 (interfaces . (line-spanner-interface
1948 (define (completize-grob-entry x)
1949 "Transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc.
1951 ;; (display (car x))
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)))
1958 (cdr (assoc 'interfaces meta-entry))))
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))))
1972 (ly:warning "Unknown class ~a" class)))
1973 (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1975 (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1976 (set! meta-entry (assoc-set! meta-entry 'interfaces
1978 (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1979 (cons name-sym grob-entry)))
1981 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1983 ;; (display (map pair? all-grob-descriptions))
1985 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1988 ;; (display (car x)) (newline)
1990 (set-object-property! (car x) 'translation-type? list?)
1991 (set-object-property! (car x) 'is-grob? #t))
1992 all-grob-descriptions)
1994 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))