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)
596 (no-spacing-rods . #t)
597 (script-priority . 100)
598 (meta . ((class . Item)
599 (interfaces . (font-interface
601 self-alignment-interface
603 script-interface))))))
608 (stencil . ,Dynamic_text_spanner::print)
610 ;; rather ugh with NCSB
611 ;; (font-series . bold)
612 (font-shape . italic)
613 (style . dashed-line)
615 ;; need to blend with dynamic texts.
617 (bound-padding . 0.75)
618 (dash-fraction . 0.2)
620 (meta . ((class . Spanner)
621 (interfaces . (font-interface
624 dynamic-text-spanner-interface
625 spanner-interface))))))
630 ;; sync with TextScript (?)
633 (avoid-slur . around)
635 (staff-padding . 0.5)
636 (self-alignment-X . 0)
637 (self-alignment-Y . 0)
638 (script-priority . 100)
640 (stencil . ,Text_interface::print)
641 (direction . ,Script_interface::calc_direction)
643 (font-encoding . fetaNumber)
644 (font-size . -5) ; don't overlap when next to heads.
645 (meta . ((class . Item)
646 (interfaces . (finger-interface
648 text-script-interface
650 side-position-interface
651 self-alignment-interface
657 (zigzag-width . 0.75)
662 (stencil . ,Line_spanner::print)
663 (after-line-breaking . ,Line_spanner::after_line_breaking)
666 (meta . ((class . Spanner)
667 (interfaces . (line-interface
668 line-spanner-interface))))))
674 (meta . ((class . Item)
675 (interfaces . (grid-point-interface))))))
680 (X-extent . ,Grid_line_interface::width)
681 (stencil . ,Grid_line_interface::print)
683 (self-alignment-X . ,CENTER)
684 (X-offset . ,(ly:make-simple-closure
685 `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent))
686 ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
688 (meta . ((class . Item)
689 (interfaces . (self-alignment-interface
690 grid-line-interface))))))
696 (stencil . ,Hairpin::print)
697 (springs-and-rods . ,Spanner::set_spacing_rods)
698 (after-line-breaking . ,Hairpin::after_line_breaking)
702 (minimum-length . 2.0)
703 (bound-padding . 1.0)
704 (self-alignment-Y . 0)
705 (Y-offset . ,Self_alignment_interface::y_aligned_on_self)
706 (meta . ((class . Spanner)
707 (interfaces . (hairpin-interface
709 self-alignment-interface
711 spanner-interface))))))
716 (stencil . ,Horizontal_bracket::print)
717 (Y-offset . ,Side_position_interface::y_aligned_side)
719 (staff-padding . 0.2)
722 (bracket-flare . (0.5 . 0.5))
723 (meta . ((class . Spanner)
724 (interfaces . (horizontal-bracket-interface
725 side-position-interface
727 spanner-interface))))))
731 (Y-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::y_aligned_on_self))
732 ,(ly:make-simple-closure (list Side_position_interface::y_aligned_on_support_refpoints)))))
734 ;; This direction is for aligned_on_support_refpoints
738 (left-edge . (extra-space . 1.0))))
740 (self-alignment-Y . 0)
741 (stencil . ,Text_interface::print)
742 (break-align-symbol . instrument-name)
743 (break-visibility . ,begin-of-line-visible)
746 (meta . ((class . Item)
747 (interfaces . (font-interface
748 self-alignment-interface
749 side-position-interface
751 break-aligned-interface))))))
756 (stencil . ,Key_signature_interface::print)
759 (time-signature . (extra-space . 1.25))
760 (staff-bar . (extra-space . 0.6))
761 (key-signature . (extra-space . 0.5))
762 (right-edge . (extra-space . 0.5))
763 (first-note . (fixed-space . 2.5))))
764 (Y-offset . ,Staff_symbol_referencer::callback)
765 (break-align-symbol . key-cancellation)
766 (break-visibility . ,begin-of-line-invisible)
769 (meta . ((class . Item)
770 (interfaces . (key-signature-interface
772 break-aligned-interface))))))
776 (stencil . ,Key_signature_interface::print)
779 (time-signature . (extra-space . 1.15))
780 (staff-bar . (extra-space . 1.1))
781 (right-edge . (extra-space . 0.5))
782 (first-note . (fixed-space . 2.5))))
783 (Y-offset . ,Staff_symbol_referencer::callback)
784 (break-align-symbol . key-signature)
785 (break-visibility . ,begin-of-line-visible)
788 (meta . ((class . Item)
789 (interfaces . (key-signature-interface
791 break-aligned-interface))))))
795 (stencil . ,Tie::print)
796 (control-points . ,Laissez_vibrer_tie::calc_control_points)
797 (direction . ,Laissez_vibrer_tie::calc_direction)
799 (details . ((ratio . 0.333)
800 (height-limit . 1.0)))
802 (meta . ((class . Item)
803 (interfaces . (laissez-vibrer-tie-interface))
807 (LaissezVibrerTieColumn
812 (positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
814 (meta . ((class . Item)
815 (interfaces . (laissez-vibrer-tie-column-interface))
822 (springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
824 (stencil . ,Ledger_line_spanner::print)
828 (minimum-length-fraction . 0.25)
829 (length-fraction . 0.25)
831 (meta . ((class . Spanner)
832 (interfaces . (ledger-line-interface))))))
836 (break-align-symbol . left-edge)
839 (break-visibility . ,center-invisible)
841 (custos . (extra-space . 0.0))
842 (ambitus . (extra-space . 2.0))
843 (time-signature . (extra-space . 1.0))
844 (staff-bar . (extra-space . 0.0))
845 (breathing-sign . (minimum-space . 0.0))
846 (clef . (extra-space . 0.8))
847 (first-note . (fixed-space . 2.0))
848 (right-edge . (extra-space . 0.0))
849 (key-signature . (extra-space . 0.0))
850 (key-cancellation . (extra-space . 0.0))
852 (meta . ((class . Item)
853 (interfaces . (break-aligned-interface))))))
857 ;; ugh. A ligature bracket is totally different from
862 (edge-height . (0.7 . 0.7))
863 (shorten-pair . (-0.2 . -0.2))
865 (positions . ,Tuplet_bracket::calc_positions)
866 (stencil . ,Tuplet_bracket::print)
868 (meta . ((class . Spanner)
869 (interfaces . (tuplet-bracket-interface
878 (minimum-length . 0.3)
879 (minimum-distance . 0.1)
881 (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
883 (stencil . ,Hyphen_spanner::print)
886 (meta . ((class . Spanner)
887 (interfaces . (lyric-interface
888 lyric-hyphen-interface
889 spanner-interface))))))
894 (stencil . ,Lyric_extender::print)
896 (thickness . 0.8) ; linethickness
897 (minimum-length . 1.5)
899 (meta . ((class . Spanner)
900 (interfaces . (lyric-interface
901 lyric-extender-interface))))))
904 . ((minimum-distance . 0.3)
905 (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
909 (meta . ((class . Spanner)
910 (interfaces . (spanner-interface
911 lyric-hyphen-interface spacing-interface))
917 (stencil . ,Text_interface::print)
919 (X-offset . ,Self_alignment_interface::aligned_on_x_parent)
920 (self-alignment-X . 0)
922 (font-series . bold-narrow)
924 (meta . ((class . Item)
925 (interfaces . (rhythmic-grob-interface
926 lyric-syllable-interface
927 self-alignment-interface
935 (stencil . ,Mensural_ligature::print)
937 (meta . ((class . Spanner)
938 (interfaces . (mensural-ligature-interface
944 (stencil . ,Text_interface::print)
946 (Y-offset . ,Side_position_interface::y_aligned_side)
950 (meta . ((class . Item)
951 (interfaces . (text-interface
952 side-position-interface
954 metronome-mark-interface))))))
958 (Y-offset . ,Side_position_interface::y_aligned_side)
961 (stencil . ,Measure_grouping::print)
968 (meta . ((class . Spanner)
969 (interfaces . (side-position-interface
970 measure-grouping-interface))))))
974 (stencil . ,Multi_measure_rest::print)
975 (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
976 (Y-offset . ,Staff_symbol_referencer::callback)
979 (thick-thickness . 6.6)
980 (hair-thickness . 2.0)
982 (meta . ((class . Spanner)
983 (interfaces . (multi-measure-rest-interface
984 multi-measure-interface
987 staff-symbol-referencer-interface))))))
990 (MultiMeasureRestNumber
992 (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
993 (stencil . ,Text_interface::print)
994 (X-offset . ,(ly:make-simple-closure
995 `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self))
996 ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent)))))
997 (Y-offset . ,Side_position_interface::y_aligned_side)
1000 (self-alignment-X . 0)
1003 (staff-padding . 0.4)
1004 (font-encoding . fetaNumber)
1005 (meta . ((class . Spanner)
1006 (interfaces . (side-position-interface
1007 multi-measure-interface
1008 self-alignment-interface
1013 (MultiMeasureRestText
1015 (stencil . ,Text_interface::print)
1016 (X-offset . ,(ly:make-simple-closure
1017 `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent))
1018 ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
1020 (Y-offset . ,Side_position_interface::y_aligned_side)
1021 (self-alignment-X . 0)
1024 (staff-padding . 0.25)
1025 (meta . ((class . Spanner)
1026 (interfaces . (side-position-interface
1027 multi-measure-interface
1028 self-alignment-interface
1030 text-interface))))))
1036 (X-extent . ,Axis_group_interface::width)
1037 (Y-extent . ,Axis_group_interface::height)
1038 (positioning-done . ,Note_collision_interface::calc_positioning_done)
1040 (meta . ((class . Item)
1041 (interfaces . (note-collision-interface
1042 axis-group-interface))))))
1047 (X-extent . ,Axis_group_interface::width)
1048 (Y-extent . ,Axis_group_interface::height)
1050 (meta . ((class . Item)
1051 (interfaces . (axis-group-interface
1052 note-column-interface))))))
1057 (stencil . ,Note_head::print)
1058 (stem-attachment . ,Note_head::calc_stem_attachment)
1059 (glyph-name . ,note-head::calc-glyph-name)
1060 (Y-offset . ,Staff_symbol_referencer::callback)
1061 (X-offset . ,Note_head::stem_x_shift)
1062 (meta . ((class . Item)
1063 (interfaces . (rhythmic-grob-interface
1064 rhythmic-head-interface
1068 staff-symbol-referencer-interface))))))
1072 (stem-spacing-correction . 0.5)
1073 (same-direction-correction . 0.25)
1074 ;; Changed this from 0.75.
1075 ;; If you ever change this back, please document! --hwn
1076 (knee-spacing-correction . 1.0)
1078 (meta . ((class . Item)
1079 (interfaces . (spacing-interface
1080 note-spacing-interface))))))
1085 (stencil . ,Text_interface::print)
1087 (meta . ((class . Item)
1088 (interfaces . (note-name-interface
1090 font-interface))))))
1094 (self-alignment-X . 0)
1095 (break-visibility . ,begin-of-line-visible)
1096 (X-offset . ,(ly:make-simple-closure
1097 `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self))
1098 ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent)))))
1100 (Y-offset . ,Side_position_interface::y_aligned_side)
1102 (stencil . ,Text_interface::print)
1105 ;; no Y dimensions, because of lyrics under tenor clef.
1106 (Y-extent . (0 . 0))
1107 (font-shape . italic)
1109 (staff-padding . 0.2)
1111 (meta . ((class . Item)
1112 (interfaces . (text-interface
1113 self-alignment-interface
1114 side-position-interface
1115 font-interface))))))
1119 (Y-offset . ,Side_position_interface::y_aligned_side)
1121 (stencil . ,Ottava_bracket::print)
1123 (font-shape . italic)
1124 (shorten-pair . (0.0 . -0.6))
1125 (staff-padding . 1.0)
1127 (minimum-length . 1.0)
1128 (dash-fraction . 0.3)
1129 (edge-height . (0 . 1.2))
1131 (meta . ((class . Spanner)
1132 (interfaces . (ottava-bracket-interface
1133 horizontal-bracket-interface
1135 side-position-interface
1137 text-interface))))))
1143 (before-line-breaking . ,Paper_column::before_line_breaking)
1144 ;; (stencil . ,Paper_column::print)
1145 (X-extent . ,Axis_group_interface::width)
1149 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1150 (meta . ((class . Paper_column)
1151 (interfaces . (paper-column-interface
1152 axis-group-interface
1153 spaceable-grob-interface))))))
1156 . ((details . ,default-slur-details)
1158 (control-points . ,Slur::calc_control_points)
1159 (direction . ,Slur::calc_direction)
1160 (springs-and-rods . ,Spanner::set_spacing_rods)
1161 (Y-extent . ,Slur::height)
1162 (stencil . ,Slur::print)
1166 (minimum-length . 1.5)
1167 (height-limit . 2.0)
1169 (meta . ((class . Spanner)
1170 (interfaces . (slur-interface))))))
1172 (NonMusicalPaperColumn
1176 (before-line-breaking . ,Paper_column::before_line_breaking)
1177 (X-extent . ,Axis_group_interface::width)
1178 ;; (stencil . ,Paper_column::print)
1182 ;; debugging stuff: print column number.
1183 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1185 (meta . ((class . Paper_column)
1186 (interfaces . (paper-column-interface
1187 axis-group-interface
1188 spaceable-grob-interface))))))
1193 (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
1194 (stencil . ,Multi_measure_rest::percent)
1198 (font-encoding . fetaMusic)
1199 (meta . ((class . Spanner)
1200 (interfaces . (multi-measure-rest-interface
1202 percent-repeat-interface))))))
1203 (PercentRepeatCounter
1205 (stencil . ,Text_interface::print)
1206 (X-offset . ,(ly:make-simple-closure
1207 `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent))
1208 ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
1209 (Y-offset . ,Side_position_interface::y_aligned_side)
1210 (self-alignment-X . 0)
1213 (staff-padding . 0.25)
1215 (font-encoding . fetaNumber)
1216 (meta . ((class . Spanner)
1217 (interfaces . (side-position-interface
1218 self-alignment-interface
1219 percent-repeat-interface
1221 text-interface))))))
1223 ;; an example of a text spanner
1227 (stencil . ,Piano_pedal_bracket::print)
1230 (bound-padding . 1.0)
1232 (bracket-flare . (0.5 . 0.5))
1233 (edge-height . (1.0 . 1.0))
1234 (shorten-pair . (0.0 . 0.0))
1236 (meta . ((class . Spanner)
1237 (interfaces . (line-interface
1238 piano-pedal-interface
1239 piano-pedal-bracket-interface))))))
1243 (stencil . ,Text_interface::print)
1244 (X-offset . ,(ly:make-simple-closure
1245 `(,+ ,(ly:make-simple-closure
1246 `(,Self_alignment_interface::x_aligned_on_self))
1247 ,(ly:make-simple-closure
1248 `(,Self_alignment_interface::centered_on_x_parent)))
1250 (Y-offset . ,Side_position_interface::y_aligned_side)
1251 (self-alignment-X . 0)
1256 (break-visibility . ,end-of-line-invisible)
1258 (meta . ((class . Item)
1259 (interfaces . (text-interface
1260 side-position-interface
1263 self-alignment-interface))))))
1269 (stencil . ,Percent_repeat_item_interface::beat_slash)
1273 (meta . ((class . Item)
1274 (interfaces . (percent-repeat-interface))))))
1277 (stencil . ,Rest::print)
1278 (X-extent . ,Rest::width)
1279 (Y-extent . ,Rest::height)
1280 (Y-offset . ,Rest::y_offset_callback)
1281 (minimum-distance . 0.25)
1282 (meta . ((class . Item)
1283 (interfaces . (font-interface
1284 rhythmic-head-interface
1285 rhythmic-grob-interface
1286 staff-symbol-referencer-interface
1287 rest-interface))))))
1291 (minimum-distance . 0.75)
1292 (positioning-done . ,Rest_collision::calc_positioning_done)
1294 (meta . ((class . Item)
1295 (interfaces . (rest-collision-interface))))))
1299 ;; don't set direction here: it breaks staccato.
1301 ;; This value is sensitive: if too large, staccato dots will move a
1304 (staff-padding . 0.25)
1305 ;; (script-priority . 0) priorities for scripts, see script.scm
1306 (X-offset . , Self_alignment_interface::centered_on_x_parent)
1309 (stencil . ,Script_interface::print)
1310 (direction . ,Script_interface::calc_direction)
1312 (font-encoding . fetaMusic)
1313 (meta . ((class . Item)
1314 (interfaces . (script-interface
1315 side-position-interface
1316 font-interface))))))
1321 (before-line-breaking . ,Script_column::before_line_breaking)
1323 (meta . ((class . Item)
1324 (interfaces . (script-column-interface))))))
1330 (meta . ((class . Item)
1331 (interfaces . (spacing-interface
1332 separation-item-interface))))))
1334 (SeparatingGroupSpanner
1337 (springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1339 (meta . ((class . Spanner)
1340 (interfaces . (only-prebreak-interface
1342 separation-spanner-interface))))))
1345 . ((details . ,default-slur-details)
1347 (control-points . ,Slur::calc_control_points)
1348 (direction . ,Slur::calc_direction)
1349 (springs-and-rods . ,Spanner::set_spacing_rods)
1350 (Y-extent . ,Slur::height)
1351 (stencil . ,Slur::print)
1354 (minimum-length . 1.5)
1356 (height-limit . 2.0)
1358 (meta . ((class . Spanner)
1359 (interfaces . (slur-interface))))))
1364 (springs-and-rods . ,Spacing_spanner::set_springs)
1365 (average-spacing-wishes . #t)
1366 (grace-space-factor . 0.6)
1367 (shortest-duration-space . 2.0)
1368 (spacing-increment . 1.2)
1369 (base-shortest-duration . ,(ly:make-moment 3 16))
1370 (meta . ((class . Spanner)
1371 (interfaces . (spacing-interface
1372 spacing-spanner-interface))))))
1376 (break-align-symbol . staff-bar)
1381 (stencil . ,Span_bar::print)
1382 (bar-size . ,Span_bar::calc_bar_size)
1383 (X-extent . ,Span_bar::width)
1384 (glyph-name . ,Span_bar::calc_glyph_name)
1385 (before-line-breaking . ,Span_bar::before_line_breaking)
1390 ;; Ross. page 151 lists other values, we opt for a leaner look
1394 (hair-thickness . 1.6)
1395 (thick-thickness . 6.0)
1396 (meta . ((class . Item)
1397 (interfaces . (span-bar-interface
1399 bar-line-interface))))))
1403 (stencil . ,Text_interface::print)
1405 (font-series . bold)
1407 (X-offset . ,Side_position_interface::x_aligned_side)
1410 (meta . ((class . Item)
1411 (interfaces . (side-position-interface
1412 stanza-number-interface
1414 font-interface))))))
1419 (stencil . ,print-circled-text-callback)
1422 (staff-padding . 0.5)
1423 (self-alignment-X . 0)
1424 (self-alignment-Y . 0)
1425 (script-priority . 100)
1426 (font-encoding . fetaNumber)
1427 (font-size . -5) ; don't overlap when next to heads.
1428 (meta . ((class . Item)
1429 (interfaces . (string-number-interface
1431 text-script-interface
1433 side-position-interface
1434 self-alignment-interface
1435 item-interface))))))
1440 (stem-spacing-correction . 0.4)
1441 (meta . ((class . Item)
1442 (interfaces . (spacing-interface
1443 staff-spacing-interface))))))
1448 (stencil . ,Text_interface::print)
1451 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1452 (no-spacing-rods . #t)
1453 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1454 (font-shape . italic)
1455 (self-alignment-X . 0)
1456 (meta . ((class . Item)
1457 (interfaces . (text-interface
1458 self-alignment-interface
1459 font-interface))))))
1461 (SostenutoPedalLineSpanner
1465 (X-extent . ,Axis_group_interface::height)
1467 (Y-offset . ,Side_position_interface::y_aligned_side)
1471 (minimum-space . 1.0)
1473 (meta . ((class . Spanner)
1474 (interfaces . (piano-pedal-interface
1475 axis-group-interface
1476 side-position-interface))))))
1481 (stencil . ,Staff_symbol::print)
1484 (ledger-line-thickness . (1.0 . 0.1))
1486 (meta . ((class . Spanner)
1487 (interfaces . (staff-symbol-interface))))))
1491 (direction . ,Stem::calc_direction)
1492 (stem-end-position . ,Stem::calc_stem_end_position)
1493 (stem-info . ,Stem::calc_stem_info)
1494 (positioning-done . ,Stem::calc_positioning_done)
1495 (stencil . ,Stem::print)
1496 (X-extent . ,Stem::width)
1497 (Y-extent . ,Stem::height)
1498 (length . ,Stem::calc_length)
1504 ;; 3.5 (or 3 measured from note head) is standard length
1505 ;; 32nd, 64th flagged stems should be longer
1506 (lengths . (3.5 3.5 3.5 4.5 5.0))
1508 ;; FIXME. 3.5 yields too long beams (according to Ross and
1509 ;; looking at Baerenreiter examples) for a number of common
1510 ;; boundary cases. Subtracting half a beam thickness fixes
1511 ;; this, but the bug may well be somewhere else.
1513 ;; FIXME this should come from 'lengths
1514 (beamed-lengths . (3.26 3.5 3.6))
1516 ;; The 'normal' minima
1517 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1518 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1520 ;; The 'extreme case' minima
1521 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1523 ;; Stems in unnatural (forced) direction should be shortened by
1524 ;; one staff space, according to [Roush & Gourlay].
1525 ;; Flagged stems we shorten only half a staff space.
1526 (stem-shorten . (1.0 0.5))
1531 ;; default stem direction for note on middle line
1532 (neutral-direction . -1)
1534 ;; We use the normal minima as minimum for the ideal lengths,
1535 ;; and the extreme minima as abolute minimum length.
1537 (X-offset . ,Stem::offset_callback)
1538 (Y-offset . ,Staff_symbol_referencer::callback)
1539 (meta . ((class . Item)
1540 (interfaces . (stem-interface
1541 font-interface))))))
1545 (Y-extent . ,Stem_tremolo::height)
1546 (stencil . ,Stem_tremolo::print)
1548 (beam-width . 1.6) ; staff-space
1549 (beam-thickness . 0.48) ; staff-space
1550 (meta . ((class . Item)
1551 (interfaces . (stem-tremolo-interface))))))
1555 (no-spacing-rods . #t)
1556 (stencil . ,Sustain_pedal::print)
1557 (self-alignment-X . 0)
1559 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1560 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1561 (meta . ((class . Item)
1562 (interfaces . (piano-pedal-interface
1563 text-spanner-interface
1565 self-alignment-interface
1566 font-interface))))))
1568 (SustainPedalLineSpanner
1571 (X-extent . ,Axis_group_interface::height)
1572 (Y-offset . ,Side_position_interface::y_aligned_side)
1575 (staff-padding . 1.2)
1576 (minimum-space . 1.0)
1578 (meta . ((class . Spanner)
1579 (interfaces . (piano-pedal-interface
1580 axis-group-interface
1581 side-position-interface))))))
1586 (X-extent . ,Axis_group_interface::width)
1587 (Y-extent . ,Axis_group_interface::height)
1588 (meta . ((class . System)
1589 (interfaces . (system-interface
1590 axis-group-interface))))))
1596 (stencil . ,System_start_delimiter::print)
1597 (collapse-height . 5.0)
1598 (X-offset . ,Side_position_interface::x_aligned_side)
1600 (font-encoding . fetaBraces)
1602 (meta . ((class . Spanner)
1603 (interfaces . (system-start-delimiter-interface
1604 side-position-interface
1605 font-interface))))))
1610 (X-offset . ,Side_position_interface::x_aligned_side)
1612 (stencil . ,System_start_delimiter::print)
1613 (style . line-bracket)
1615 (meta . ((class . Spanner)
1616 (interfaces . (font-interface
1617 side-position-interface
1618 system-start-delimiter-interface))))))
1623 (X-offset . ,Side_position_interface::x_aligned_side)
1625 (stencil . ,System_start_delimiter::print)
1627 (collapse-height . 5.0)
1629 (meta . ((class . Spanner)
1630 (interfaces . (font-interface
1631 side-position-interface
1632 system-start-delimiter-interface))))))
1638 (X-offset . ,Side_position_interface::x_aligned_side)
1642 (stencil . ,System_start_delimiter::print)
1643 (meta . ((class . Spanner)
1644 (interfaces . (side-position-interface
1645 system-start-delimiter-interface))))))
1651 (stencil . ,Text_interface::print)
1652 (Y-offset . ,Staff_symbol_referencer::callback)
1654 (stem-attachment . (1.0 . 1.35))
1655 (font-series . bold)
1656 (meta . ((class . Item)
1658 . (rhythmic-head-interface
1659 font-interface rhythmic-grob-interface
1661 staff-symbol-referencer-interface
1662 text-interface))))))
1666 (no-spacing-rods . #t)
1667 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1670 ;; sync with Fingering ?
1672 (staff-padding . 0.5)
1674 (stencil . ,Text_interface::print)
1675 (direction . ,Script_interface::calc_direction)
1677 (avoid-slur . around)
1678 (slur-padding . 0.5)
1679 (script-priority . 200)
1680 ;; todo: add X self alignment?
1681 (meta . ((class . Item)
1682 (interfaces . (text-script-interface
1684 side-position-interface
1685 font-interface))))))
1689 (stencil . ,Text_spanner::print)
1690 (Y-offset . ,Side_position_interface::y_aligned_side)
1691 (font-shape . italic)
1692 (style . dashed-line)
1693 (staff-padding . 0.8)
1694 (dash-fraction . 0.2)
1698 (meta . ((class . Spanner)
1699 (interfaces . (text-spanner-interface
1700 side-position-interface
1701 font-interface))))))
1705 (control-points . ,Tie::calc_control_points)
1706 (avoid-slur . inside)
1707 (direction . ,Tie::calc_direction)
1708 (stencil . ,Tie::print)
1709 (details . ((ratio . 0.333)
1710 (height-limit . 1.0)
1711 (between-length-limit . 1.0)))
1713 (meta . ((class . Spanner)
1714 (interfaces . (tie-interface))))
1719 (positioning-done . ,Tie_column::calc_positioning_done)
1720 (before-line-breaking . ,Tie_column::before_line_breaking)
1723 (meta . ((class . Spanner)
1724 (interfaces . (tie-column-interface))))))
1728 (stencil . ,Time_signature::print)
1729 (break-align-symbol . time-signature)
1730 (break-visibility . ,all-visible)
1732 (first-note . (fixed-space . 2.0))
1733 (right-edge . (extra-space . 0.5))
1734 (staff-bar . (minimum-space . 2.0))))
1737 (meta . ((class . Item)
1738 (interfaces . (time-signature-interface
1739 break-aligned-interface
1740 font-interface))))))
1744 (stencil . ,Dynamic_text_spanner::print)
1745 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1748 (staff-padding . 1.0)
1751 (Y-offset . ,Side_position_interface::y_aligned_side)
1753 (meta . ((class . Spanner)
1754 (interfaces . (text-spanner-interface
1755 side-position-interface
1756 font-interface))))))
1758 (TrillPitchAccidental
1759 . ((X-offset . ,Side_position_interface::x_aligned_side)
1764 (stencil . ,Accidental_interface::print)
1765 (meta . ((class . Item)
1766 (interfaces . (item-interface
1767 accidental-interface
1768 side-position-interface
1769 font-interface))))))
1772 . ((X-offset . ,Side_position_interface::x_aligned_side)
1775 (stencil . ,parenthesize-elements)
1776 (direction . ,RIGHT)
1779 (meta . ((class . Item)
1780 (interfaces . (side-position-interface
1782 rhythmic-head-interface
1784 accidental-interface
1785 axis-group-interface))))))
1789 (stencil . ,Note_head::print)
1791 (Y-offset . ,Staff_symbol_referencer::callback)
1793 (meta . ((class . Item)
1794 (interfaces . (item-interface
1795 rhythmic-head-interface
1797 pitched-trill-interface
1799 staff-symbol-referencer-interface))))))
1805 (edge-height . (0.7 . 0.7))
1806 (shorten-pair . (-0.2 . -0.2))
1807 (staff-padding . 0.25)
1809 (direction . ,Tuplet_bracket::calc_direction)
1810 (positions . ,Tuplet_bracket::calc_positions)
1811 (connect-to-neighbor . ,Tuplet_bracket::calc_connect_to_neighbors)
1812 (control-points . ,Tuplet_bracket::calc_control_points)
1813 (stencil . ,Tuplet_bracket::print)
1815 (meta . ((class . Spanner)
1816 (interfaces . (line-interface
1817 tuplet-bracket-interface))))))
1821 (stencil . ,Tuplet_number::print)
1822 (font-shape . italic)
1824 (avoid-slur . inside)
1825 (meta . ((class . Spanner)
1826 (interfaces . (text-interface tuplet-number-interface
1827 font-interface))))))
1831 (stencil . ,Text_interface::print)
1832 (font-shape . italic)
1833 (no-spacing-rods . #t)
1834 (self-alignment-X . 0)
1836 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1837 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
1838 (meta . ((class . Item)
1839 (interfaces . (text-interface
1840 self-alignment-interface
1841 font-interface))))))
1843 (UnaCordaPedalLineSpanner
1846 (X-extent . ,Axis_group_interface::height)
1847 (Y-offset . ,Side_position_interface::y_aligned_side)
1850 (staff-padding . 1.2)
1851 (minimum-space . 1.0)
1853 (meta . ((class . Spanner)
1854 (interfaces . (piano-pedal-interface
1855 axis-group-interface
1856 side-position-interface))))))
1862 (stencil . ,Vaticana_ligature::print)
1863 (meta . ((class . Spanner)
1864 (interfaces . (vaticana-ligature-interface
1865 font-interface))))))
1870 (positioning-done . ,Align_interface::calc_positioning_done)
1871 (after-line-breaking . ,Align_interface::stretch_after_break)
1872 (Y-extent . ,Axis_group_interface::height)
1873 (X-extent . ,Axis_group_interface::width)
1875 (meta . ((class . Spanner)
1876 (interfaces . (align-interface
1877 axis-group-interface))))))
1881 (Y-offset . ,Hara_kiri_group_spanner::force_hara_kiri_callback)
1882 (Y-extent . ,Hara_kiri_group_spanner::y_extent)
1883 (X-extent . ,Axis_group_interface::width)
1884 (meta . ((class . Spanner)
1885 (interfaces . (axis-group-interface
1886 hara-kiri-group-interface
1887 vertically-spaceable-interface))))))
1892 (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
1894 (space-alist . ((left-edge . (extra-space . 1.0))))
1895 (break-align-symbol . instrument-name)
1896 (stencil . ,Text_interface::print)
1897 (break-align-symbol . clef)
1898 (break-visibility . ,begin-of-line-visible)
1901 (meta . ((class . Item)
1902 (interfaces . (font-interface
1903 self-alignment-interface
1904 side-position-interface
1906 break-aligned-interface))))))
1910 (stencil . ,Volta_bracket_interface::print)
1911 (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)
1914 (font-encoding . fetaNumber)
1915 (Y-offset . ,Side_position_interface::y_aligned_side)
1917 (thickness . 1.6) ;; linethickness
1918 (edge-height . (2.0 . 2.0)) ;; staffspace;
1921 (meta . ((class . Spanner)
1922 (interfaces . (volta-bracket-interface
1923 horizontal-bracket-interface
1926 side-position-interface
1938 (stencil . ,Line_spanner::print)
1939 (after-line-breaking . ,Line_spanner::after_line_breaking)
1940 (meta . ((class . Spanner)
1941 (interfaces . (line-spanner-interface
1947 (define (completize-grob-entry x)
1948 "Transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc.
1950 ;; (display (car x))
1952 (let* ((name-sym (car x))
1953 (grob-entry (cdr x))
1954 (meta-entry (cdr (assoc 'meta grob-entry)))
1955 (class (cdr (assoc 'class meta-entry)))
1957 (cdr (assoc 'interfaces meta-entry))))
1961 (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1962 ((eq? 'Spanner class)
1963 (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1964 ((eq? 'Paper_column class)
1965 (set! ifaces-entry (cons 'item-interface
1966 (cons 'paper-column-interface ifaces-entry))))
1967 ((eq? 'System class)
1968 (set! ifaces-entry (cons 'system-interface
1969 (cons 'spanner-interface ifaces-entry))))
1971 (ly:warning "Unknown class ~a" class)))
1972 (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1974 (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1975 (set! meta-entry (assoc-set! meta-entry 'interfaces
1977 (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1978 (cons name-sym grob-entry)))
1980 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1982 ;; (display (map pair? all-grob-descriptions))
1984 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1987 ;; (display (car x)) (newline)
1989 (set-object-property! (car x) 'translation-type? list?)
1990 (set-object-property! (car x) 'is-grob? #t))
1991 all-grob-descriptions)
1993 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))