1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;;; distances are given in linethickness (thicknesses) and
9 ;;;; staffspace (distances)
11 ;;;; WARNING: the meta field should be the last one.
12 ;;;; WARNING: don't use anonymous functions for initialization.
14 ;; TODO: junk the meta field in favor of something more compact?
15 (define-public all-grob-descriptions
19 (print-function . ,Accidental_interface::print)
21 (cautionary-style . parentheses)
22 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)
23 (meta . ((interfaces . (item-interface accidental-interface
28 . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
31 ;; this is quite small, but it is very ugly to have
32 ;; accs closer to the previous note than to the next one.
33 (right-padding . 0.15)
34 (meta . ((interfaces . (item-interface accidental-placement-interface))))
39 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
40 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
42 (clef . (extra-space . 0.5))
43 (key-signature . (extra-space . 0.0))
44 (staff-bar . (extra-space . 0.0))
45 (time-signature . (extra-space . 0.0))
46 (first-note . (fixed-space . 0.0))
49 (break-align-symbol . ambitus)
50 (break-visibility . ,begin-of-line-visible)
51 (meta . ((interfaces . (axis-group-interface
52 break-aligned-interface ambitus-interface item-interface))))
57 (print-function . ,Ambitus::print)
60 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
62 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
66 (print-function . ,Accidental_interface::print)
69 (X-offset-callbacks . (,Side_position_interface::aligned_side))
71 (cautionary-style . parentheses)
72 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)
73 (meta . ((interfaces . (item-interface
74 accidental-interface break-aligned-interface
75 side-position-interface font-interface))))
82 (print-function . ,Note_head::print)
83 (glyph-name-procedure . ,find-notehead-symbol)
84 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
85 (meta . ((interfaces . (font-interface note-head-interface
87 staff-symbol-referencer-interface
88 rhythmic-head-interface
95 (X-extent-callback . ,Arpeggio::width_callback)
96 (Y-extent-callback . #f)
97 (print-function . ,Arpeggio::print)
98 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
99 (X-offset-callbacks . (,Side_position_interface::aligned_side))
102 (staff-position . 0.0)
103 (meta . ((interfaces . (arpeggio-interface
104 staff-symbol-referencer-interface side-position-interface
105 item-interface font-interface))))
110 (break-align-symbol . staff-bar)
112 (break-glyph-function . ,default-break-barline)
113 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
114 (print-function . ,Bar_line::print)
115 (break-visibility . ,all-visible)
117 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
119 (time-signature . (extra-space . 0.75))
120 (custos . (minimum-space . 2.0))
121 (clef . (minimum-space . 1.0))
122 (key-signature . (extra-space . 1.0))
123 (key-cancellation . (extra-space . 1.0))
124 (first-note . (fixed-space . 1.3))
125 (next-note . (semi-fixed-space . 1.3))
126 (right-edge . (extra-space . 0.0))
130 ;; Ross. page 151 lists other values, we opt for a leaner look
133 ;; kern should scale with linethickness too.
136 (hair-thickness . 1.9)
137 (thick-thickness . 6.0)
138 (meta . ((interfaces . (bar-line-interface
139 item-interface break-aligned-interface font-interface))))
145 (print-function . ,Text_interface::print)
147 (break-visibility . ,begin-of-line-visible)
150 (font-family . roman)
152 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
153 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
154 (self-alignment-X . 1)
157 ((interfaces . (side-position-interface
159 self-alignment-interface
160 font-interface item-interface break-aligned-interface))))
166 (print-function . ,Text_interface::print)
167 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
169 (font-family . number)
171 ;; We must do this, other BFs in
172 ;; layout16 become too small.
175 (meta . ((interfaces . (text-interface
176 rhythmic-grob-interface bass-figure-interface item-interface
177 self-alignment-interface font-interface))))
181 ;; todo: clean this up a bit: the list is getting
183 (print-function . ,Beam::print)
185 (positions . (#f . #f))
186 (position-callbacks . (,Beam::least_squares
189 ,Beam::shift_region_to_valid
193 ;; TODO: should be in SLT.
194 (thickness . 0.48) ; in staff-space
195 (before-line-breaking-callback . ,Beam::before_line_breaking)
196 (after-line-breaking-callback . ,Beam::after_line_breaking)
197 (neutral-direction . -1)
198 (dir-function . ,beam-dir-majority-median)
200 ;; Whe have some unreferenced problems here.
202 ;; If we shorten beamed stems less than normal stems (1 staffspace),
203 ;; or high order less than 8th beams, patterns like
204 ;; c''4 [c''8 c''] c''4 [c''16 c]
205 ;; are ugly (different stem lengths).
207 ;; But if we shorten 16th beams as much as 8th beams, a single
208 ;; forced 16th beam looks *very* short.
210 ;; We choose to shorten 8th beams the same as single stems,
211 ;; and high order beams less than 8th beams, so that all
212 ;; isolated shortened beams look nice and a bit shortened,
213 ;; sadly possibly breaking patterns with high order beams.
214 (beamed-stem-shorten . (1.0 0.5 0.25))
216 (flag-width-function . ,beam-flag-width-function)
218 (auto-knee-gap . 5.5)
220 ;; only for debugging.
221 (font-family . roman)
223 (space-function . ,Beam::space_function)
224 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
231 (break-align-orders . #(; end-of-line:
233 left-edge ambitus breathing-sign
234 clef staff-bar key-cancellation key-signature
235 time-signature custos)
238 (instrument-name left-edge ambitus breathing-sign
239 clef staff-bar key-cancellation key-signature
241 time-signature custos)
243 (instrument-name left-edge ambitus breathing-sign
244 clef key-cancellation key-signature staff-bar
245 time-signature custos)
249 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
250 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
256 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
257 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
258 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
263 (break-align-symbol . breathing-sign)
266 (ambitus . (extra-space . 2.0))
267 (custos . (minimum-space . 1.0))
268 (key-signature . (minimum-space . 1.5))
269 (staff-bar . (minimum-space . 1.5))
270 (clef . (minimum-space . 2.0))
271 (first-note . (fixed-space . 1.0)) ;huh?
272 (right-edge . (extra-space . 0.1))
274 (print-function . ,Text_interface::print)
275 (text . ,(make-musicglyph-markup "scripts.rcomma"))
276 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
277 (break-visibility . ,begin-of-line-invisible)
278 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
283 (print-function . ,Clef::print)
284 (before-line-breaking-callback . ,Clef::before_line_breaking)
286 (font-family . music)
287 (break-align-symbol . clef)
288 (break-visibility . ,begin-of-line-visible)
289 (space-alist . ((ambitus . (extra-space . 2.0))
290 (staff-bar . (extra-space . 0.7))
291 (key-cancellation . (minimum-space . 4.0))
292 (key-signature . (minimum-space . 4.0))
293 (time-signature . (minimum-space . 4.2))
294 (first-note . (minimum-fixed-space . 5.0))
295 (next-note . (extra-space . 0.5))
296 (right-edge . (extra-space . 0.5))
298 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
299 (meta . ((interfaces . (clef-interface
300 staff-symbol-referencer-interface font-interface
301 break-aligned-interface item-interface ))))
304 (ClusterSpannerBeacon
306 (print-function . #f)
307 (Y-extent-callback . ,Cluster_beacon::height)
308 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
313 (print-function . ,Cluster::print)
314 (spacing-procedure . ,Spanner::set_spacing_rods)
315 (minimum-length . 0.0)
318 (meta . ((interfaces . (cluster-interface spanner-interface))))
323 (print-function . ,Text_interface::print)
324 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
328 (meta . ((interfaces . (font-interface
329 rhythmic-grob-interface text-interface chord-name-interface
335 (break-align-symbol . custos)
337 (print-function . ,Custos::print)
338 (break-visibility . ,end-of-line-visible)
340 (neutral-direction . -1)
341 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
343 (first-note . (minimum-fixed-space . 0.0))
344 (right-edge . (extra-space . 0.1))
347 . (custos-interface staff-symbol-referencer-interface
349 break-aligned-interface item-interface ))))
356 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
357 (X-offset-callbacks . (,Dot_column::side_position))
358 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
363 (print-function . ,Dots::print)
365 (meta . ((interfaces . (font-interface
366 staff-symbol-referencer-interface dots-interface item-interface ))))
371 (print-function . ,Percent_repeat_item_interface::double_percent)
374 (font-encoding . fetaMusic)
377 (break-align-symbol . staff-bar)
378 (break-visibility . ,begin-of-line-invisible)
379 (meta . ((interfaces . (font-interface
380 break-aligned-interface
381 percent-repeat-interface item-interface ))))
385 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
386 (print-function . ,Text_interface::print)
387 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
388 ,Self_alignment_interface::centered_on_parent))
389 (self-alignment-X . 0)
390 (no-spacing-rods . #t)
391 (script-priority . 100)
393 (font-encoding . fetaDynamic)
394 (font-shape . italic)
395 (self-alignment-Y . 0)
396 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
397 dynamic-interface script-interface item-interface))))
400 . ((print-function . ,Dynamic_text_spanner::print)
402 ;; rather ugh with NCSB
403 ; (font-series . bold)
404 (font-shape . italic)
405 (style . dashed-line)
407 ; need to blend with dynamic texts.
409 (bound-padding . 0.75)
410 (dash-fraction . 0.2)
412 (meta . ((interfaces . (font-interface
414 dynamic-interface dynamic-text-spanner-interface
421 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
422 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
423 (staff-padding . 0.1)
425 (minimum-space . 1.2)
428 (meta . ((interfaces . (dynamic-interface axis-group-interface
429 side-position-interface spanner-interface))))))
433 (break-align-symbol . left-edge)
436 (break-visibility . ,center-invisible)
438 (custos . (extra-space . 0.0))
439 (ambitus . (extra-space . 2.0))
440 (time-signature . (extra-space . 0.0))
441 (staff-bar . (extra-space . 0.0))
442 (breathing-sign . (minimum-space . 0.0))
443 (clef . (extra-space . 0.8))
444 (first-note . (fixed-space . 1.0))
445 (right-edge . (extra-space . 0.0))
446 (key-signature . (extra-space . 0.0))
447 (key-cancellation . (extra-space . 0.0))
450 (meta . ((interfaces . (break-aligned-interface item-interface ))))
455 (print-function . ,Text_interface::print)
457 ; sync with TextScript (?)
459 (staff-padding . 0.5)
460 (self-alignment-X . 0)
461 (self-alignment-Y . 0)
462 (script-priority . 100)
463 (font-encoding . fetaNumber)
464 (font-size . -5) ; don't overlap when next to heads.
465 (meta . ((interfaces . (finger-interface
466 font-interface text-script-interface text-interface
467 side-position-interface self-alignment-interface
472 (print-function . ,print-circled-text-callback)
474 (staff-padding . 0.5)
475 (self-alignment-X . 0)
476 (self-alignment-Y . 0)
477 (script-priority . 100)
478 (font-encoding . fetaNumber)
479 (font-size . -5) ; don't overlap when next to heads.
480 (meta . ((interfaces . (string-number-interface
481 font-interface text-script-interface text-interface
482 side-position-interface self-alignment-interface
490 (zigzag-width . 0.75)
492 (X-extent-callback . #f)
493 (Y-extent-callback . #f)
494 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
495 (print-function . ,Line_spanner::print)
496 (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
501 (print-function . ,Hairpin::print)
502 (after-line-breaking-callback . ,Hairpin::after_line_breaking)
505 (spacing-procedure . ,Spanner::set_spacing_rods)
506 (minimum-length . 2.0)
507 (bound-padding . 1.0)
508 (self-alignment-Y . 0)
509 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
510 (meta . ((interfaces . (hairpin-interface
511 line-interface self-alignment-interface dynamic-interface
512 spanner-interface))))
518 (print-function . ,Horizontal_bracket::print)
519 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
522 (bracket-flare . (0.5 . 0.5))
523 (meta . ((interfaces . (horizontal-bracket-interface
524 side-position-interface
526 spanner-interface))))
531 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
532 ,Side_position_interface::aligned_on_support_refpoints))
533 ;; This direction is for aligned_on_support_refpoints
537 (left-edge . (extra-space . 1.0))
540 (self-alignment-Y . 0)
541 (print-function . ,Text_interface::print)
542 (break-align-symbol . instrument-name)
543 (break-visibility . ,begin-of-line-visible)
545 (meta . ((interfaces . (font-interface
546 self-alignment-interface side-position-interface text-interface
547 break-aligned-interface item-interface ))))
553 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
555 (space-alist . ((left-edge . (extra-space . 1.0))
557 (break-align-symbol . instrument-name)
558 (print-function . ,Text_interface::print)
559 (break-align-symbol . clef)
560 (break-visibility . ,begin-of-line-visible)
562 (meta . ((interfaces . (font-interface
563 self-alignment-interface
564 side-position-interface text-interface
565 break-aligned-interface item-interface ))))
569 (print-function . ,Key_signature_interface::print)
571 (time-signature . (extra-space . 1.25))
572 (staff-bar . (extra-space . 0.6))
573 (key-signature . (extra-space . 0.5))
574 (right-edge . (extra-space . 0.5))
575 (first-note . (fixed-space . 2.5))
577 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
578 (break-align-symbol . key-cancellation)
579 (break-visibility . ,begin-of-line-invisible)
582 (meta . ((interfaces . (key-signature-interface font-interface
583 break-aligned-interface item-interface ))))
587 (print-function . ,Key_signature_interface::print)
589 (time-signature . (extra-space . 1.25))
590 (staff-bar . (extra-space . 1.1))
591 (right-edge . (extra-space . 0.5))
592 (first-note . (fixed-space . 2.5))
594 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
595 (break-align-symbol . key-signature)
596 (break-visibility . ,begin-of-line-visible)
599 (meta . ((interfaces . (key-signature-interface font-interface
600 break-aligned-interface item-interface ))))
604 (print-function . ,Ledger_line_spanner::print)
605 (X-extent-callback . #f)
606 (Y-extent-callback . #f)
607 (minimum-length-fraction . 0.25)
608 (length-fraction . 0.25)
609 (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
610 (print-function . ,Ledger_line_spanner::print)
612 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
617 (ligature-primitive-callback . ,Note_head::print)
622 (edge-height . (0.7 . 0.7))
623 (shorten-pair . (-0.2 . -0.2))
624 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
625 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
626 (print-function . ,Tuplet_bracket::print)
627 (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
636 (minimum-length . 0.3)
638 ; (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
639 (print-function . ,Hyphen_spanner::print)
641 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
642 spanner-interface))))
647 (print-function . ,Lyric_extender::print)
648 (thickness . 0.8) ; linethickness
649 (minimum-length . 1.5)
651 (meta . ((interfaces . (lyric-interface
652 lyric-extender-interface spanner-interface))))
656 . ((print-function . ,Text_interface::print)
657 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
658 (self-alignment-X . 0)
660 (font-series . bold-narrow)
662 (meta . ((interfaces . (rhythmic-grob-interface
663 lyric-syllable-interface
664 self-alignment-interface text-interface
665 font-interface item-interface ))))
672 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
673 (print-function . ,Mensural_ligature::print)
674 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
679 (print-function . ,Text_interface::print)
680 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
681 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
682 (after-line-breaking-callback . ,shift-right-at-line-begin)
683 (self-alignment-X . 0)
688 (break-visibility . ,end-of-line-invisible)
690 (meta . ((interfaces . (text-interface
691 side-position-interface font-interface mark-interface
692 self-alignment-interface item-interface ))))
696 (print-function . ,Text_interface::print)
697 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
700 (meta . ((interfaces . (text-interface
701 side-position-interface font-interface
702 metronome-mark-interface item-interface))))
706 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
707 (print-function . ,Measure_grouping::print)
713 (meta . ((interfaces . (spanner-interface side-position-interface
714 measure-grouping-interface))))
718 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
719 (print-function . ,Multi_measure_rest::print)
720 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
723 (thick-thickness . 6.6)
724 (hair-thickness . 2.0)
726 (meta . ((interfaces . (multi-measure-rest-interface
727 multi-measure-interface rest-interface
728 font-interface staff-symbol-referencer-interface))))
731 (MultiMeasureRestNumber
733 (print-function . ,Text_interface::print)
734 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
735 ,Self_alignment_interface::centered_on_other_axis_parent))
736 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
737 (self-alignment-X . 0)
740 (staff-padding . 0.4)
741 (font-encoding . fetaNumber)
742 (meta . ((interfaces . (side-position-interface
743 multi-measure-interface self-alignment-interface
744 font-interface spanner-interface text-interface))))
746 (MultiMeasureRestText
748 (print-function . ,Text_interface::print)
749 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
750 ,Self_alignment_interface::centered_on_other_axis_parent))
751 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
752 (self-alignment-X . 0)
755 (staff-padding . 0.25)
756 (meta . ((interfaces . (side-position-interface
757 multi-measure-interface self-alignment-interface font-interface
758 spanner-interface text-interface))))
764 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
765 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
766 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
772 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
773 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
774 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
780 (print-function . ,Note_head::print)
781 (ligature-primitive-callback . ,Note_head::print)
782 (glyph-name-procedure . ,find-notehead-symbol)
783 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
784 (stem-attachment-function . ,note-head-style->attachment-coordinates)
785 (meta . ((interfaces . (rhythmic-grob-interface
786 rhythmic-head-interface font-interface note-head-interface
788 staff-symbol-referencer-interface item-interface ))))
793 (stem-spacing-correction . 0.5)
794 (same-direction-correction . 0.25)
795 ;; Changed this from 0.75.
796 ;; If you ever change this back, please document! --hwn
797 (knee-spacing-correction . 1.0)
799 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
807 (X-extent-callback . #f)
808 (Y-extent-callback . #f)
809 (print-function . ,Line_spanner::print)
810 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
811 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
816 (print-function . ,Text_interface::print)
817 (meta . ((interfaces . (note-name-interface
818 text-interface font-interface item-interface ))))
823 (self-alignment-X . 0)
824 (break-visibility . ,begin-of-line-visible)
825 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
826 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
827 (print-function . ,Text_interface::print)
829 ;; no Y dimensions, because of lyrics under tenor clef.
831 (font-shape . italic)
833 (staff-padding . 0.2)
835 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
841 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
842 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
844 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
845 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
849 . ((slur-details . ,default-slur-details)
850 (print-function . ,Slur::print)
852 (spacing-procedure . ,Spanner::set_spacing_rods)
853 (minimum-length . 1.5)
854 (after-line-breaking-callback . ,Slur::after_line_breaking)
855 (Y-extent-callback . ,Slur::height)
858 (meta . ((interfaces . (slur-interface spanner-interface))))
861 (NonMusicalPaperColumn
864 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
865 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
867 ;; debugging stuff: print column number.
868 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
871 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
876 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
877 (print-function . ,Multi_measure_rest::percent)
880 (font-encoding . fetaMusic)
881 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
884 ;; an example of a text spanner
887 (print-function . ,Piano_pedal_bracket::print)
889 (bound-padding . 1.0)
891 (bracket-flare . (0.5 . 0.5))
892 (edge-height . (1.0 . 1.0))
893 (shorten-pair . (0.0 . 0.0))
895 (meta . ((interfaces . (line-interface
896 piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
900 (RemoveEmptyVerticalGroup
902 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
903 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
906 (meta . ((interfaces . (axis-group-interface
907 vertically-spaceable-interface hara-kiri-group-interface
908 item-interface spanner-interface))))
913 (print-function . ,Percent_repeat_item_interface::beat_slash)
916 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
920 (after-line-breaking-callback . ,Rest::after_line_breaking)
921 (X-extent-callback . ,Rest::extent_callback)
922 (Y-extent-callback . ,Rest::extent_callback)
923 (print-function . ,Rest::print)
924 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
925 ,Rest::polyphonic_offset_callback
927 (minimum-distance . 0.25)
929 (interfaces . (font-interface
930 rhythmic-head-interface
931 rhythmic-grob-interface
932 staff-symbol-referencer-interface
933 rest-interface item-interface ))
938 (minimum-distance . 0.75)
939 (meta . ((interfaces . (rest-collision-interface item-interface ))))
944 ;; don't set direction here: it breaks staccato.
945 (print-function . ,Script_interface::print)
947 ;; This value is sensitive: if too large, staccato dots will move a
950 (staff-padding . 0.25)
951 ;; (script-priority . 0) priorities for scripts, see script.scm
952 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
953 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
954 (font-encoding . fetaMusic)
955 (meta . ((interfaces . (script-interface
956 side-position-interface font-interface item-interface ))))
961 (before-line-breaking-callback . ,Script_column::before_line_breaking)
962 (meta . ((interfaces . (script-column-interface item-interface ))))
966 . ((slur-details . ,default-slur-details)
967 (print-function . ,Slur::print)
969 (spacing-procedure . ,Spanner::set_spacing_rods)
970 (minimum-length . 1.5)
971 (after-line-breaking-callback . ,Slur::after_line_breaking)
972 (Y-extent-callback . ,Slur::height)
976 (meta . ((interfaces . (slur-interface spanner-interface))))
981 (spacing-procedure . ,Spacing_spanner::set_springs)
982 (grace-space-factor . 0.6)
983 (shortest-duration-space . 2.0)
984 (spacing-increment . 1.2)
985 (base-shortest-duration . ,(ly:make-moment 3 16))
986 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
991 (break-align-symbol . staff-bar)
992 (bar-size-procedure . ,Span_bar::get_bar_size)
993 (print-function . ,Span_bar::print)
994 (X-extent-callback . ,Span_bar::width_callback)
995 (Y-extent-callback . ())
997 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
1001 ;; Ross. page 151 lists other values, we opt for a leaner look
1005 (hair-thickness . 1.6)
1006 (thick-thickness . 6.0)
1007 (meta . ((interfaces . (span-bar-interface font-interface
1008 bar-line-interface item-interface ))))
1012 . ((print-function . ,Text_interface::print)
1013 (font-series . bold)
1015 (X-offset-callbacks . (,Side_position_interface::aligned_side))
1017 (meta . ((interfaces . (side-position-interface
1018 stanza-number-interface text-interface font-interface item-interface ))))
1024 (stem-spacing-correction . 0.4)
1026 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
1031 (print-function . ,Text_interface::print)
1033 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1034 (no-spacing-rods . #t)
1035 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1036 (font-shape . italic)
1037 (self-alignment-X . 0)
1038 (meta . ((interfaces . (text-interface
1039 self-alignment-interface font-interface item-interface))))
1042 (SostenutoPedalLineSpanner
1045 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1046 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1050 (minimum-space . 1.0)
1052 (meta . ((interfaces . (piano-pedal-interface
1053 axis-group-interface side-position-interface spanner-interface))))
1058 (print-function . ,Staff_symbol::print)
1060 (ledger-line-thickness . (1.0 . 0.1))
1062 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1067 ;; this list is rather long. Trim --hwn
1068 (before-line-breaking-callback . ,Stem::before_line_breaking)
1069 (print-function . ,Stem::print)
1072 ;; 3.5 (or 3 measured from note head) is standard length
1073 ;; 32nd, 64th flagged stems should be longer
1074 (lengths . (3.5 3.5 3.5 4.5 5.0))
1076 ;; Stems in unnatural (forced) direction should be shortened by
1077 ;; one staff space, according to [Roush & Gourlay].
1078 ;; Flagged stems we shorten only half a staff space.
1079 (stem-shorten . (1.0 0.5))
1081 ;; default stem direction for note on middle line
1082 (neutral-direction . -1)
1086 ;; FIXME. 3.5 yields too long beams (according to Ross and
1087 ;; looking at Baerenreiter examples) for a number of common
1088 ;; boundary cases. Subtracting half a beam thickness fixes
1089 ;; this, but the bug may well be somewhere else.
1091 ;; FIXME this should come from 'lengths
1093 (beamed-lengths . (3.26 3.5 3.6))
1095 ;; We use the normal minima as minimum for the ideal lengths,
1096 ;; and the extreme minima as abolute minimum length.
1098 ;; The 'normal' minima
1099 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1100 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1102 ;; The 'extreme case' minima
1103 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1105 (X-offset-callbacks . (,Stem::offset_callback))
1106 (X-extent-callback . ,Stem::width_callback)
1107 (Y-extent-callback . ,Stem::height)
1108 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1109 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1114 (print-function . ,Stem_tremolo::print)
1115 (Y-extent-callback . ,Stem_tremolo::height)
1116 (X-extent-callback . #f)
1118 (beam-width . 1.6) ; staff-space
1119 (beam-thickness . 0.48) ; staff-space
1120 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1125 (X-extent-callback . #f)
1126 (Y-extent-callback . #f)
1127 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1130 (SeparatingGroupSpanner
1132 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1133 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1138 (no-spacing-rods . #t)
1139 (print-function . ,Sustain_pedal::print)
1140 (self-alignment-X . 0)
1142 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1143 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1144 (meta . ((interfaces . (piano-pedal-interface
1145 text-spanner-interface text-interface self-alignment-interface
1146 font-interface item-interface))))
1149 (SustainPedalLineSpanner
1152 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1153 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1156 (staff-padding . 1.2)
1157 (minimum-space . 1.0)
1159 (meta . ((interfaces . (piano-pedal-interface
1160 axis-group-interface side-position-interface spanner-interface))))
1166 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1167 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1168 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1174 (print-function . ,System_start_delimiter::print)
1175 (collapse-height . 5.0)
1176 (font-encoding . fetaBraces)
1177 (Y-extent-callback . #f)
1178 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1183 (Y-extent-callback . #f)
1184 (print-function . ,System_start_delimiter::print)
1190 (collapse-height . 1)
1192 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1197 (Y-extent-callback . #f)
1198 (print-function . ,System_start_delimiter::print)
1199 (glyph . "bar-line")
1201 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1202 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1207 (print-function . ,Text_interface::print)
1208 (no-spacing-rods . #t)
1209 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1212 ; sync with Fingering ?
1214 (staff-padding . 0.5)
1215 (script-priority . 200)
1216 ;; todo: add X self alignment?
1217 (meta . ((interfaces . (text-script-interface
1218 text-interface side-position-interface font-interface
1223 (print-function . ,Text_interface::print)
1224 (no-spacing-rods . #t)
1225 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1226 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1229 (staff-padding . 0.5)
1230 (script-priority . 200)
1231 ;; todo: add X self alignment?
1233 (font-series . bold)
1234 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1238 (print-function . ,Text_spanner::print)
1239 (font-shape . italic)
1240 (style . dashed-line)
1241 (staff-padding . 0.1)
1242 (dash-fraction . 0.2)
1245 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1249 (print-function . ,Dynamic_text_spanner::print)
1250 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1253 (staff-padding . 1.0)
1256 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1257 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1262 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1263 (print-function . ,Ottava_bracket::print)
1264 (font-shape . italic)
1265 (shorten-pair . (0.0 . -0.6))
1266 (staff-padding . 1.0)
1268 (minimum-length . 1.0)
1269 (dash-fraction . 0.3)
1270 (edge-height . (0 . 1.2))
1272 (meta . ((interfaces . (ottava-bracket-interface
1273 line-interface side-position-interface
1274 font-interface text-interface spanner-interface))))
1280 (print-function . ,Text_interface::print)
1281 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1282 (stem-attachment-function . ,tablature-stem-attachment-function)
1283 (font-series . bold)
1284 (meta . ((interfaces
1285 . (rhythmic-head-interface
1287 note-head-interface staff-symbol-referencer-interface
1288 text-interface item-interface ))))
1294 (print-function . ,Tie::print)
1295 (spacing-procedure . ,Spanner::set_spacing_rods)
1296 (staffline-clearance . 0.35)
1297 (details . ((ratio . 0.333) (height-limit . 1.0)))
1301 (minimum-length . 2.5)
1302 (meta . ((interfaces . (tie-interface spanner-interface))))
1307 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1308 (before-line-breaking-callback . ,Tie_column::before_line_breaking)
1309 (X-extent-callback . #f)
1310 (Y-extent-callback . #f)
1311 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1316 (print-function . ,Time_signature::print)
1317 ; (print-function . ,Text_interface::print)
1318 (break-align-symbol . time-signature)
1319 (break-visibility . ,all-visible)
1321 (first-note . (fixed-space . 2.0))
1322 (right-edge . (extra-space . 0.5))
1323 (staff-bar . (minimum-space . 2.0))
1327 ; (text . (,time-signature-glue-markup))
1328 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1335 (edge-height . (0.7 . 0.7))
1336 (shorten-pair . (-0.2 . -0.2))
1337 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1338 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1339 (print-function . ,Tuplet_bracket::print)
1340 (font-shape . italic)
1341 ; (font-series . bold)
1344 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1349 (print-function . ,Text_interface::print)
1350 (font-shape . italic)
1351 (no-spacing-rods . #t)
1352 (self-alignment-X . 0)
1354 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1355 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1356 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1359 (UnaCordaPedalLineSpanner
1362 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1363 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1365 (staff-padding . 1.2)
1366 (minimum-space . 1.0)
1368 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1375 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1376 (print-function . ,Vaticana_ligature::print)
1377 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1382 (print-function . ,Volta_bracket_interface::print)
1385 (font-encoding . fetaNumber)
1386 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1387 (thickness . 1.6) ;; linethickness
1388 (height . 2.0) ;; staffspace;
1391 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1397 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1398 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1400 ;; (threshold . (6 . 1000))
1401 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1407 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1408 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1410 (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface spanner-interface))))
1418 (define (completize-grob-entry x)
1419 "transplant assoc key into 'name entry of 'meta of X
1421 (let* ((name-sym (car x))
1422 (grob-entry (cdr x))
1423 (metaentry (cdr (assoc 'meta grob-entry)))
1425 (cdr (assoc 'interfaces metaentry)))
1428 (set! metaentry (assoc-set! metaentry 'name name-sym))
1429 (set! metaentry (assoc-set! metaentry 'interfaces
1430 (cons 'grob-interface ifaces-entry)))
1431 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1432 (cons name-sym grob-entry)))
1434 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1437 ;; (display (map pair? all-grob-descriptions))
1439 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1442 ;; (display (car x)) (newline)
1444 (set-object-property! (car x) 'translation-type? list?)
1445 (set-object-property! (car x) 'is-grob? #t))
1446 all-grob-descriptions)
1448 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))