1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2004 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) (meta . ((interfaces . (item-interface accidental-interface
27 . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
30 ;; this is quite small, but it is very ugly to have
31 ;; accs closer to the previous note than to the next one.
32 (right-padding . 0.15)
33 (meta . ((interfaces . (item-interface accidental-placement-interface))))
38 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
39 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
41 (clef . (extra-space . 0.5))
42 (key-signature . (extra-space . 0.0))
43 (staff-bar . (extra-space . 0.0))
44 (time-signature . (extra-space . 0.0))
45 (first-note . (fixed-space . 0.0))
48 (break-align-symbol . ambitus)
49 (break-visibility . ,begin-of-line-visible)
50 (meta . ((interfaces . (axis-group-interface break-aligned-interface ambitus-interface item-interface ))))
55 (print-function . ,Ambitus::print)
58 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
60 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
64 (print-function . ,Accidental_interface::print)
67 (X-offset-callbacks . (,Side_position_interface::aligned_side))
69 (cautionary-style . parentheses)
70 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface break-aligned-interface side-position-interface font-interface))))
77 (print-function . ,Note_head::print)
78 (glyph-name-procedure . ,find-notehead-symbol)
79 (X-extent-callback . ,Note_head::extent)
80 (Y-extent-callback . ,Note_head::extent)
81 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
82 (meta . ((interfaces . (font-interface note-head-interface
84 staff-symbol-referencer-interface
85 rhythmic-head-interface
92 (X-extent-callback . ,Arpeggio::width_callback)
93 (Y-extent-callback . #f)
94 (print-function . ,Arpeggio::print)
95 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
96 (X-offset-callbacks . (,Side_position_interface::aligned_side))
99 (staff-position . 0.0)
100 (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
105 (break-align-symbol . staff-bar)
107 (break-glyph-function . ,default-break-barline)
108 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
109 (print-function . ,Bar_line::print)
110 (break-visibility . ,all-visible)
112 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
114 (time-signature . (extra-space . 0.75))
115 (custos . (minimum-space . 2.0))
116 (clef . (minimum-space . 1.0))
117 (key-signature . (extra-space . 1.0))
118 (key-cancellation . (extra-space . 1.0))
119 (first-note . (fixed-space . 1.3))
120 (next-note . (semi-fixed-space . 1.3))
121 (right-edge . (extra-space . 0.0))
125 ;; Ross. page 151 lists other values, we opt for a leaner look
128 ;; kern should scale with linethickness too.
131 (hair-thickness . 1.9)
132 (thick-thickness . 6.0)
133 (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
139 (print-function . ,Text_interface::print)
141 (break-visibility . ,begin-of-line-visible)
144 (font-family . roman)
146 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
147 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
148 (self-alignment-X . 1)
150 ;; hmm. why did we do this: ?
151 (extra-offset . (1.3 . 0))
153 ((interfaces . (side-position-interface
155 self-alignment-interface
156 font-interface item-interface break-aligned-interface))))
162 (print-function . ,Text_interface::print)
163 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
165 (font-family . number)
167 ;; We must do this, other BFs in
168 ;; paper16 become too small.
171 (meta . ((interfaces . (text-interface rhythmic-grob-interface
172 bass-figure-interface item-interface
173 self-alignment-interface font-interface))))
177 ;; todo: clean this up a bit: the list is getting
179 (print-function . ,Beam::print)
181 (positions . (#f . #f))
182 (position-callbacks . (,Beam::least_squares
185 ,Beam::shift_region_to_valid
189 ;; TODO: should be in SLT.
190 (thickness . 0.48) ; in staff-space
191 (before-line-breaking-callback . ,Beam::before_line_breaking)
192 (after-line-breaking-callback . ,Beam::after_line_breaking)
193 (neutral-direction . -1)
194 (dir-function . ,beam-dir-majority-median)
196 ;; Whe have some unreferenced problems here.
198 ;; If we shorten beamed stems less than normal stems (1 staffspace),
199 ;; or high order less than 8th beams, patterns like
200 ;; c''4 [c''8 c''] c''4 [c''16 c]
201 ;; are ugly (different stem lengths).
203 ;; But if we shorten 16th beams as much as 8th beams, a single
204 ;; forced 16th beam looks *very* short.
206 ;; We choose to shorten 8th beams the same as single stems,
207 ;; and high order beams less than 8th beams, so that all
208 ;; isolated shortened beams look nice and a bit shortened,
209 ;; sadly possibly breaking patterns with high order beams.
210 (beamed-stem-shorten . (1.0 0.5 0.25))
212 (flag-width-function . ,beam-flag-width-function)
214 (auto-knee-gap . 5.5)
216 ;; only for debugging.
217 (font-family . roman)
219 (space-function . ,Beam::space_function)
220 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
227 (break-align-orders . #(; end-of-line:
229 left-edge ambitus breathing-sign
230 clef staff-bar key-cancellation key-signature
231 time-signature custos)
234 (instrument-name left-edge ambitus breathing-sign
235 clef staff-bar key-cancellation key-signature
237 time-signature custos)
239 (instrument-name left-edge ambitus breathing-sign
240 clef key-cancellation key-signature staff-bar
241 time-signature custos)
245 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
246 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
252 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
253 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
254 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
259 (break-align-symbol . breathing-sign)
262 (ambitus . (extra-space . 2.0))
263 (custos . (minimum-space . 1.0))
264 (key-signature . (minimum-space . 1.5))
265 (staff-bar . (minimum-space . 1.5))
266 (clef . (minimum-space . 2.0))
267 (first-note . (fixed-space . 1.0)) ;huh?
268 (right-edge . (extra-space . 0.1))
270 (print-function . ,Text_interface::print)
271 (text . ,(make-musicglyph-markup "scripts-rcomma"))
272 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
273 (break-visibility . ,begin-of-line-invisible)
274 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
279 (print-function . ,Clef::print)
280 (before-line-breaking-callback . ,Clef::before_line_breaking)
282 (font-family . music)
283 (break-align-symbol . clef)
284 (break-visibility . ,begin-of-line-visible)
285 (space-alist . ((ambitus . (extra-space . 2.0))
286 (staff-bar . (extra-space . 0.7))
287 (key-cancellation . (minimum-space . 4.0))
288 (key-signature . (minimum-space . 4.0))
289 (time-signature . (minimum-space . 4.2))
290 (first-note . (minimum-fixed-space . 5.0))
291 (next-note . (extra-space . 0.5))
292 (right-edge . (extra-space . 0.5))
294 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
295 (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
298 (ClusterSpannerBeacon
300 (print-function . #f)
301 (Y-extent-callback . ,Cluster_beacon::height)
302 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
307 (print-function . ,Cluster::print)
308 (spacing-procedure . ,Spanner::set_spacing_rods)
309 (minimum-length . 0.0)
312 (meta . ((interfaces . (cluster-interface spanner-interface))))
317 (print-function . ,Text_interface::print)
318 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
322 (meta . ((interfaces . (font-interface rhythmic-grob-interface
323 text-interface chord-name-interface item-interface ))))
328 (break-align-symbol . custos)
330 (print-function . ,Custos::print)
331 (break-visibility . ,end-of-line-visible)
333 (neutral-direction . -1)
334 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
336 (first-note . (minimum-fixed-space . 0.0))
337 (right-edge . (extra-space . 0.1))
340 . (custos-interface staff-symbol-referencer-interface
342 break-aligned-interface item-interface ))))
350 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
351 (X-offset-callbacks . (,Dot_column::side_position))
352 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
357 (print-function . ,Dots::print)
359 (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
364 (print-function . ,Percent_repeat_item_interface::double_percent)
367 (font-encoding . fetaMusic)
370 (break-align-symbol . staff-bar)
371 (break-visibility . ,begin-of-line-invisible)
372 (meta . ((interfaces . (font-interface
373 break-aligned-interface
374 percent-repeat-interface item-interface ))))
378 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
379 (print-function . ,Text_interface::print)
380 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
381 ,Self_alignment_interface::centered_on_parent))
382 (self-alignment-X . 0)
383 (no-spacing-rods . #t)
384 (script-priority . 100)
386 (font-encoding . fetaDynamic)
387 (font-shape . italic)
388 (self-alignment-Y . 0)
389 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
390 dynamic-interface script-interface item-interface))))
393 . ((print-function . ,Dynamic_text_spanner::print)
395 (font-shape . italic)
396 (style . dashed-line)
398 ; need to blend with dynamic texts.
400 (bound-padding . 0.75)
401 (dash-fraction . 0.2)
403 (meta . ((interfaces . (font-interface
405 dynamic-interface dynamic-text-spanner-interface
412 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
413 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
414 (staff-padding . 0.1)
416 (minimum-space . 1.2)
419 (meta . ((interfaces . (dynamic-interface axis-group-interface
420 side-position-interface spanner-interface)))) ))
424 (break-align-symbol . left-edge)
428 (custos . (extra-space . 0.0))
429 (ambitus . (extra-space . 2.0))
430 (time-signature . (extra-space . 0.0))
431 (staff-bar . (extra-space . 0.0))
432 (breathing-sign . (minimum-space . 0.0))
433 (clef . (extra-space . 0.85))
434 (first-note . (fixed-space . 1.0))
435 (right-edge . (extra-space . 0.0))
436 (key-signature . (extra-space . 0.0))
437 (key-cancellation . (extra-space . 0.0))
440 (meta . ((interfaces . (break-aligned-interface item-interface ))))
445 (print-function . ,Text_interface::print)
447 ; sync with TextScript (?)
449 (staff-padding . 0.5)
450 (self-alignment-X . 0)
451 (self-alignment-Y . 0)
452 (script-priority . 100)
453 (font-encoding . fetaNumber)
454 (font-size . -5) ; don't overlap when next to heads.
455 (meta . ((interfaces . (finger-interface
456 font-interface text-script-interface text-interface
457 side-position-interface self-alignment-interface
465 (zigzag-width . 0.75)
467 (X-extent-callback . #f)
468 (Y-extent-callback . #f)
469 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
470 (print-function . ,Line_spanner::print)
471 (meta . ((interfaces . (line-spanner-interface spanner-interface))))
476 (print-function . ,Hairpin::print)
479 (spacing-procedure . ,Spanner::set_spacing_rods)
480 (minimum-length . 2.0)
481 (bound-padding . 1.0)
482 (self-alignment-Y . 0)
483 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
484 (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
490 (print-function . ,Horizontal_bracket::print)
491 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
494 (bracket-flare . (0.5 . 0.5))
495 (meta . ((interfaces . (horizontal-bracket-interface
496 side-position-interface
498 spanner-interface))))
503 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
504 ,Side_position_interface::aligned_on_support_refpoints))
505 ;; This direction is for aligned_on_support_refpoints
509 (left-edge . (extra-space . 1.0))
512 (self-alignment-Y . 0)
513 (print-function . ,Text_interface::print)
514 (break-align-symbol . instrument-name)
515 (break-visibility . ,begin-of-line-visible)
517 (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
523 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
525 (space-alist . ((left-edge . (extra-space . 1.0))
527 (break-align-symbol . instrument-name)
528 (print-function . ,Text_interface::print)
529 (break-align-symbol . clef)
530 (break-visibility . ,begin-of-line-visible)
532 (meta . ((interfaces . (font-interface
533 self-alignment-interface
534 side-position-interface text-interface
535 break-aligned-interface item-interface ))))
539 (print-function . ,Key_signature_interface::print)
541 (time-signature . (extra-space . 1.25))
542 (staff-bar . (extra-space . 0.6))
543 (key-signature . (extra-space . 0.5))
544 (right-edge . (extra-space . 0.5))
545 (first-note . (fixed-space . 2.5))
547 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
548 (break-align-symbol . key-cancellation)
549 (break-visibility . ,begin-of-line-invisible)
552 (meta . ((interfaces . (key-signature-interface font-interface
553 break-aligned-interface item-interface ))))
557 (print-function . ,Key_signature_interface::print)
559 (time-signature . (extra-space . 1.25))
560 (staff-bar . (extra-space . 1.1))
561 (right-edge . (extra-space . 0.5))
562 (first-note . (fixed-space . 2.5))
564 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
565 (break-align-symbol . key-signature)
566 (break-visibility . ,begin-of-line-visible)
569 (meta . ((interfaces . (key-signature-interface font-interface
570 break-aligned-interface item-interface ))))
574 (print-function . ,Ledger_line_spanner::print)
575 (X-extent-callback . #f)
576 (Y-extent-callback . #f)
577 (print-function . ,Ledger_line_spanner::print)
578 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
583 (ligature-primitive-callback . ,Note_head::print)
588 (edge-height . (0.7 . 0.7))
589 (shorten-pair . (-0.2 . -0.2))
590 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
591 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
592 (print-function . ,Tuplet_bracket::print)
593 (meta . ((interfaces . (tuplet-bracket-interface spanner-interface))))
602 (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
603 (print-function . ,Hyphen_spanner::print)
605 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
606 spanner-interface))))
611 (print-function . ,Lyric_extender::print)
612 (thickness . 0.8) ; linethickness
613 (minimum-length . 1.5)
615 (meta . ((interfaces . (lyric-interface
616 lyric-extender-interface spanner-interface))))
620 . ((print-function . ,Text_interface::print)
621 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
622 (self-alignment-X . 0)
624 (font-series . bold-narrow)
626 (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
633 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
634 (print-function . ,Mensural_ligature::print)
635 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
640 (print-function . ,Text_interface::print)
641 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
642 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
643 (after-line-breaking-callback . ,shift-right-at-line-begin)
644 (self-alignment-X . 0)
649 (break-visibility . ,end-of-line-invisible)
651 (meta . ((interfaces . (text-interface
652 side-position-interface font-interface mark-interface
653 self-alignment-interface item-interface ))))
657 (print-function . ,Text_interface::print)
658 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
661 (meta . ((interfaces . (text-interface
662 side-position-interface font-interface
663 metronome-mark-interface item-interface))))
667 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
668 (print-function . ,Measure_grouping::print)
674 (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
678 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
679 (print-function . ,Multi_measure_rest::print)
680 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
683 (thick-thickness . 6.6)
684 (hair-thickness . 2.0)
686 (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
689 (MultiMeasureRestNumber
691 (print-function . ,Text_interface::print)
692 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
693 ,Self_alignment_interface::centered_on_other_axis_parent))
694 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
695 (self-alignment-X . 0)
698 (staff-padding . 0.4)
699 (font-encoding . fetaNumber)
700 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
702 (MultiMeasureRestText
704 (print-function . ,Text_interface::print)
705 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
706 ,Self_alignment_interface::centered_on_other_axis_parent))
707 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
708 (self-alignment-X . 0)
711 (staff-padding . 0.25)
712 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
717 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
718 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
719 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
725 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
726 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
727 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
733 (print-function . ,Note_head::print)
734 (ligature-primitive-callback . ,Note_head::print)
735 (glyph-name-procedure . ,find-notehead-symbol)
736 (X-extent-callback . ,Note_head::extent)
737 (Y-extent-callback . ,Note_head::extent)
738 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
739 (stem-attachment-function . ,note-head-style->attachment-coordinates)
740 (meta . ((interfaces . (rhythmic-grob-interface
741 rhythmic-head-interface font-interface note-head-interface
743 staff-symbol-referencer-interface item-interface ))))
748 (stem-spacing-correction . 0.5)
750 ;; Changed this from 0.75.
751 ;; If you ever change this back, please document! --hwn
752 (knee-spacing-correction . 1.0)
754 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
762 (X-extent-callback . #f)
763 (Y-extent-callback . #f)
764 (print-function . ,Line_spanner::print)
765 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
766 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
771 (print-function . ,Text_interface::print)
772 (meta . ((interfaces . (note-name-interface
773 text-interface font-interface item-interface ))))
778 (self-alignment-X . 0)
779 (break-visibility . ,begin-of-line-visible)
780 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
781 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
782 (print-function . ,Text_interface::print)
784 ;; no Y dimensions, because of lyrics under tenor clef.
786 (font-shape . italic)
788 (staff-padding . 0.2)
790 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
796 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
797 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
799 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
800 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
804 . ((slur-details . ,default-slur-details)
805 (print-function . ,Slur::print)
807 (spacing-procedure . ,Spanner::set_spacing_rods)
808 (minimum-length . 1.5)
809 (after-line-breaking-callback . ,Slur::after_line_breaking)
810 (Y-extent-callback . ,Slur::height)
813 (meta . ((interfaces . (slur-interface spanner-interface))))
816 (NonMusicalPaperColumn
819 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
820 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
822 ;; debugging stuff: print column number.
823 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
826 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
831 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
832 (print-function . ,Multi_measure_rest::percent)
835 (font-encoding . fetaMusic)
836 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
839 (PianoPedalBracket ;; an example of a text spanner
841 (print-function . ,Piano_pedal_bracket::print)
843 (bound-padding . 1.0)
845 (bracket-flare . (0.5 . 0.5))
846 (edge-height . (1.0 . 1.0))
847 (shorten-pair . (0.0 . 0.0))
849 (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
853 (RemoveEmptyVerticalGroup
855 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
856 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
859 (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface spanner-interface))))
864 (print-function . ,Percent_repeat_item_interface::beat_slash)
867 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
871 (after-line-breaking-callback . ,Rest::after_line_breaking)
872 (X-extent-callback . ,Rest::extent_callback)
873 (Y-extent-callback . ,Rest::extent_callback)
874 (print-function . ,Rest::print)
875 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
876 ,Rest::polyphonic_offset_callback
878 (minimum-distance . 0.25)
880 (interfaces . (font-interface
881 rhythmic-head-interface
882 rhythmic-grob-interface
883 staff-symbol-referencer-interface
884 rest-interface item-interface ))
889 (minimum-distance . 0.75)
890 (meta . ((interfaces . (rest-collision-interface item-interface ))))
895 ;; don't set direction here: it breaks staccato.
896 (print-function . ,Script_interface::print)
898 ;; This value is sensitive: if too large, staccato dots will move a
901 (staff-padding . 0.25)
902 ;; (script-priority . 0) priorities for scripts, see script.scm
903 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
904 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
905 (font-encoding . fetaMusic)
906 (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
911 (before-line-breaking-callback . ,Script_column::before_line_breaking)
912 (meta . ((interfaces . (script-column-interface item-interface ))))
916 . ((slur-details . ,default-slur-details)
917 (print-function . ,Slur::print)
919 (spacing-procedure . ,Spanner::set_spacing_rods)
920 (minimum-length . 1.5)
921 (after-line-breaking-callback . ,Slur::after_line_breaking)
922 (Y-extent-callback . ,Slur::height)
926 (meta . ((interfaces . (slur-interface spanner-interface))))
931 (spacing-procedure . ,Spacing_spanner::set_springs)
932 (grace-space-factor . 0.6)
933 (shortest-duration-space . 2.0)
934 (spacing-increment . 1.2)
935 (base-shortest-duration . ,(ly:make-moment 3 16))
936 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
941 (break-align-symbol . staff-bar)
942 (bar-size-procedure . ,Span_bar::get_bar_size)
943 (print-function . ,Span_bar::print)
944 (X-extent-callback . ,Span_bar::width_callback)
945 (Y-extent-callback . ())
947 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
951 ;; Ross. page 151 lists other values, we opt for a leaner look
955 (hair-thickness . 1.6)
956 (thick-thickness . 6.0)
957 (meta . ((interfaces . (span-bar-interface font-interface
958 bar-line-interface item-interface ))))
962 . ((print-function . ,Text_interface::print)
965 (X-offset-callbacks . (,Side_position_interface::aligned_side))
967 (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))
973 (stem-spacing-correction . 0.4)
975 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
980 (print-function . ,Text_interface::print)
982 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
983 (no-spacing-rods . #t)
984 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
985 (font-shape . italic)
986 (self-alignment-X . 0)
987 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
990 (SostenutoPedalLineSpanner
993 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
994 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
998 (minimum-space . 1.0)
1000 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1005 (print-function . ,Staff_symbol::print)
1007 (ledger-line-thickness . (1.0 . 0.1))
1009 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1014 ;; this list is rather long. Trim --hwn
1015 (before-line-breaking-callback . ,Stem::before_line_breaking)
1016 (print-function . ,Stem::print)
1019 ;; 3.5 (or 3 measured from note head) is standard length
1020 ;; 32nd, 64th flagged stems should be longer
1021 (lengths . (3.5 3.5 3.5 4.5 5.0))
1023 ;; Stems in unnatural (forced) direction should be shortened by
1024 ;; one staff space, according to [Roush & Gourlay].
1025 ;; Flagged stems we shorten only half a staff space.
1026 (stem-shorten . (1.0 0.5))
1028 ;; default stem direction for note on middle line
1029 (neutral-direction . -1)
1033 ;; FIXME. 3.5 yields too long beams (according to Ross and
1034 ;; looking at Baerenreiter examples) for a number of common
1035 ;; boundary cases. Subtracting half a beam thickness fixes
1036 ;; this, but the bug may well be somewhere else.
1038 ;; FIXME this should come from 'lengths
1040 (beamed-lengths . (3.26 3.5 3.6))
1042 ;; We use the normal minima as minimum for the ideal lengths,
1043 ;; and the extreme minima as abolute minimum length.
1045 ;; The 'normal' minima
1046 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1047 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1049 ;; The 'extreme case' minima
1050 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1052 (X-offset-callbacks . (,Stem::off_callback))
1053 (X-extent-callback . ,Stem::dim_callback)
1054 (Y-extent-callback . ,Stem::height)
1055 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1056 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1061 (print-function . ,Stem_tremolo::print)
1062 (Y-extent-callback . ,Stem_tremolo::height)
1063 (X-extent-callback . #f)
1065 (beam-width . 1.6) ; staff-space
1066 (beam-thickness . 0.48) ; staff-space
1067 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1072 (X-extent-callback . #f)
1073 (Y-extent-callback . #f)
1074 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1077 (SeparatingGroupSpanner
1079 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1080 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1085 (no-spacing-rods . #t)
1086 (print-function . ,Sustain_pedal::print)
1087 (self-alignment-X . 0)
1089 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1090 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1091 (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
1094 (SustainPedalLineSpanner
1097 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1098 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1101 (staff-padding . 1.2)
1102 (minimum-space . 1.0)
1104 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1110 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1111 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1112 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1118 (print-function . ,System_start_delimiter::print)
1119 (collapse-height . 5.0)
1120 (font-encoding . fetaBraces)
1121 (Y-extent-callback . #f)
1122 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1127 (Y-extent-callback . #f)
1128 (print-function . ,System_start_delimiter::print)
1134 (collapse-height . 1)
1136 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1141 (Y-extent-callback . #f)
1142 (print-function . ,System_start_delimiter::print)
1143 (glyph . "bar-line")
1145 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1146 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1151 (print-function . ,Text_interface::print)
1152 (no-spacing-rods . #t)
1153 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1156 ; sync with Fingering ?
1158 (staff-padding . 0.5)
1159 (script-priority . 200)
1160 ;; todo: add X self alignment?
1161 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1165 (print-function . ,Text_interface::print)
1166 (no-spacing-rods . #t)
1167 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1168 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1170 (extra-offset . (-1 . 0))
1172 (staff-padding . 0.5)
1173 (script-priority . 200)
1174 ;; todo: add X self alignment?
1176 (font-series . bold)
1177 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1181 (print-function . ,Text_spanner::print)
1182 (font-shape . italic)
1183 (style . dashed-line)
1184 (staff-padding . 0.1)
1185 (dash-fraction . 0.2)
1188 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1192 (print-function . ,Dynamic_text_spanner::print)
1193 (edge-text . ,(cons (make-musicglyph-markup "scripts-trill")
1196 (staff-padding . 1.0)
1199 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1200 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1205 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1206 (print-function . ,Ottava_bracket::print)
1207 (font-shape . italic)
1208 (shorten-pair . (0.0 . -0.6))
1209 (staff-padding . 1.0)
1211 (minimum-length . 1.0)
1212 (dash-fraction . 0.3)
1213 (edge-height . (0 . 1.2))
1215 (meta . ((interfaces . (ottava-bracket-interface
1216 line-interface side-position-interface
1217 font-interface text-interface spanner-interface))))
1223 (print-function . ,Text_interface::print)
1224 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1225 (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
1226 (stem-attachment-function . ,tablature-stem-attachment-function)
1227 (meta . ((interfaces
1228 . (rhythmic-head-interface
1230 note-head-interface staff-symbol-referencer-interface
1231 text-interface item-interface ))))
1237 (print-function . ,Tie::print)
1238 (spacing-procedure . ,Spanner::set_spacing_rods)
1239 (staffline-clearance . 0.35)
1240 (details . ((ratio . 0.333) (height-limit . 1.0)))
1244 (minimum-length . 2.5)
1245 (meta . ((interfaces . (tie-interface spanner-interface))))
1250 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1251 (X-extent-callback . #f)
1252 (Y-extent-callback . #f)
1253 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1258 (print-function . ,Time_signature::print)
1259 ; (print-function . ,Text_interface::print)
1260 (break-align-symbol . time-signature)
1261 (break-visibility . ,all-visible)
1263 (first-note . (fixed-space . 2.0))
1264 (right-edge . (extra-space . 0.5))
1265 (staff-bar . (minimum-space . 2.0))
1269 ; (text . (,time-signature-glue-markup))
1270 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1277 (edge-height . (0.7 . 0.7))
1278 (shorten-pair . (-0.2 . -0.2))
1279 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1280 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1281 (print-function . ,Tuplet_bracket::print)
1282 (font-shape . italic)
1283 (font-series . bold)
1286 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1291 (print-function . ,Text_interface::print)
1292 (font-shape . italic)
1293 (no-spacing-rods . #t)
1294 (self-alignment-X . 0)
1296 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1297 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1298 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1301 (UnaCordaPedalLineSpanner
1304 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1305 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1307 (staff-padding . 1.2)
1308 (minimum-space . 1.0)
1310 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1317 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1318 (print-function . ,Vaticana_ligature::print)
1319 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1324 (print-function . ,Volta_bracket_interface::print)
1327 (font-encoding . fetaNumber)
1328 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1329 (thickness . 1.6) ; linethickness
1330 (height . 2.0) ; staffspace;
1333 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1339 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1340 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1342 ; (threshold . (6 . 1000))
1343 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1349 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1350 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1352 (meta . ((interfaces . (axis-group-interface spanner-interface))))
1360 (define (completize-grob-entry x)
1361 "transplant assoc key into 'name entry of 'meta of X
1363 (let* ((name-sym (car x))
1364 (grob-entry (cdr x))
1365 (metaentry (cdr (assoc 'meta grob-entry)))
1367 (cdr (assoc 'interfaces metaentry)))
1370 (set! metaentry (assoc-set! metaentry 'name name-sym))
1371 (set! metaentry (assoc-set! metaentry 'interfaces
1372 (cons 'grob-interface ifaces-entry)))
1373 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1374 (cons name-sym grob-entry)))
1376 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1380 ; (display (map pair? all-grob-descriptions))
1383 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1386 ; (display (car x)) (newline)
1388 (set-object-property! (car x) 'translation-type? list?)
1389 (set-object-property! (car x) 'is-grob? #t))
1390 all-grob-descriptions)
1393 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))