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 (print-function . ,Arpeggio::print)
97 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
98 (X-offset-callbacks . (,Side_position_interface::aligned_side))
101 (staff-position . 0.0)
102 (meta . ((interfaces . (arpeggio-interface
103 staff-symbol-referencer-interface side-position-interface
104 item-interface font-interface))))
109 (break-align-symbol . staff-bar)
111 (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-X . 0)
389 (no-spacing-rods . #t)
390 (script-priority . 100)
392 (font-encoding . fetaDynamic)
393 (font-shape . italic)
394 (self-alignment-Y . 0)
395 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
396 dynamic-interface script-interface item-interface))))
399 . ((print-function . ,Dynamic_text_spanner::print)
401 ;; rather ugh with NCSB
402 ; (font-series . bold)
403 (font-shape . italic)
404 (style . dashed-line)
406 ; need to blend with dynamic texts.
408 (bound-padding . 0.75)
409 (dash-fraction . 0.2)
411 (meta . ((interfaces . (font-interface
413 dynamic-interface dynamic-text-spanner-interface
420 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
421 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
422 (staff-padding . 0.1)
424 (minimum-space . 1.2)
427 (meta . ((interfaces . (dynamic-interface axis-group-interface
428 side-position-interface spanner-interface))))))
432 (break-align-symbol . left-edge)
435 (break-visibility . ,center-invisible)
437 (custos . (extra-space . 0.0))
438 (ambitus . (extra-space . 2.0))
439 (time-signature . (extra-space . 0.0))
440 (staff-bar . (extra-space . 0.0))
441 (breathing-sign . (minimum-space . 0.0))
442 (clef . (extra-space . 0.8))
443 (first-note . (fixed-space . 1.0))
444 (right-edge . (extra-space . 0.0))
445 (key-signature . (extra-space . 0.0))
446 (key-cancellation . (extra-space . 0.0))
449 (meta . ((interfaces . (break-aligned-interface item-interface ))))
454 (print-function . ,Text_interface::print)
456 ; sync with TextScript (?)
458 (staff-padding . 0.5)
459 (self-alignment-X . 0)
460 (self-alignment-Y . 0)
461 (script-priority . 100)
462 (font-encoding . fetaNumber)
463 (font-size . -5) ; don't overlap when next to heads.
464 (meta . ((interfaces . (finger-interface
465 font-interface text-script-interface text-interface
466 side-position-interface self-alignment-interface
471 (print-function . ,print-circled-text-callback)
473 (staff-padding . 0.5)
474 (self-alignment-X . 0)
475 (self-alignment-Y . 0)
476 (script-priority . 100)
477 (font-encoding . fetaNumber)
478 (font-size . -5) ; don't overlap when next to heads.
479 (meta . ((interfaces . (string-number-interface
480 font-interface text-script-interface text-interface
481 side-position-interface self-alignment-interface
489 (zigzag-width . 0.75)
491 (X-extent-callback . #f)
492 (Y-extent-callback . #f)
493 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
494 (print-function . ,Line_spanner::print)
495 (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
502 (meta . ((interfaces . (grid-point-interface))))
507 (print-function . ,Grid_line_interface::print)
508 (X-extent-callback . ,Grid_line_interface::width_callback)
509 (self-alignment-X . ,CENTER)
510 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
511 ,Self_alignment_interface::centered_on_parent))
513 (meta . ((interfaces . (self-alignment-interface grid-line-interface)))
518 (print-function . ,Hairpin::print)
519 (after-line-breaking-callback . ,Hairpin::after_line_breaking)
522 (spacing-procedure . ,Spanner::set_spacing_rods)
523 (minimum-length . 2.0)
524 (bound-padding . 1.0)
525 (self-alignment-Y . 0)
526 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
527 (meta . ((interfaces . (hairpin-interface
528 line-interface self-alignment-interface dynamic-interface
529 spanner-interface))))
535 (print-function . ,Horizontal_bracket::print)
536 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
538 (staff-padding . 0.2)
540 (bracket-flare . (0.5 . 0.5))
541 (meta . ((interfaces . (horizontal-bracket-interface
542 side-position-interface
544 spanner-interface))))
549 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
550 ,Side_position_interface::aligned_on_support_refpoints))
551 ;; This direction is for aligned_on_support_refpoints
555 (left-edge . (extra-space . 1.0))
558 (self-alignment-Y . 0)
559 (print-function . ,Text_interface::print)
560 (break-align-symbol . instrument-name)
561 (break-visibility . ,begin-of-line-visible)
563 (meta . ((interfaces . (font-interface
564 self-alignment-interface side-position-interface text-interface
565 break-aligned-interface item-interface ))))
571 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
573 (space-alist . ((left-edge . (extra-space . 1.0))
575 (break-align-symbol . instrument-name)
576 (print-function . ,Text_interface::print)
577 (break-align-symbol . clef)
578 (break-visibility . ,begin-of-line-visible)
580 (meta . ((interfaces . (font-interface
581 self-alignment-interface
582 side-position-interface text-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 . 0.6))
591 (key-signature . (extra-space . 0.5))
592 (right-edge . (extra-space . 0.5))
593 (first-note . (fixed-space . 2.5))
595 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
596 (break-align-symbol . key-cancellation)
597 (break-visibility . ,begin-of-line-invisible)
600 (meta . ((interfaces . (key-signature-interface font-interface
601 break-aligned-interface item-interface ))))
605 (print-function . ,Key_signature_interface::print)
607 (time-signature . (extra-space . 1.25))
608 (staff-bar . (extra-space . 1.1))
609 (right-edge . (extra-space . 0.5))
610 (first-note . (fixed-space . 2.5))
612 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
613 (break-align-symbol . key-signature)
614 (break-visibility . ,begin-of-line-visible)
617 (meta . ((interfaces . (key-signature-interface font-interface
618 break-aligned-interface item-interface ))))
622 (print-function . ,Ledger_line_spanner::print)
623 (X-extent-callback . #f)
624 (Y-extent-callback . #f)
625 (minimum-length-fraction . 0.25)
626 (length-fraction . 0.25)
627 (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
628 (print-function . ,Ledger_line_spanner::print)
630 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
635 (ligature-primitive-callback . ,Note_head::print)
640 (edge-height . (0.7 . 0.7))
641 (shorten-pair . (-0.2 . -0.2))
642 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
643 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
644 (print-function . ,Tuplet_bracket::print)
645 (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
654 (minimum-length . 0.3)
656 ; (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
657 (print-function . ,Hyphen_spanner::print)
659 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
660 spanner-interface))))
665 (print-function . ,Lyric_extender::print)
666 (thickness . 0.8) ; linethickness
667 (minimum-length . 1.5)
669 (meta . ((interfaces . (lyric-interface
670 lyric-extender-interface spanner-interface))))
674 . ((print-function . ,Text_interface::print)
675 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
676 (self-alignment-X . 0)
678 (font-series . bold-narrow)
680 (meta . ((interfaces . (rhythmic-grob-interface
681 lyric-syllable-interface
682 self-alignment-interface text-interface
683 font-interface item-interface ))))
690 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
691 (print-function . ,Mensural_ligature::print)
692 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
697 (print-function . ,Text_interface::print)
698 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
699 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
700 (after-line-breaking-callback . ,shift-right-at-line-begin)
701 (self-alignment-X . 0)
706 (break-visibility . ,end-of-line-invisible)
708 (meta . ((interfaces . (text-interface
709 side-position-interface font-interface mark-interface
710 self-alignment-interface item-interface ))))
714 (print-function . ,Text_interface::print)
715 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
718 (meta . ((interfaces . (text-interface
719 side-position-interface font-interface
720 metronome-mark-interface item-interface))))
724 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
725 (print-function . ,Measure_grouping::print)
731 (meta . ((interfaces . (spanner-interface side-position-interface
732 measure-grouping-interface))))
736 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
737 (print-function . ,Multi_measure_rest::print)
738 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
741 (thick-thickness . 6.6)
742 (hair-thickness . 2.0)
744 (meta . ((interfaces . (multi-measure-rest-interface
745 multi-measure-interface rest-interface
746 font-interface staff-symbol-referencer-interface))))
749 (MultiMeasureRestNumber
751 (print-function . ,Text_interface::print)
752 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
753 ,Self_alignment_interface::centered_on_other_axis_parent))
754 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
755 (self-alignment-X . 0)
758 (staff-padding . 0.4)
759 (font-encoding . fetaNumber)
760 (meta . ((interfaces . (side-position-interface
761 multi-measure-interface self-alignment-interface
762 font-interface spanner-interface text-interface))))
764 (MultiMeasureRestText
766 (print-function . ,Text_interface::print)
767 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
768 ,Self_alignment_interface::centered_on_other_axis_parent))
769 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
770 (self-alignment-X . 0)
773 (staff-padding . 0.25)
774 (meta . ((interfaces . (side-position-interface
775 multi-measure-interface self-alignment-interface font-interface
776 spanner-interface text-interface))))
782 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
783 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
784 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
790 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
791 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
792 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
798 (print-function . ,Note_head::print)
799 (ligature-primitive-callback . ,Note_head::print)
800 (glyph-name-procedure . ,find-notehead-symbol)
801 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
802 (stem-attachment-function . ,note-head-style->attachment-coordinates)
803 (meta . ((interfaces . (rhythmic-grob-interface
804 rhythmic-head-interface font-interface note-head-interface
806 staff-symbol-referencer-interface item-interface ))))
811 (stem-spacing-correction . 0.5)
812 (same-direction-correction . 0.25)
813 ;; Changed this from 0.75.
814 ;; If you ever change this back, please document! --hwn
815 (knee-spacing-correction . 1.0)
817 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
825 (X-extent-callback . #f)
826 (Y-extent-callback . #f)
827 (print-function . ,Line_spanner::print)
828 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
829 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
834 (print-function . ,Text_interface::print)
835 (meta . ((interfaces . (note-name-interface
836 text-interface font-interface item-interface ))))
841 (self-alignment-X . 0)
842 (break-visibility . ,begin-of-line-visible)
843 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
844 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
845 (print-function . ,Text_interface::print)
847 ;; no Y dimensions, because of lyrics under tenor clef.
849 (font-shape . italic)
851 (staff-padding . 0.2)
853 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
859 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
860 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
862 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
863 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
867 . ((slur-details . ,default-slur-details)
868 (print-function . ,Slur::print)
870 (spacing-procedure . ,Spanner::set_spacing_rods)
871 (minimum-length . 1.5)
872 (after-line-breaking-callback . ,Slur::after_line_breaking)
873 (Y-extent-callback . ,Slur::height)
876 (meta . ((interfaces . (slur-interface spanner-interface))))
879 (NonMusicalPaperColumn
882 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
883 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
885 ;; debugging stuff: print column number.
886 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
889 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
894 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
895 (print-function . ,Multi_measure_rest::percent)
898 (font-encoding . fetaMusic)
899 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
902 ;; an example of a text spanner
905 (print-function . ,Piano_pedal_bracket::print)
907 (bound-padding . 1.0)
909 (bracket-flare . (0.5 . 0.5))
910 (edge-height . (1.0 . 1.0))
911 (shorten-pair . (0.0 . 0.0))
913 (meta . ((interfaces . (line-interface
914 piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
918 (RemoveEmptyVerticalGroup
920 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
921 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
923 (meta . ((interfaces . (axis-group-interface
924 vertically-spaceable-interface hara-kiri-group-interface
925 item-interface spanner-interface))))
930 (print-function . ,Percent_repeat_item_interface::beat_slash)
933 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
937 (after-line-breaking-callback . ,Rest::after_line_breaking)
938 (X-extent-callback . ,Rest::extent_callback)
939 (Y-extent-callback . ,Rest::extent_callback)
940 (print-function . ,Rest::print)
941 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
942 ,Rest::polyphonic_offset_callback
944 (minimum-distance . 0.25)
945 (meta . ((interfaces . (font-interface
946 rhythmic-head-interface
947 rhythmic-grob-interface
948 staff-symbol-referencer-interface
949 rest-interface item-interface ))
954 (minimum-distance . 0.75)
955 (meta . ((interfaces . (rest-collision-interface item-interface ))))
960 ;; don't set direction here: it breaks staccato.
961 (print-function . ,Script_interface::print)
963 ;; This value is sensitive: if too large, staccato dots will move a
966 (staff-padding . 0.25)
967 ;; (script-priority . 0) priorities for scripts, see script.scm
968 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
969 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
970 (font-encoding . fetaMusic)
971 (meta . ((interfaces . (script-interface
972 side-position-interface font-interface item-interface ))))
977 (before-line-breaking-callback . ,Script_column::before_line_breaking)
978 (meta . ((interfaces . (script-column-interface item-interface ))))
982 . ((slur-details . ,default-slur-details)
983 (print-function . ,Slur::print)
985 (spacing-procedure . ,Spanner::set_spacing_rods)
986 (minimum-length . 1.5)
987 (after-line-breaking-callback . ,Slur::after_line_breaking)
988 (Y-extent-callback . ,Slur::height)
992 (meta . ((interfaces . (slur-interface spanner-interface))))
997 (spacing-procedure . ,Spacing_spanner::set_springs)
998 (grace-space-factor . 0.6)
999 (shortest-duration-space . 2.0)
1000 (spacing-increment . 1.2)
1001 (base-shortest-duration . ,(ly:make-moment 3 16))
1002 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
1007 (break-align-symbol . staff-bar)
1008 (bar-size-procedure . ,Span_bar::get_bar_size)
1009 (print-function . ,Span_bar::print)
1010 (X-extent-callback . ,Span_bar::width_callback)
1011 (Y-extent-callback . ())
1014 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
1018 ;; Ross. page 151 lists other values, we opt for a leaner look
1022 (hair-thickness . 1.6)
1023 (thick-thickness . 6.0)
1024 (meta . ((interfaces . (span-bar-interface font-interface
1025 bar-line-interface item-interface ))))
1029 . ((print-function . ,Text_interface::print)
1030 (font-series . bold)
1032 (X-offset-callbacks . (,Side_position_interface::aligned_side))
1034 (meta . ((interfaces . (side-position-interface
1035 stanza-number-interface text-interface font-interface item-interface ))))
1041 (stem-spacing-correction . 0.4)
1043 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
1048 (print-function . ,Text_interface::print)
1050 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1051 (no-spacing-rods . #t)
1052 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1053 (font-shape . italic)
1054 (self-alignment-X . 0)
1055 (meta . ((interfaces . (text-interface
1056 self-alignment-interface font-interface item-interface))))
1059 (SostenutoPedalLineSpanner
1062 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1063 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1067 (minimum-space . 1.0)
1069 (meta . ((interfaces . (piano-pedal-interface
1070 axis-group-interface side-position-interface spanner-interface))))
1075 (print-function . ,Staff_symbol::print)
1077 (ledger-line-thickness . (1.0 . 0.1))
1079 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1084 ;; this list is rather long. Trim --hwn
1085 (before-line-breaking-callback . ,Stem::before_line_breaking)
1086 (print-function . ,Stem::print)
1089 ;; 3.5 (or 3 measured from note head) is standard length
1090 ;; 32nd, 64th flagged stems should be longer
1091 (lengths . (3.5 3.5 3.5 4.5 5.0))
1093 ;; Stems in unnatural (forced) direction should be shortened by
1094 ;; one staff space, according to [Roush & Gourlay].
1095 ;; Flagged stems we shorten only half a staff space.
1096 (stem-shorten . (1.0 0.5))
1098 ;; default stem direction for note on middle line
1099 (neutral-direction . -1)
1103 ;; FIXME. 3.5 yields too long beams (according to Ross and
1104 ;; looking at Baerenreiter examples) for a number of common
1105 ;; boundary cases. Subtracting half a beam thickness fixes
1106 ;; this, but the bug may well be somewhere else.
1108 ;; FIXME this should come from 'lengths
1110 (beamed-lengths . (3.26 3.5 3.6))
1112 ;; We use the normal minima as minimum for the ideal lengths,
1113 ;; and the extreme minima as abolute minimum length.
1115 ;; The 'normal' minima
1116 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1117 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1119 ;; The 'extreme case' minima
1120 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1122 (X-offset-callbacks . (,Stem::offset_callback))
1123 (X-extent-callback . ,Stem::width_callback)
1124 (Y-extent-callback . ,Stem::height)
1125 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1126 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1131 (print-function . ,Stem_tremolo::print)
1132 (Y-extent-callback . ,Stem_tremolo::height)
1133 (X-extent-callback . #f)
1135 (beam-width . 1.6) ; staff-space
1136 (beam-thickness . 0.48) ; staff-space
1137 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1142 (X-extent-callback . #f)
1143 (Y-extent-callback . #f)
1144 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1147 (SeparatingGroupSpanner
1149 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1150 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1155 (no-spacing-rods . #t)
1156 (print-function . ,Sustain_pedal::print)
1157 (self-alignment-X . 0)
1159 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1160 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1161 (meta . ((interfaces . (piano-pedal-interface
1162 text-spanner-interface text-interface self-alignment-interface
1163 font-interface item-interface))))
1166 (SustainPedalLineSpanner
1169 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1170 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1173 (staff-padding . 1.2)
1174 (minimum-space . 1.0)
1176 (meta . ((interfaces . (piano-pedal-interface
1177 axis-group-interface side-position-interface spanner-interface))))
1183 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1184 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1185 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1191 (print-function . ,System_start_delimiter::print)
1192 (collapse-height . 5.0)
1193 (font-encoding . fetaBraces)
1194 (Y-extent-callback . #f)
1195 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1200 (Y-extent-callback . #f)
1201 (X-offset-callbacks . (,(lambda (g a) -0.8)))
1202 (print-function . ,System_start_delimiter::print)
1204 (collapse-height . 1)
1206 (meta . ((interfaces . (font-interface system-start-delimiter-interface
1207 spanner-interface))))
1212 (Y-extent-callback . #f)
1213 (print-function . ,System_start_delimiter::print)
1214 (glyph . "bar-line")
1216 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1217 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1222 (print-function . ,Text_interface::print)
1223 (no-spacing-rods . #t)
1224 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1227 ; sync with Fingering ?
1229 (staff-padding . 0.5)
1230 (script-priority . 200)
1231 ;; todo: add X self alignment?
1232 (meta . ((interfaces . (text-script-interface
1233 text-interface side-position-interface font-interface
1238 (print-function . ,Text_interface::print)
1239 (no-spacing-rods . #t)
1240 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1241 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1244 (staff-padding . 0.5)
1245 (script-priority . 200)
1246 ;; todo: add X self alignment?
1248 (font-series . bold)
1249 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1253 (print-function . ,Text_spanner::print)
1254 (font-shape . italic)
1255 (style . dashed-line)
1256 (staff-padding . 0.8)
1257 (dash-fraction . 0.2)
1260 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1264 (print-function . ,Dynamic_text_spanner::print)
1265 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1268 (staff-padding . 1.0)
1271 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1272 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1277 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1278 (print-function . ,Ottava_bracket::print)
1279 (font-shape . italic)
1280 (shorten-pair . (0.0 . -0.6))
1281 (staff-padding . 1.0)
1283 (minimum-length . 1.0)
1284 (dash-fraction . 0.3)
1285 (edge-height . (0 . 1.2))
1287 (meta . ((interfaces . (ottava-bracket-interface
1288 line-interface side-position-interface
1289 font-interface text-interface spanner-interface))))
1295 (print-function . ,Text_interface::print)
1296 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1297 (stem-attachment-function . ,tablature-stem-attachment-function)
1298 (font-series . bold)
1299 (meta . ((interfaces
1300 . (rhythmic-head-interface
1302 note-head-interface staff-symbol-referencer-interface
1303 text-interface item-interface ))))
1309 (print-function . ,Tie::print)
1310 (spacing-procedure . ,Spanner::set_spacing_rods)
1311 (staffline-clearance . 0.35)
1312 (details . ((ratio . 0.333) (height-limit . 1.0)))
1316 (minimum-length . 2.5)
1317 (meta . ((interfaces . (tie-interface spanner-interface))))
1322 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1323 (before-line-breaking-callback . ,Tie_column::before_line_breaking)
1324 (X-extent-callback . #f)
1325 (Y-extent-callback . #f)
1326 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1331 (print-function . ,Time_signature::print)
1332 ; (print-function . ,Text_interface::print)
1333 (break-align-symbol . time-signature)
1334 (break-visibility . ,all-visible)
1336 (first-note . (fixed-space . 2.0))
1337 (right-edge . (extra-space . 0.5))
1338 (staff-bar . (minimum-space . 2.0))
1342 ; (text . (,time-signature-glue-markup))
1343 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1350 (edge-height . (0.7 . 0.7))
1351 (shorten-pair . (-0.2 . -0.2))
1352 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1353 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1354 (print-function . ,Tuplet_bracket::print)
1355 (font-shape . italic)
1356 ; (font-series . bold)
1359 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1364 (print-function . ,Text_interface::print)
1365 (font-shape . italic)
1366 (no-spacing-rods . #t)
1367 (self-alignment-X . 0)
1369 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1370 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1371 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1374 (UnaCordaPedalLineSpanner
1377 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1378 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1380 (staff-padding . 1.2)
1381 (minimum-space . 1.0)
1383 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1390 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1391 (print-function . ,Vaticana_ligature::print)
1392 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1397 (print-function . ,Volta_bracket_interface::print)
1400 (font-encoding . fetaNumber)
1401 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1402 (thickness . 1.6) ;; linethickness
1403 (height . 2.0) ;; staffspace;
1406 (meta . ((interfaces . (volta-bracket-interface
1407 line-interface text-interface
1408 side-position-interface font-interface spanner-interface))))
1414 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1415 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1417 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1423 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1424 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1426 (meta . ((interfaces . (axis-group-interface
1427 vertically-spaceable-interface spanner-interface))))
1431 (define (completize-grob-entry x)
1432 "transplant assoc key into 'name entry of 'meta of X
1434 (let* ((name-sym (car x))
1435 (grob-entry (cdr x))
1436 (metaentry (cdr (assoc 'meta grob-entry)))
1438 (cdr (assoc 'interfaces metaentry)))
1441 (set! metaentry (assoc-set! metaentry 'name name-sym))
1442 (set! metaentry (assoc-set! metaentry 'interfaces
1443 (cons 'grob-interface ifaces-entry)))
1444 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1445 (cons name-sym grob-entry)))
1447 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1450 ;; (display (map pair? all-grob-descriptions))
1452 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1455 ;; (display (car x)) (newline)
1457 (set-object-property! (car x) 'translation-type? list?)
1458 (set-object-property! (car x) 'is-grob? #t))
1459 all-grob-descriptions)
1461 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))