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 . ,Self_alignment_interface::centered_on_x_parent)
37 (self-X-offset . Self_alignment_interface::x_aligned_on_self)
38 (self-alignment-X . ,CENTER)
40 (cautionary-style . smaller)
41 (Y-offset . ,Side_position_interface::y_aligned_side)
42 (cautionary-style . parentheses)
44 (staff-padding . 0.25)
46 (meta . ((class . Item)
47 (interfaces . (side-position-interface
50 accidental-suggestion-interface
51 self-alignment-interface
57 (positioning-done . ,Accidental_placement::calc_positioning_done)
58 (X-extent . ,Axis_group_interface::width)
60 ;; this is quite small, but it is very ugly to have
61 ;; accs closer to the previous note than to the next one.
62 (right-padding . 0.15)
63 (meta . ((class . Item)
64 (interfaces . (accidental-placement-interface))))))
68 (X-extent . ,Axis_group_interface::width)
69 (X-extent . ,Axis_group_interface::height)
72 (clef . (extra-space . 0.5))
73 (key-signature . (extra-space . 0.0))
74 (staff-bar . (extra-space . 0.0))
75 (time-signature . (extra-space . 0.0))
76 (first-note . (fixed-space . 0.0))))
78 (break-align-symbol . ambitus)
79 (break-visibility . ,begin-of-line-visible)
80 (meta . ((class . Item)
81 (interfaces . (axis-group-interface
82 break-aligned-interface
83 ambitus-interface))))))
88 (stencil . ,Ambitus::print)
92 (X-offset . ,Self_alignment_interface::centered_on_x_parent)
94 (meta . ((class . Item)
95 (interfaces . (ambitus-interface
96 staff-symbol-referencer-interface
100 (font-family . music)
102 (X-offset . ,Side_position_interface::x_aligned_side)
104 (cautionary-style . parentheses)
106 (stencil . ,Accidental_interface::print)
107 (after-line-breaking . ,Accidental_interface::after_line_breaking)
109 (meta . ((class . Item)
110 (interfaces . (item-interface
112 break-aligned-interface
113 side-position-interface
120 (stencil . ,Note_head::print)
121 (glyph-name . ,note-head::calc-glyph-name)
123 (Y-offset . ,Staff_symbol_referencer::callback)
124 (meta . ((class . Item)
125 (interfaces . (font-interface
128 staff-symbol-referencer-interface
129 rhythmic-head-interface
130 ledgered-interface))))))
135 (X-extent . ,Arpeggio::width)
136 (stencil . ,Arpeggio::print)
138 (Y-offset . ,Staff_symbol_referencer::callback)
139 (X-offset . ,Side_position_interface::x_aligned_side)
142 (staff-position . 0.0)
143 (meta . ((class . Item)
144 (interfaces . (arpeggio-interface
145 staff-symbol-referencer-interface
146 side-position-interface
151 (break-align-symbol . staff-bar)
154 (break-visibility . ,all-visible)
157 (stencil . ,Bar_line::print)
158 (glyph-name . ,bar-line::calc-glyph-name)
159 (bar-size . ,Bar_line::calc_bar_size)
162 (time-signature . (extra-space . 0.75))
163 (custos . (minimum-space . 2.0))
164 (clef . (minimum-space . 1.0))
165 (key-signature . (extra-space . 1.0))
166 (key-cancellation . (extra-space . 1.0))
167 (first-note . (fixed-space . 1.3))
168 (next-note . (semi-fixed-space . 1.3))
169 (right-edge . (extra-space . 0.0))))
172 ;; Ross. page 151 lists other values, we opt for a leaner look
175 ;; kern should scale with linethickness too.
178 (hair-thickness . 1.9)
179 (thick-thickness . 6.0)
180 (meta . ((class . Item)
181 (interfaces . (bar-line-interface
182 break-aligned-interface
188 (stencil . ,Text_interface::print)
191 (break-visibility . ,begin-of-line-visible)
194 (font-family . roman)
196 (Y-offset . ,Side_position_interface::y_aligned_side)
197 (X-offset . ,Self_alignment_interface::x_aligned_on_self)
198 (self-alignment-X . 1)
202 (interfaces . (side-position-interface
204 self-alignment-interface
206 break-aligned-interface))))
212 (stencil . ,Text_interface::print)
214 (Y-offset . ,Self_alignment_interface::y_aligned_on_self)
216 (font-family . number)
218 ;; We must do this, other BFs in
219 ;; layout16 become too small.
222 (meta . ((class . Item)
223 (interfaces . (text-interface
224 rhythmic-grob-interface
225 bass-figure-interface
226 self-alignment-interface
232 (stencil . ,Text_interface::print)
234 (meta . ((class . Item)
235 (interfaces . (text-interface
236 rhythmic-grob-interface
237 bass-figure-interface
242 (stencil . ,Enclosing_bracket::print)
244 (edge-height . (0.2 . 0.2))
245 (meta . ((class . Item)
246 (interfaces . (enclosing-bracket-interface)) ))
248 (BassFigureContinuation
251 (stencil . ,Figured_bass_continuation::print)
253 (Y-offset . ,Figured_bass_continuation::center_on_figures)
254 (meta . ((class . Spanner)
255 (interfaces . (figured-bass-continuation-interface))
261 (Y-extent . ,Axis_group_interface::height)
263 (meta . ((class . Spanner)
264 (interfaces . (axis-group-interface
270 (threshold . (2 . 1000))
272 (positioning-done . ,Align_interface::calc_positioning_done)
273 (Y-extent . ,Axis_group_interface::height)
276 (meta . ((class . Spanner)
277 (interfaces . (align-interface
278 axis-group-interface))))))
282 ;; todo: clean this up a bit: the list is getting
285 (positions . ,(ly:make-simple-closure
286 (ly:make-simple-closure
287 (list chain-grob-member-functions
289 Beam::calc_least_squares_positions
291 Beam::shift_region_to_valid
293 Beam::set_stem_lengths
296 (concaveness . ,Beam::calc_concaveness)
297 (direction . ,Beam::calc_direction)
298 (stencil . ,Beam::print)
300 ;; TODO: should be in SLT.
301 (thickness . 0.48) ; in staff-space
302 (neutral-direction . -1)
304 ;; Whe have some unreferenced problems here.
306 ;; If we shorten beamed stems less than normal stems (1 staffspace),
307 ;; or high order less than 8th beams, patterns like
308 ;; c''4 [c''8 c''] c''4 [c''16 c]
309 ;; are ugly (different stem lengths).
311 ;; But if we shorten 16th beams as much as 8th beams, a single
312 ;; forced 16th beam looks *very* short.
314 ;; We choose to shorten 8th beams the same as single stems,
315 ;; and high order beams less than 8th beams, so that all
316 ;; isolated shortened beams look nice and a bit shortened,
317 ;; sadly possibly breaking patterns with high order beams.
318 (beamed-stem-shorten . (1.0 0.5 0.25))
320 (auto-knee-gap . 5.5)
322 ;; only for debugging.
323 (font-family . roman)
324 (meta . ((class . Spanner)
325 (interfaces . (staff-symbol-referencer-interface
333 (positioning-done . ,Break_align_interface::calc_positioning_done)
334 (X-extent . ,Axis_group_interface::width)
336 (break-align-orders . ;; end of line
358 time-signature custos)
372 (meta . ((class . Item)
373 (interfaces . (break-alignment-interface
374 axis-group-interface))))))
380 (X-extent . ,Axis_group_interface::width)
382 (meta . ((class . Item)
383 (interfaces . (break-aligned-interface
384 axis-group-interface))))))
388 (break-align-symbol . breathing-sign)
391 (ambitus . (extra-space . 2.0))
392 (custos . (minimum-space . 1.0))
393 (key-signature . (minimum-space . 1.5))
394 (time-signature . (minimum-space . 1.5))
395 (staff-bar . (minimum-space . 1.5))
396 (clef . (minimum-space . 2.0))
397 (first-note . (fixed-space . 1.0)) ;huh?
398 (right-edge . (extra-space . 0.1))))
400 (stencil . ,Text_interface::print)
402 (text . ,(make-musicglyph-markup "scripts.rcomma"))
403 (Y-offset . ,Breathing_sign::offset_callback)
404 (break-visibility . ,begin-of-line-invisible)
405 (meta . ((class . Item)
406 (interfaces . (break-aligned-interface
407 breathing-sign-interface
414 (stencil . ,Clef::print)
415 (glyph-name . ,Clef::calc_glyph_name)
418 (font-family . music)
419 (break-align-symbol . clef)
420 (break-visibility . ,begin-of-line-visible)
421 (space-alist . ((ambitus . (extra-space . 2.0))
422 (staff-bar . (extra-space . 0.7))
423 (key-cancellation . (minimum-space . 4.0))
424 (key-signature . (minimum-space . 4.0))
425 (time-signature . (minimum-space . 4.2))
426 (first-note . (minimum-fixed-space . 5.0))
427 (next-note . (extra-space . 0.5))
428 (right-edge . (extra-space . 0.5))))
429 (Y-offset . ,Staff_symbol_referencer::callback)
430 (meta . ((class . Item)
431 (interfaces . (clef-interface
432 staff-symbol-referencer-interface
434 break-aligned-interface))))))
436 (ClusterSpannerBeacon
439 (Y-extent . ,Cluster_beacon::height)
441 (meta . ((class . Item)
442 (interfaces . (cluster-beacon-interface))))))
447 (springs-and-rods . ,Spanner::set_spacing_rods)
448 (stencil . ,Cluster::print)
451 (minimum-length . 0.0)
454 (meta . ((class . Spanner)
455 (interfaces . (cluster-interface))))))
460 (stencil . ,Text_interface::print)
461 (after-line-breaking . ,Chord_name::after_line_breaking)
466 (meta . ((class . Item)
467 (interfaces . (font-interface
468 rhythmic-grob-interface
476 (stencil . ,Text_interface::print)
478 (no-spacing-rods . #t)
479 (Y-offset . ,Side_position_interface::y_aligned_side)
480 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
483 (staff-padding . 0.5)
484 (script-priority . 200)
485 ;; todo: add X self alignment?
488 (meta . ((class . Item)
489 (interfaces . (text-script-interface
491 side-position-interface
496 (break-align-symbol . custos)
499 (stencil . ,Custos::print)
501 (break-visibility . ,end-of-line-visible)
503 (neutral-direction . -1)
504 (Y-offset . ,Staff_symbol_referencer::callback)
506 (first-note . (minimum-fixed-space . 0.0))
507 (right-edge . (extra-space . 0.1))))
508 (meta . ((class . Item)
511 staff-symbol-referencer-interface
513 break-aligned-interface))))))
520 (positioning-done . ,Dot_column::calc_positioning_done)
521 (X-extent . ,Axis_group_interface::width)
523 (X-offset . ,Dot_column::side_position)
524 (meta . ((class . Item)
525 (interfaces . (dot-column-interface
526 axis-group-interface))))))
531 (stencil . ,Dots::print)
534 (meta . ((class . Item)
535 (interfaces . (font-interface
536 staff-symbol-referencer-interface
542 (stencil . ,Percent_repeat_item_interface::double_percent)
546 (font-encoding . fetaMusic)
549 (break-align-symbol . staff-bar)
550 (break-visibility . ,begin-of-line-invisible)
551 (meta . ((class . Item)
552 (interfaces . (font-interface
553 break-aligned-interface
554 percent-repeat-interface))))))
556 (DoublePercentRepeatCounter
559 (stencil . ,Text_interface::print)
561 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
562 (X-offset . ,Self_alignment_interface::centered_on_y_parent)
563 (Y-offset . ,Side_position_interface::y_aligned_side)
564 (font-encoding . fetaNumber)
565 (self-alignment-X . 0)
569 (staff-padding . 0.25)
570 (meta . ((class . Item)
571 (interfaces . (side-position-interface
572 self-alignment-interface
573 percent-repeat-interface
579 (Y-offset . ,Side_position_interface::y_aligned_side)
580 (staff-padding . 0.1)
582 (avoid-slur . outside)
584 (minimum-space . 1.2)
587 (Y-extent . ,Axis_group_interface::height)
588 (X-extent . ,Axis_group_interface::width)
591 (meta . ((class . Spanner)
592 (interfaces . (axis-group-interface
594 dynamic-line-spanner-interface
595 side-position-interface))))))
602 (stencil . ,Text_interface::print)
603 (direction . ,Script_interface::calc_direction)
605 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
606 (self-alignment-X . 0)
607 (self-Y-offset . ,Self_alignment_interface::y_aligned_on_self)
608 (self-alignment-Y . 0)
610 (font-encoding . fetaDynamic)
611 (font-shape . italic)
612 (no-spacing-rods . #t)
613 (script-priority . 100)
614 (meta . ((class . Item)
615 (interfaces . (font-interface
617 self-alignment-interface
619 script-interface))))))
624 (stencil . ,Dynamic_text_spanner::print)
626 ;; rather ugh with NCSB
627 ;; (font-series . bold)
628 (font-shape . italic)
629 (style . dashed-line)
631 ;; need to blend with dynamic texts.
633 (bound-padding . 0.75)
634 (dash-fraction . 0.2)
636 (meta . ((class . Spanner)
637 (interfaces . (font-interface
640 dynamic-text-spanner-interface
641 spanner-interface))))))
646 ;; sync with TextScript (?)
649 (avoid-slur . around)
651 (staff-padding . 0.5)
652 (self-alignment-X . 0)
653 (self-alignment-Y . 0)
654 (script-priority . 100)
656 (stencil . ,Text_interface::print)
657 (direction . ,Script_interface::calc_direction)
659 (font-encoding . fetaNumber)
660 (font-size . -5) ; don't overlap when next to heads.
661 (meta . ((class . Item)
662 (interfaces . (finger-interface
664 text-script-interface
666 side-position-interface
667 self-alignment-interface
673 (zigzag-width . 0.75)
678 (stencil . ,Line_spanner::print)
679 (after-line-breaking . ,Line_spanner::after_line_breaking)
682 (meta . ((class . Spanner)
683 (interfaces . (line-interface
684 line-spanner-interface))))))
690 (meta . ((class . Item)
691 (interfaces . (grid-point-interface))))))
696 (X-extent . ,Grid_line_interface::width)
697 (stencil . ,Grid_line_interface::print)
699 (self-alignment-X . ,CENTER)
700 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
701 (X-offset . ,Self_alignment_interface::centered_on_x_parent)
704 (meta . ((class . Item)
705 (interfaces . (self-alignment-interface
706 grid-line-interface))))))
712 (stencil . ,Hairpin::print)
713 (springs-and-rods . ,Spanner::set_spacing_rods)
714 (after-line-breaking . ,Hairpin::after_line_breaking)
718 (minimum-length . 2.0)
719 (bound-padding . 1.0)
720 (self-alignment-Y . 0)
721 (self-Y-offset . ,Self_alignment_interface::y_aligned_on_self)
722 (meta . ((class . Spanner)
723 (interfaces . (hairpin-interface
725 self-alignment-interface
727 spanner-interface))))))
733 (stencil . ,Horizontal_bracket::print)
735 (Y-offset . ,Side_position_interface::y_aligned_side)
737 (staff-padding . 0.2)
739 (bracket-flare . (0.5 . 0.5))
740 (meta . ((class . Spanner)
741 (interfaces . (horizontal-bracket-interface
742 side-position-interface
744 spanner-interface))))))
748 (self-Y-offset . ,Self_alignment_interface::y_aligned_on_self)
749 (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
750 ;; This direction is for aligned_on_support_refpoints
754 (left-edge . (extra-space . 1.0))))
756 (self-alignment-Y . 0)
758 (stencil . ,Text_interface::print)
760 (break-align-symbol . instrument-name)
761 (break-visibility . ,begin-of-line-visible)
763 (meta . ((class . Item)
764 (interfaces . (font-interface
765 self-alignment-interface
766 side-position-interface
768 break-aligned-interface))))))
773 (stencil . ,Key_signature_interface::print)
776 (time-signature . (extra-space . 1.25))
777 (staff-bar . (extra-space . 0.6))
778 (key-signature . (extra-space . 0.5))
779 (right-edge . (extra-space . 0.5))
780 (first-note . (fixed-space . 2.5))))
781 (Y-offset . ,Staff_symbol_referencer::callback)
782 (break-align-symbol . key-cancellation)
783 (break-visibility . ,begin-of-line-invisible)
786 (meta . ((class . Item)
787 (interfaces . (key-signature-interface
789 break-aligned-interface))))))
793 (stencil . ,Key_signature_interface::print)
796 (time-signature . (extra-space . 1.25))
797 (staff-bar . (extra-space . 1.1))
798 (right-edge . (extra-space . 0.5))
799 (first-note . (fixed-space . 2.5))))
800 (Y-offset . ,Staff_symbol_referencer::callback)
801 (break-align-symbol . key-signature)
802 (break-visibility . ,begin-of-line-visible)
805 (meta . ((class . Item)
806 (interfaces . (key-signature-interface
808 break-aligned-interface))))))
812 (stencil . ,Tie::print)
813 (control-points . ,Laissez_vibrer_tie::calc_control_points)
814 (direction . ,Laissez_vibrer_tie::calc_direction)
816 (details . ((ratio . 0.333)
817 (height-limit . 1.0)))
819 (meta . ((class . Item)
820 (interfaces . (laissez-vibrer-tie-interface))
824 (LaissezVibrerTieColumn
829 (positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
831 (meta . ((class . Item)
832 (interfaces . (laissez-vibrer-tie-column-interface))
839 (springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
841 (stencil . ,Ledger_line_spanner::print)
845 (minimum-length-fraction . 0.25)
846 (length-fraction . 0.25)
848 (meta . ((class . Spanner)
849 (interfaces . (ledger-line-interface))))))
853 (break-align-symbol . left-edge)
856 (break-visibility . ,center-invisible)
858 (custos . (extra-space . 0.0))
859 (ambitus . (extra-space . 2.0))
860 (time-signature . (extra-space . 1.0))
861 (staff-bar . (extra-space . 0.0))
862 (breathing-sign . (minimum-space . 0.0))
863 (clef . (extra-space . 0.8))
864 (first-note . (fixed-space . 2.0))
865 (right-edge . (extra-space . 0.0))
866 (key-signature . (extra-space . 0.0))
867 (key-cancellation . (extra-space . 0.0))
869 (meta . ((class . Item)
870 (interfaces . (break-aligned-interface))))))
874 ;; ugh. A ligature bracket is totally different from
877 (direction . ,Tuplet_bracket::calc_direction)
878 (positions . ,Tuplet_bracket::calc_positions)
879 (stencil . ,Tuplet_bracket::print)
885 (edge-height . (0.7 . 0.7))
886 (shorten-pair . (-0.2 . -0.2))
887 (meta . ((class . Spanner)
888 (interfaces . (tuplet-bracket-interface
897 (minimum-length . 0.3)
899 ; (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
901 (stencil . ,Hyphen_spanner::print)
904 (meta . ((class . Spanner)
905 (interfaces . (lyric-interface
906 lyric-hyphen-interface
907 spanner-interface))))))
912 (stencil . ,Lyric_extender::print)
914 (thickness . 0.8) ; linethickness
915 (minimum-length . 1.5)
917 (meta . ((class . Spanner)
918 (interfaces . (lyric-interface
919 lyric-extender-interface))))))
924 (stencil . ,Text_interface::print)
926 (X-offset . ,Self_alignment_interface::aligned_on_x_parent)
927 (self-alignment-X . 0)
929 (font-series . bold-narrow)
931 (meta . ((class . Item)
932 (interfaces . (rhythmic-grob-interface
933 lyric-syllable-interface
934 self-alignment-interface
942 (stencil . ,Mensural_ligature::print)
944 (meta . ((class . Spanner)
945 (interfaces . (mensural-ligature-interface
951 (stencil . ,Text_interface::print)
953 (Y-offset . ,Side_position_interface::y_aligned_side)
956 (meta . ((class . Item)
957 (interfaces . (text-interface
958 side-position-interface
960 metronome-mark-interface))))))
964 (Y-offset . ,Side_position_interface::y_aligned_side)
966 (stencil . ,Measure_grouping::print)
973 (meta . ((class . Spanner)
974 (interfaces . (side-position-interface
975 measure-grouping-interface))))))
980 (stencil . ,Multi_measure_rest::print)
982 (Y-offset . ,Staff_symbol_referencer::callback)
985 (thick-thickness . 6.6)
986 (hair-thickness . 2.0)
988 (meta . ((class . Spanner)
989 (interfaces . (multi-measure-rest-interface
990 multi-measure-interface
993 staff-symbol-referencer-interface))))))
996 (MultiMeasureRestNumber
998 (springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
999 (stencil . ,Text_interface::print)
1000 (self-X-offset . ,Self_alignment_interface::y_aligned_on_self)
1001 (X-offset . ,Self_alignment_interface::centered_on_y_parent)
1002 (Y-offset . ,Side_position_interface::y_aligned_side)
1003 (self-alignment-X . 0)
1006 (staff-padding . 0.4)
1007 (font-encoding . fetaNumber)
1008 (meta . ((class . Spanner)
1009 (interfaces . (side-position-interface
1010 multi-measure-interface
1011 self-alignment-interface
1017 (MultiMeasureRestText
1019 (stencil . ,Text_interface::print)
1020 (X-offset . ,Self_alignment_interface::centered_on_y_parent)
1021 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
1023 (Y-offset . ,Side_position_interface::y_aligned_side)
1024 (self-alignment-X . 0)
1027 (staff-padding . 0.25)
1028 (meta . ((class . Spanner)
1029 (interfaces . (side-position-interface
1030 multi-measure-interface
1031 self-alignment-interface
1033 text-interface))))))
1039 (X-extent . ,Axis_group_interface::width)
1040 (Y-extent . ,Axis_group_interface::height)
1041 (positioning-done . ,Note_collision_interface::calc_positioning_done)
1043 (meta . ((class . Item)
1044 (interfaces . (note-collision-interface
1045 axis-group-interface))))))
1050 (X-extent . ,Axis_group_interface::width)
1051 (Y-extent . ,Axis_group_interface::height)
1053 (meta . ((class . Item)
1054 (interfaces . (axis-group-interface
1055 note-column-interface))))))
1060 (stencil . ,Note_head::print)
1061 (stem-attachment . ,Note_head::calc_stem_attachment)
1062 (glyph-name . ,note-head::calc-glyph-name)
1063 (Y-offset . ,Staff_symbol_referencer::callback)
1064 (X-offset . ,Note_head::stem_x_shift)
1065 (meta . ((class . Item)
1066 (interfaces . (rhythmic-grob-interface
1067 rhythmic-head-interface
1071 staff-symbol-referencer-interface))))))
1075 (stem-spacing-correction . 0.5)
1076 (same-direction-correction . 0.25)
1077 ;; Changed this from 0.75.
1078 ;; If you ever change this back, please document! --hwn
1079 (knee-spacing-correction . 1.0)
1081 (meta . ((class . Item)
1082 (interfaces . (spacing-interface
1083 note-spacing-interface))))))
1088 (stencil . ,Text_interface::print)
1090 (meta . ((class . Item)
1091 (interfaces . (note-name-interface
1093 font-interface))))))
1097 (self-alignment-X . 0)
1098 (break-visibility . ,begin-of-line-visible)
1099 (X-offset . ,Self_alignment_interface::centered_on_x_parent)
1100 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
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 . ((slur-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
1207 (stencil . ,Text_interface::print)
1209 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
1210 (X-offset . ,Self_alignment_interface::centered_on_y_parent)
1211 (Y-offset . ,Side_position_interface::y_aligned_side)
1212 (self-alignment-X . 0)
1215 (staff-padding . 0.25)
1217 (font-encoding . fetaNumber)
1218 (meta . ((class . Spanner)
1219 (interfaces . (side-position-interface
1220 self-alignment-interface
1221 percent-repeat-interface
1223 text-interface))))))
1225 ;; an example of a text spanner
1229 (stencil . ,Piano_pedal_bracket::print)
1232 (bound-padding . 1.0)
1234 (bracket-flare . (0.5 . 0.5))
1235 (edge-height . (1.0 . 1.0))
1236 (shorten-pair . (0.0 . 0.0))
1238 (meta . ((class . Spanner)
1239 (interfaces . (line-interface
1240 piano-pedal-interface
1241 piano-pedal-bracket-interface))))))
1246 (stencil . ,Text_interface::print)
1248 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
1249 (Y-offset . ,Side_position_interface::y_aligned_side)
1251 (after-line-breaking . ,shift-right-at-line-begin)
1253 (self-alignment-X . 0)
1258 (break-visibility . ,end-of-line-invisible)
1260 (meta . ((class . Item)
1261 (interfaces . (text-interface
1262 side-position-interface
1265 self-alignment-interface))))))
1271 (stencil . ,Percent_repeat_item_interface::beat_slash)
1275 (meta . ((class . Item)
1276 (interfaces . (percent-repeat-interface))))))
1280 (stencil . ,Rest::print)
1281 (X-extent . ,Rest::width)
1282 (Y-extent . ,Rest::height)
1283 (Y-offset . ,Rest::y_offset_callback)
1284 (minimum-distance . 0.25)
1285 (meta . ((class . Item)
1286 (interfaces . (font-interface
1287 rhythmic-head-interface
1288 rhythmic-grob-interface
1289 staff-symbol-referencer-interface
1290 rest-interface))))))
1294 (minimum-distance . 0.75)
1295 (positioning-done . ,Rest_collision::calc_positioning_done)
1297 (meta . ((class . Item)
1298 (interfaces . (rest-collision-interface))))))
1302 ;; don't set direction here: it breaks staccato.
1304 ;; This value is sensitive: if too large, staccato dots will move a
1307 (staff-padding . 0.25)
1308 ;; (script-priority . 0) priorities for scripts, see script.scm
1309 (X-offset . ,Self_alignment_interface::centered_on_x_parent)
1311 (stencil . ,Script_interface::print)
1312 (direction . ,Script_interface::calc_direction)
1314 (font-encoding . fetaMusic)
1315 (meta . ((class . Item)
1316 (interfaces . (script-interface
1317 side-position-interface
1318 font-interface))))))
1323 (before-line-breaking . ,Script_column::before_line_breaking)
1325 (meta . ((class . Item)
1326 (interfaces . (script-column-interface))))))
1332 (meta . ((class . Item)
1333 (interfaces . (spacing-interface
1334 separation-item-interface))))))
1336 (SeparatingGroupSpanner
1339 (springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1341 (meta . ((class . Spanner)
1342 (interfaces . (only-prebreak-interface
1344 separation-spanner-interface))))))
1347 . ((slur-details . ,default-slur-details)
1349 (control-points . ,Slur::calc_control_points)
1350 (direction . ,Slur::calc_direction)
1351 (springs-and-rods . ,Spanner::set_spacing_rods)
1352 (Y-extent . ,Slur::height)
1353 (stencil . ,Slur::print)
1356 (minimum-length . 1.5)
1358 (height-limit . 2.0)
1360 (meta . ((class . Spanner)
1361 (interfaces . (slur-interface))))))
1366 (springs-and-rods . ,Spacing_spanner::set_springs)
1368 (grace-space-factor . 0.6)
1369 (shortest-duration-space . 2.0)
1370 (spacing-increment . 1.2)
1371 (base-shortest-duration . ,(ly:make-moment 3 16))
1372 (meta . ((class . Spanner)
1373 (interfaces . (spacing-interface
1374 spacing-spanner-interface))))))
1378 (break-align-symbol . staff-bar)
1383 (stencil . ,Span_bar::print)
1384 (bar-size . ,Span_bar::calc_bar_size)
1385 (X-extent . ,Span_bar::width)
1386 (glyph-name . ,Span_bar::calc_glyph_name)
1387 (before-line-breaking . ,Span_bar::before_line_breaking)
1392 ;; Ross. page 151 lists other values, we opt for a leaner look
1396 (hair-thickness . 1.6)
1397 (thick-thickness . 6.0)
1398 (meta . ((class . Item)
1399 (interfaces . (span-bar-interface
1401 bar-line-interface))))))
1405 (stencil . ,Text_interface::print)
1407 (font-series . bold)
1409 (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 (self-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)
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 (self-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)
1574 (staff-padding . 1.2)
1575 (minimum-space . 1.0)
1577 (meta . ((class . Spanner)
1578 (interfaces . (piano-pedal-interface
1579 axis-group-interface
1580 side-position-interface))))))
1585 (X-extent . ,Axis_group_interface::width)
1586 (Y-extent . ,Axis_group_interface::height)
1587 (meta . ((class . System)
1588 (interfaces . (system-interface
1589 axis-group-interface))))))
1594 (stencil . ,System_start_delimiter::print)
1595 (collapse-height . 5.0)
1596 (font-encoding . fetaBraces)
1598 (meta . ((class . Spanner)
1599 (interfaces . (system-start-delimiter-interface
1600 font-interface))))))
1606 (stencil . ,System_start_delimiter::print)
1608 (collapse-height . 5.0)
1610 (meta . ((class . Spanner)
1611 (interfaces . (font-interface
1612 system-start-delimiter-interface))))))
1617 (glyph . "bar-line")
1619 (stencil . ,System_start_delimiter::print)
1620 (meta . ((class . Spanner)
1621 (interfaces . (system-start-delimiter-interface))))))
1626 (stencil . ,Text_interface::print)
1627 (Y-offset . ,Staff_symbol_referencer::callback)
1629 (stem-attachment . (1.0 . 1.35))
1630 (font-series . bold)
1631 (meta . ((class . Item)
1633 . (rhythmic-head-interface
1636 staff-symbol-referencer-interface
1637 text-interface))))))
1641 (no-spacing-rods . #t)
1642 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
1645 ;; sync with Fingering ?
1647 (staff-padding . 0.5)
1649 (stencil . ,Text_interface::print)
1650 (direction . ,Script_interface::calc_direction)
1652 (avoid-slur . around)
1653 (slur-padding . 0.5)
1654 (script-priority . 200)
1655 ;; todo: add X self alignment?
1656 (meta . ((class . Item)
1657 (interfaces . (text-script-interface
1659 side-position-interface
1660 font-interface))))))
1664 (stencil . ,Text_spanner::print)
1665 (font-shape . italic)
1666 (style . dashed-line)
1667 (staff-padding . 0.8)
1668 (dash-fraction . 0.2)
1671 (meta . ((class . Spanner)
1672 (interfaces . (text-spanner-interface
1673 side-position-interface
1674 font-interface))))))
1678 (control-points . ,Tie::calc_control_points)
1679 (direction . ,Tie::calc_direction)
1680 (stencil . ,Tie::print)
1681 (details . ((ratio . 0.333)
1682 (height-limit . 1.0)
1683 (between-length-limit . 1.0)))
1685 (meta . ((class . Spanner)
1686 (interfaces . (tie-interface))))
1691 (positioning-done . ,Tie_column::calc_positioning_done)
1692 (before-line-breaking . ,Tie_column::before_line_breaking)
1695 (meta . ((class . Spanner)
1696 (interfaces . (tie-column-interface))))))
1700 (stencil . ,Time_signature::print)
1701 (break-align-symbol . time-signature)
1702 (break-visibility . ,all-visible)
1704 (first-note . (fixed-space . 2.0))
1705 (right-edge . (extra-space . 0.5))
1706 (staff-bar . (minimum-space . 2.0))))
1709 (meta . ((class . Item)
1710 (interfaces . (time-signature-interface
1711 break-aligned-interface
1712 font-interface))))))
1716 (stencil . ,Dynamic_text_spanner::print)
1717 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1720 (staff-padding . 1.0)
1723 (Y-offset . ,Side_position_interface::y_aligned_side)
1724 (meta . ((class . Spanner)
1725 (interfaces . (text-spanner-interface
1726 side-position-interface
1727 font-interface))))))
1729 (TrillPitchAccidental
1730 . ((X-offset . ,Side_position_interface::x_aligned_side)
1734 (stencil . ,Accidental_interface::print)
1735 (meta . ((class . Item)
1736 (interfaces . (item-interface
1737 accidental-interface
1738 side-position-interface
1739 font-interface))))))
1742 . ((X-offset . ,Side_position_interface::x_aligned_side)
1745 (stencil . ,parenthesize-elements)
1746 (direction . ,RIGHT)
1748 (meta . ((class . Item)
1749 (interfaces . (side-position-interface
1751 rhythmic-head-interface
1753 accidental-interface
1754 axis-group-interface))))))
1758 (stencil . ,Note_head::print)
1760 (Y-offset . ,Staff_symbol_referencer::callback)
1762 (meta . ((class . Item)
1763 (interfaces . (item-interface
1764 rhythmic-head-interface
1766 pitched-trill-interface
1768 staff-symbol-referencer-interface))))))
1774 (edge-height . (0.7 . 0.7))
1775 (shorten-pair . (-0.2 . -0.2))
1776 (direction . ,Tuplet_bracket::calc_direction)
1777 (positions . ,Tuplet_bracket::calc_positions)
1778 (stencil . ,Tuplet_bracket::print)
1779 (font-shape . italic)
1781 (meta . ((class . Spanner)
1782 (interfaces . (text-interface
1784 tuplet-bracket-interface
1785 font-interface))))))
1789 (stencil . ,Text_interface::print)
1790 (font-shape . italic)
1791 (no-spacing-rods . #t)
1792 (self-alignment-X . 0)
1794 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1795 (self-X-offset . ,Self_alignment_interface::x_aligned_on_self)
1796 (meta . ((class . Item)
1797 (interfaces . (text-interface
1798 self-alignment-interface
1799 font-interface))))))
1801 (UnaCordaPedalLineSpanner
1804 (X-extent . ,Axis_group_interface::height)
1805 (Y-offset . ,Side_position_interface::y_aligned_side)
1807 (staff-padding . 1.2)
1808 (minimum-space . 1.0)
1810 (meta . ((class . Spanner)
1811 (interfaces . (piano-pedal-interface
1812 axis-group-interface
1813 side-position-interface))))))
1819 (stencil . ,Vaticana_ligature::print)
1820 (meta . ((class . Spanner)
1821 (interfaces . (vaticana-ligature-interface
1822 font-interface))))))
1827 (positioning-done . ,Align_interface::calc_positioning_done)
1828 (after-line-breaking . ,Align_interface::stretch_after_break)
1829 (Y-extent . ,Axis_group_interface::height)
1830 (X-extent . ,Axis_group_interface::width)
1832 (meta . ((class . Spanner)
1833 (interfaces . (align-interface
1834 axis-group-interface))))))
1838 (Y-offset . ,Hara_kiri_group_spanner::force_hara_kiri_callback)
1839 (Y-extent . ,Hara_kiri_group_spanner::y_extent)
1840 (X-extent . ,Axis_group_interface::width)
1841 (meta . ((class . Spanner)
1842 (interfaces . (axis-group-interface
1843 hara-kiri-group-interface
1844 vertically-spaceable-interface))))))
1849 (Y-offset . ,Side_position_interface::y_aligned_on_support_refpoints)
1851 (space-alist . ((left-edge . (extra-space . 1.0))))
1852 (break-align-symbol . instrument-name)
1853 (stencil . ,Text_interface::print)
1854 (break-align-symbol . clef)
1855 (break-visibility . ,begin-of-line-visible)
1857 (meta . ((class . Item)
1858 (interfaces . (font-interface
1859 self-alignment-interface
1860 side-position-interface
1862 break-aligned-interface))))))
1866 (stencil . ,Volta_bracket_interface::print)
1867 (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)
1870 (font-encoding . fetaNumber)
1871 (Y-offset . ,Side_position_interface::y_aligned_side)
1872 (thickness . 1.6) ;; linethickness
1873 (edge-height . (2.0 . 2.0)) ;; staffspace;
1876 (meta . ((class . Spanner)
1877 (interfaces . (volta-bracket-interface
1878 horizontal-bracket-interface
1881 side-position-interface
1893 (stencil . ,Line_spanner::print)
1894 (after-line-breaking . ,Line_spanner::after_line_breaking)
1895 (meta . ((class . Spanner)
1896 (interfaces . (line-spanner-interface
1902 (define (completize-grob-entry x)
1903 "Transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc.
1905 ;; (display (car x))
1907 (let* ((name-sym (car x))
1908 (grob-entry (cdr x))
1909 (meta-entry (cdr (assoc 'meta grob-entry)))
1910 (class (cdr (assoc 'class meta-entry)))
1912 (cdr (assoc 'interfaces meta-entry))))
1916 (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1917 ((eq? 'Spanner class)
1918 (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1919 ((eq? 'Paper_column class)
1920 (set! ifaces-entry (cons 'item-interface
1921 (cons 'paper-column-interface ifaces-entry))))
1922 ((eq? 'System class)
1923 (set! ifaces-entry (cons 'system-interface
1924 (cons 'spanner-interface ifaces-entry))))
1926 (ly:warning "Unknown class ~a" class)))
1927 (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1929 (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1930 (set! meta-entry (assoc-set! meta-entry 'interfaces
1932 (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1933 (cons name-sym grob-entry)))
1935 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1937 ;; (display (map pair? all-grob-descriptions))
1939 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1942 ;; (display (car x)) (newline)
1944 (set-object-property! (car x) 'translation-type? list?)
1945 (set-object-property! (car x) 'is-grob? #t))
1946 all-grob-descriptions)
1948 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))