1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;;; distances are given in linethickness (thicknesses) and
9 ;;;; staffspace (distances)
11 ;;;; WARNING: the meta field should be the last one.
12 ;;;; WARNING: don't use anonymous functions for initialization.
14 ;; TODO: junk the meta field in favor of something more compact?
16 ;;; todo:: reorder sensibly.
18 (define-public all-grob-descriptions
22 (print-function . ,Accidental_interface::print)
24 (cautionary-style . parentheses)
25 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)
26 (meta . ((interfaces . (item-interface accidental-interface
31 . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
34 ;; this is quite small, but it is very ugly to have
35 ;; accs closer to the previous note than to the next one.
36 (right-padding . 0.15)
37 (meta . ((interfaces . (item-interface accidental-placement-interface))))
42 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
43 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
45 (clef . (extra-space . 0.5))
46 (key-signature . (extra-space . 0.0))
47 (staff-bar . (extra-space . 0.0))
48 (time-signature . (extra-space . 0.0))
49 (first-note . (fixed-space . 0.0))
52 (break-align-symbol . ambitus)
53 (break-visibility . ,begin-of-line-visible)
54 (meta . ((interfaces . (axis-group-interface
55 break-aligned-interface ambitus-interface item-interface))))
60 (print-function . ,Ambitus::print)
63 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
65 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
69 (print-function . ,Accidental_interface::print)
72 (X-offset-callbacks . (,Side_position_interface::aligned_side))
74 (cautionary-style . parentheses)
75 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)
76 (meta . ((interfaces . (item-interface
77 accidental-interface break-aligned-interface
78 side-position-interface font-interface))))
84 (print-function . ,Note_head::print)
85 (glyph-name-procedure . ,find-notehead-symbol)
86 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
87 (meta . ((interfaces . (font-interface note-head-interface
89 staff-symbol-referencer-interface
90 rhythmic-head-interface
97 (X-extent-callback . ,Arpeggio::width_callback)
98 (print-function . ,Arpeggio::print)
99 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
100 (X-offset-callbacks . (,Side_position_interface::aligned_side))
103 (staff-position . 0.0)
104 (meta . ((interfaces . (arpeggio-interface
105 staff-symbol-referencer-interface side-position-interface
106 item-interface font-interface))))
111 (break-align-symbol . staff-bar)
113 (break-glyph-function . ,default-break-barline)
115 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
116 (print-function . ,Bar_line::print)
117 (break-visibility . ,all-visible)
119 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
121 (time-signature . (extra-space . 0.75))
122 (custos . (minimum-space . 2.0))
123 (clef . (minimum-space . 1.0))
124 (key-signature . (extra-space . 1.0))
125 (key-cancellation . (extra-space . 1.0))
126 (first-note . (fixed-space . 1.3))
127 (next-note . (semi-fixed-space . 1.3))
128 (right-edge . (extra-space . 0.0))
132 ;; Ross. page 151 lists other values, we opt for a leaner look
135 ;; kern should scale with linethickness too.
138 (hair-thickness . 1.9)
139 (thick-thickness . 6.0)
140 (meta . ((interfaces . (bar-line-interface
141 item-interface break-aligned-interface font-interface))))
147 (print-function . ,Text_interface::print)
149 (break-visibility . ,begin-of-line-visible)
152 (font-family . roman)
154 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
155 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
156 (self-alignment-X . 1)
159 ((interfaces . (side-position-interface
161 self-alignment-interface
162 font-interface item-interface break-aligned-interface))))
168 (print-function . ,Text_interface::print)
169 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
171 (font-family . number)
173 ;; We must do this, other BFs in
174 ;; layout16 become too small.
177 (meta . ((interfaces . (text-interface
178 rhythmic-grob-interface bass-figure-interface item-interface
179 self-alignment-interface font-interface))))
183 ;; todo: clean this up a bit: the list is getting
185 (print-function . ,Beam::print)
187 (positions . (#f . #f))
188 (position-callbacks . (,Beam::least_squares
191 ,Beam::shift_region_to_valid
195 ;; TODO: should be in SLT.
196 (thickness . 0.48) ; in staff-space
197 (before-line-breaking-callback . ,Beam::before_line_breaking)
198 (after-line-breaking-callback . ,Beam::after_line_breaking)
199 (neutral-direction . -1)
200 (dir-function . ,beam-dir-majority-median)
202 ;; Whe have some unreferenced problems here.
204 ;; If we shorten beamed stems less than normal stems (1 staffspace),
205 ;; or high order less than 8th beams, patterns like
206 ;; c''4 [c''8 c''] c''4 [c''16 c]
207 ;; are ugly (different stem lengths).
209 ;; But if we shorten 16th beams as much as 8th beams, a single
210 ;; forced 16th beam looks *very* short.
212 ;; We choose to shorten 8th beams the same as single stems,
213 ;; and high order beams less than 8th beams, so that all
214 ;; isolated shortened beams look nice and a bit shortened,
215 ;; sadly possibly breaking patterns with high order beams.
216 (beamed-stem-shorten . (1.0 0.5 0.25))
218 (flag-width-function . ,beam-flag-width-function)
220 (auto-knee-gap . 5.5)
222 ;; only for debugging.
223 (font-family . roman)
225 (space-function . ,Beam::space_function)
226 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
233 (break-align-orders . #(; end-of-line:
235 left-edge ambitus breathing-sign
236 clef staff-bar key-cancellation key-signature
237 time-signature custos)
240 (instrument-name left-edge ambitus breathing-sign
241 clef staff-bar key-cancellation key-signature
243 time-signature custos)
245 (instrument-name left-edge ambitus breathing-sign
246 clef key-cancellation key-signature staff-bar
247 time-signature custos)
251 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
252 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
258 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
259 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
260 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
265 (break-align-symbol . breathing-sign)
268 (ambitus . (extra-space . 2.0))
269 (custos . (minimum-space . 1.0))
270 (key-signature . (minimum-space . 1.5))
271 (staff-bar . (minimum-space . 1.5))
272 (clef . (minimum-space . 2.0))
273 (first-note . (fixed-space . 1.0)) ;huh?
274 (right-edge . (extra-space . 0.1))
276 (print-function . ,Text_interface::print)
277 (text . ,(make-musicglyph-markup "scripts.rcomma"))
278 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
279 (break-visibility . ,begin-of-line-invisible)
280 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
285 (print-function . ,Clef::print)
286 (before-line-breaking-callback . ,Clef::before_line_breaking)
288 (font-family . music)
289 (break-align-symbol . clef)
290 (break-visibility . ,begin-of-line-visible)
291 (space-alist . ((ambitus . (extra-space . 2.0))
292 (staff-bar . (extra-space . 0.7))
293 (key-cancellation . (minimum-space . 4.0))
294 (key-signature . (minimum-space . 4.0))
295 (time-signature . (minimum-space . 4.2))
296 (first-note . (minimum-fixed-space . 5.0))
297 (next-note . (extra-space . 0.5))
298 (right-edge . (extra-space . 0.5))
300 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
301 (meta . ((interfaces . (clef-interface
302 staff-symbol-referencer-interface font-interface
303 break-aligned-interface item-interface ))))
306 (ClusterSpannerBeacon
308 (print-function . #f)
309 (Y-extent-callback . ,Cluster_beacon::height)
310 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
315 (print-function . ,Cluster::print)
316 (spacing-procedure . ,Spanner::set_spacing_rods)
317 (minimum-length . 0.0)
320 (meta . ((interfaces . (cluster-interface spanner-interface))))
326 (print-function . ,Text_interface::print)
327 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
331 (meta . ((interfaces . (font-interface
332 rhythmic-grob-interface text-interface chord-name-interface
338 (print-function . ,Text_interface::print)
339 (no-spacing-rods . #t)
340 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
341 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
344 (staff-padding . 0.5)
345 (script-priority . 200)
346 ;; todo: add X self alignment?
349 (meta . ((interfaces . (text-script-interface
350 text-interface side-position-interface
351 font-interface item-interface ))))
356 (break-align-symbol . custos)
358 (print-function . ,Custos::print)
359 (break-visibility . ,end-of-line-visible)
361 (neutral-direction . -1)
362 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
364 (first-note . (minimum-fixed-space . 0.0))
365 (right-edge . (extra-space . 0.1))
368 . (custos-interface staff-symbol-referencer-interface
370 break-aligned-interface item-interface ))))
377 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
378 (X-offset-callbacks . (,Dot_column::side_position))
379 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
384 (print-function . ,Dots::print)
386 (meta . ((interfaces . (font-interface
387 staff-symbol-referencer-interface dots-interface item-interface ))))
392 (print-function . ,Percent_repeat_item_interface::double_percent)
395 (font-encoding . fetaMusic)
398 (break-align-symbol . staff-bar)
399 (break-visibility . ,begin-of-line-invisible)
400 (meta . ((interfaces . (font-interface
401 break-aligned-interface
402 percent-repeat-interface item-interface ))))
406 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
407 (print-function . ,Text_interface::print)
408 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
409 (self-alignment-X . 0)
410 (no-spacing-rods . #t)
411 (script-priority . 100)
413 (font-encoding . fetaDynamic)
414 (font-shape . italic)
415 (self-alignment-Y . 0)
416 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
417 dynamic-interface script-interface item-interface))))
420 . ((print-function . ,Dynamic_text_spanner::print)
422 ;; rather ugh with NCSB
423 ; (font-series . bold)
424 (font-shape . italic)
425 (style . dashed-line)
427 ; need to blend with dynamic texts.
429 (bound-padding . 0.75)
430 (dash-fraction . 0.2)
432 (meta . ((interfaces . (font-interface
434 dynamic-interface dynamic-text-spanner-interface
441 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
442 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
443 (staff-padding . 0.1)
445 (minimum-space . 1.2)
448 (meta . ((interfaces . (dynamic-interface axis-group-interface
449 side-position-interface spanner-interface))))))
453 (print-function . ,Text_interface::print)
455 ; sync with TextScript (?)
457 (staff-padding . 0.5)
458 (self-alignment-X . 0)
459 (self-alignment-Y . 0)
460 (script-priority . 100)
461 (font-encoding . fetaNumber)
462 (font-size . -5) ; don't overlap when next to heads.
463 (meta . ((interfaces . (finger-interface
464 font-interface text-script-interface text-interface
465 side-position-interface self-alignment-interface
472 (zigzag-width . 0.75)
474 (X-extent-callback . #f)
475 (Y-extent-callback . #f)
476 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
477 (print-function . ,Line_spanner::print)
478 (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
485 (meta . ((interfaces . (grid-point-interface))))
490 (print-function . ,Grid_line_interface::print)
491 (X-extent-callback . ,Grid_line_interface::width_callback)
492 (self-alignment-X . ,CENTER)
493 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
494 ,Self_alignment_interface::centered_on_parent))
496 (meta . ((interfaces . (self-alignment-interface grid-line-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))
521 (staff-padding . 0.2)
523 (bracket-flare . (0.5 . 0.5))
524 (meta . ((interfaces . (horizontal-bracket-interface
525 side-position-interface
527 spanner-interface))))
532 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
533 ,Side_position_interface::aligned_on_support_refpoints))
534 ;; This direction is for aligned_on_support_refpoints
538 (left-edge . (extra-space . 1.0))
541 (self-alignment-Y . 0)
542 (print-function . ,Text_interface::print)
543 (break-align-symbol . instrument-name)
544 (break-visibility . ,begin-of-line-visible)
546 (meta . ((interfaces . (font-interface
547 self-alignment-interface side-position-interface text-interface
548 break-aligned-interface item-interface ))))
553 (print-function . ,Key_signature_interface::print)
555 (time-signature . (extra-space . 1.25))
556 (staff-bar . (extra-space . 0.6))
557 (key-signature . (extra-space . 0.5))
558 (right-edge . (extra-space . 0.5))
559 (first-note . (fixed-space . 2.5))
561 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
562 (break-align-symbol . key-cancellation)
563 (break-visibility . ,begin-of-line-invisible)
566 (meta . ((interfaces . (key-signature-interface font-interface
567 break-aligned-interface item-interface ))))
571 (print-function . ,Key_signature_interface::print)
573 (time-signature . (extra-space . 1.25))
574 (staff-bar . (extra-space . 1.1))
575 (right-edge . (extra-space . 0.5))
576 (first-note . (fixed-space . 2.5))
578 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
579 (break-align-symbol . key-signature)
580 (break-visibility . ,begin-of-line-visible)
583 (meta . ((interfaces . (key-signature-interface font-interface
584 break-aligned-interface item-interface ))))
588 (print-function . ,Ledger_line_spanner::print)
589 (X-extent-callback . #f)
590 (Y-extent-callback . #f)
591 (minimum-length-fraction . 0.25)
592 (length-fraction . 0.25)
593 (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
594 (print-function . ,Ledger_line_spanner::print)
596 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
601 (break-align-symbol . left-edge)
604 (break-visibility . ,center-invisible)
606 (custos . (extra-space . 0.0))
607 (ambitus . (extra-space . 2.0))
608 (time-signature . (extra-space . 0.0))
609 (staff-bar . (extra-space . 0.0))
610 (breathing-sign . (minimum-space . 0.0))
611 (clef . (extra-space . 0.8))
612 (first-note . (fixed-space . 1.0))
613 (right-edge . (extra-space . 0.0))
614 (key-signature . (extra-space . 0.0))
615 (key-cancellation . (extra-space . 0.0))
618 (meta . ((interfaces . (break-aligned-interface item-interface ))))
623 (ligature-primitive-callback . ,Note_head::print)
628 (edge-height . (0.7 . 0.7))
629 (shorten-pair . (-0.2 . -0.2))
630 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
631 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
632 (print-function . ,Tuplet_bracket::print)
633 (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
642 (minimum-length . 0.3)
644 ; (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
645 (print-function . ,Hyphen_spanner::print)
647 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
648 spanner-interface))))
653 (print-function . ,Lyric_extender::print)
654 (thickness . 0.8) ; linethickness
655 (minimum-length . 1.5)
657 (meta . ((interfaces . (lyric-interface
658 lyric-extender-interface spanner-interface))))
662 . ((print-function . ,Text_interface::print)
663 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
664 (self-alignment-X . 0)
666 (font-series . bold-narrow)
668 (meta . ((interfaces . (rhythmic-grob-interface
669 lyric-syllable-interface
670 self-alignment-interface text-interface
671 font-interface item-interface ))))
678 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
679 (print-function . ,Mensural_ligature::print)
680 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
685 (print-function . ,Text_interface::print)
686 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
689 (meta . ((interfaces . (text-interface
690 side-position-interface font-interface
691 metronome-mark-interface item-interface))))
695 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
696 (print-function . ,Measure_grouping::print)
702 (meta . ((interfaces . (spanner-interface side-position-interface
703 measure-grouping-interface))))
707 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
708 (print-function . ,Multi_measure_rest::print)
709 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
712 (thick-thickness . 6.6)
713 (hair-thickness . 2.0)
715 (meta . ((interfaces . (multi-measure-rest-interface
716 multi-measure-interface rest-interface
717 font-interface staff-symbol-referencer-interface))))
720 (MultiMeasureRestNumber
722 (print-function . ,Text_interface::print)
723 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
724 ,Self_alignment_interface::centered_on_other_axis_parent))
725 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
726 (self-alignment-X . 0)
729 (staff-padding . 0.4)
730 (font-encoding . fetaNumber)
731 (meta . ((interfaces . (side-position-interface
732 multi-measure-interface self-alignment-interface
733 font-interface spanner-interface text-interface))))
735 (MultiMeasureRestText
737 (print-function . ,Text_interface::print)
738 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
739 ,Self_alignment_interface::centered_on_other_axis_parent))
740 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
741 (self-alignment-X . 0)
744 (staff-padding . 0.25)
745 (meta . ((interfaces . (side-position-interface
746 multi-measure-interface self-alignment-interface font-interface
747 spanner-interface text-interface))))
753 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
754 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
755 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
761 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
762 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
763 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
768 (print-function . ,Note_head::print)
769 (ligature-primitive-callback . ,Note_head::print)
770 (glyph-name-procedure . ,find-notehead-symbol)
771 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
772 (stem-attachment-function . ,note-head-style->attachment-coordinates)
773 (meta . ((interfaces . (rhythmic-grob-interface
774 rhythmic-head-interface font-interface note-head-interface
776 staff-symbol-referencer-interface item-interface ))))
781 (stem-spacing-correction . 0.5)
782 (same-direction-correction . 0.25)
783 ;; Changed this from 0.75.
784 ;; If you ever change this back, please document! --hwn
785 (knee-spacing-correction . 1.0)
787 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
793 (print-function . ,Text_interface::print)
794 (meta . ((interfaces . (note-name-interface
795 text-interface font-interface item-interface ))))
800 (self-alignment-X . 0)
801 (break-visibility . ,begin-of-line-visible)
802 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
803 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
804 (print-function . ,Text_interface::print)
806 ;; no Y dimensions, because of lyrics under tenor clef.
808 (font-shape . italic)
810 (staff-padding . 0.2)
812 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
817 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
818 (print-function . ,Ottava_bracket::print)
819 (font-shape . italic)
820 (shorten-pair . (0.0 . -0.6))
821 (staff-padding . 1.0)
823 (minimum-length . 1.0)
824 (dash-fraction . 0.3)
825 (edge-height . (0 . 1.2))
827 (meta . ((interfaces . (ottava-bracket-interface
828 line-interface side-position-interface
829 font-interface text-interface spanner-interface))))
835 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
836 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
838 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
839 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
843 . ((slur-details . ,default-slur-details)
844 (print-function . ,Slur::print)
846 (spacing-procedure . ,Spanner::set_spacing_rods)
847 (minimum-length . 1.5)
848 (after-line-breaking-callback . ,Slur::after_line_breaking)
849 (Y-extent-callback . ,Slur::height)
852 (meta . ((interfaces . (slur-interface spanner-interface))))
855 (NonMusicalPaperColumn
858 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
859 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
861 ;; debugging stuff: print column number.
862 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
865 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
870 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
871 (print-function . ,Multi_measure_rest::percent)
874 (font-encoding . fetaMusic)
875 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
878 ;; an example of a text spanner
881 (print-function . ,Piano_pedal_bracket::print)
883 (bound-padding . 1.0)
885 (bracket-flare . (0.5 . 0.5))
886 (edge-height . (1.0 . 1.0))
887 (shorten-pair . (0.0 . 0.0))
889 (meta . ((interfaces . (line-interface
890 piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
895 (print-function . ,Text_interface::print)
896 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
897 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
898 (after-line-breaking-callback . ,shift-right-at-line-begin)
899 (self-alignment-X . 0)
904 (break-visibility . ,end-of-line-invisible)
906 (meta . ((interfaces . (text-interface
907 side-position-interface font-interface mark-interface
908 self-alignment-interface item-interface ))))
912 (RemoveEmptyVerticalGroup
914 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
915 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
917 (meta . ((interfaces . (axis-group-interface
918 vertically-spaceable-interface hara-kiri-group-interface
919 item-interface spanner-interface))))
924 (print-function . ,Percent_repeat_item_interface::beat_slash)
927 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
931 (after-line-breaking-callback . ,Rest::after_line_breaking)
932 (X-extent-callback . ,Rest::extent_callback)
933 (Y-extent-callback . ,Rest::extent_callback)
934 (print-function . ,Rest::print)
935 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
936 ,Rest::polyphonic_offset_callback
938 (minimum-distance . 0.25)
939 (meta . ((interfaces . (font-interface
940 rhythmic-head-interface
941 rhythmic-grob-interface
942 staff-symbol-referencer-interface
943 rest-interface item-interface ))
948 (minimum-distance . 0.75)
949 (meta . ((interfaces . (rest-collision-interface item-interface ))))
954 ;; don't set direction here: it breaks staccato.
955 (print-function . ,Script_interface::print)
957 ;; This value is sensitive: if too large, staccato dots will move a
960 (staff-padding . 0.25)
961 ;; (script-priority . 0) priorities for scripts, see script.scm
962 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
963 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
964 (font-encoding . fetaMusic)
965 (meta . ((interfaces . (script-interface
966 side-position-interface font-interface item-interface ))))
971 (before-line-breaking-callback . ,Script_column::before_line_breaking)
972 (meta . ((interfaces . (script-column-interface item-interface ))))
978 (X-extent-callback . #f)
979 (Y-extent-callback . #f)
980 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
983 (SeparatingGroupSpanner
985 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
986 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
990 . ((slur-details . ,default-slur-details)
991 (print-function . ,Slur::print)
993 (spacing-procedure . ,Spanner::set_spacing_rods)
994 (minimum-length . 1.5)
995 (after-line-breaking-callback . ,Slur::after_line_breaking)
996 (Y-extent-callback . ,Slur::height)
1000 (meta . ((interfaces . (slur-interface spanner-interface))))
1005 (spacing-procedure . ,Spacing_spanner::set_springs)
1006 (grace-space-factor . 0.6)
1007 (shortest-duration-space . 2.0)
1008 (spacing-increment . 1.2)
1009 (base-shortest-duration . ,(ly:make-moment 3 16))
1010 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
1015 (break-align-symbol . staff-bar)
1016 (bar-size-procedure . ,Span_bar::get_bar_size)
1017 (print-function . ,Span_bar::print)
1018 (X-extent-callback . ,Span_bar::width_callback)
1019 (Y-extent-callback . ())
1022 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
1026 ;; Ross. page 151 lists other values, we opt for a leaner look
1030 (hair-thickness . 1.6)
1031 (thick-thickness . 6.0)
1032 (meta . ((interfaces . (span-bar-interface font-interface
1033 bar-line-interface item-interface ))))
1037 . ((print-function . ,Text_interface::print)
1038 (font-series . bold)
1040 (X-offset-callbacks . (,Side_position_interface::aligned_side))
1042 (meta . ((interfaces . (side-position-interface
1043 stanza-number-interface text-interface font-interface item-interface ))))
1048 (print-function . ,print-circled-text-callback)
1050 (staff-padding . 0.5)
1051 (self-alignment-X . 0)
1052 (self-alignment-Y . 0)
1053 (script-priority . 100)
1054 (font-encoding . fetaNumber)
1055 (font-size . -5) ; don't overlap when next to heads.
1056 (meta . ((interfaces . (string-number-interface
1057 font-interface text-script-interface text-interface
1058 side-position-interface self-alignment-interface
1065 (stem-spacing-correction . 0.4)
1067 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
1072 (print-function . ,Text_interface::print)
1074 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1075 (no-spacing-rods . #t)
1076 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1077 (font-shape . italic)
1078 (self-alignment-X . 0)
1079 (meta . ((interfaces . (text-interface
1080 self-alignment-interface font-interface item-interface))))
1083 (SostenutoPedalLineSpanner
1086 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1087 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1091 (minimum-space . 1.0)
1093 (meta . ((interfaces . (piano-pedal-interface
1094 axis-group-interface side-position-interface spanner-interface))))
1099 (print-function . ,Staff_symbol::print)
1101 (ledger-line-thickness . (1.0 . 0.1))
1103 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1108 ;; this list is rather long. Trim --hwn
1109 (before-line-breaking-callback . ,Stem::before_line_breaking)
1110 (print-function . ,Stem::print)
1113 ;; 3.5 (or 3 measured from note head) is standard length
1114 ;; 32nd, 64th flagged stems should be longer
1115 (lengths . (3.5 3.5 3.5 4.5 5.0))
1117 ;; Stems in unnatural (forced) direction should be shortened by
1118 ;; one staff space, according to [Roush & Gourlay].
1119 ;; Flagged stems we shorten only half a staff space.
1120 (stem-shorten . (1.0 0.5))
1122 ;; default stem direction for note on middle line
1123 (neutral-direction . -1)
1127 ;; FIXME. 3.5 yields too long beams (according to Ross and
1128 ;; looking at Baerenreiter examples) for a number of common
1129 ;; boundary cases. Subtracting half a beam thickness fixes
1130 ;; this, but the bug may well be somewhere else.
1132 ;; FIXME this should come from 'lengths
1134 (beamed-lengths . (3.26 3.5 3.6))
1136 ;; We use the normal minima as minimum for the ideal lengths,
1137 ;; and the extreme minima as abolute minimum length.
1139 ;; The 'normal' minima
1140 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1141 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1143 ;; The 'extreme case' minima
1144 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1146 (X-offset-callbacks . (,Stem::offset_callback))
1147 (X-extent-callback . ,Stem::width_callback)
1148 (Y-extent-callback . ,Stem::height)
1149 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1150 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1155 (print-function . ,Stem_tremolo::print)
1156 (Y-extent-callback . ,Stem_tremolo::height)
1157 (X-extent-callback . #f)
1159 (beam-width . 1.6) ; staff-space
1160 (beam-thickness . 0.48) ; staff-space
1161 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1166 (no-spacing-rods . #t)
1167 (print-function . ,Sustain_pedal::print)
1168 (self-alignment-X . 0)
1170 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1171 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1172 (meta . ((interfaces . (piano-pedal-interface
1173 text-spanner-interface text-interface self-alignment-interface
1174 font-interface item-interface))))
1177 (SustainPedalLineSpanner
1180 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1181 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1184 (staff-padding . 1.2)
1185 (minimum-space . 1.0)
1187 (meta . ((interfaces . (piano-pedal-interface
1188 axis-group-interface side-position-interface spanner-interface))))
1194 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1195 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1196 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1202 (print-function . ,System_start_delimiter::print)
1203 (collapse-height . 5.0)
1204 (font-encoding . fetaBraces)
1205 (Y-extent-callback . #f)
1206 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1211 (Y-extent-callback . #f)
1212 (X-offset-callbacks . (,(lambda (g a) -0.8)))
1213 (print-function . ,System_start_delimiter::print)
1215 (collapse-height . 1)
1217 (meta . ((interfaces . (font-interface system-start-delimiter-interface
1218 spanner-interface))))
1223 (Y-extent-callback . #f)
1224 (print-function . ,System_start_delimiter::print)
1225 (glyph . "bar-line")
1227 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1228 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1234 (print-function . ,Text_interface::print)
1235 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1236 (stem-attachment-function . ,tablature-stem-attachment-function)
1237 (font-series . bold)
1238 (meta . ((interfaces
1239 . (rhythmic-head-interface
1241 note-head-interface staff-symbol-referencer-interface
1242 text-interface item-interface ))))
1248 (print-function . ,Text_interface::print)
1249 (no-spacing-rods . #t)
1250 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1253 ; sync with Fingering ?
1255 (staff-padding . 0.5)
1256 (script-priority . 200)
1257 ;; todo: add X self alignment?
1258 (meta . ((interfaces . (text-script-interface
1259 text-interface side-position-interface font-interface
1265 (print-function . ,Text_spanner::print)
1266 (font-shape . italic)
1267 (style . dashed-line)
1268 (staff-padding . 0.8)
1269 (dash-fraction . 0.2)
1272 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1278 (print-function . ,Tie::print)
1279 (spacing-procedure . ,Spanner::set_spacing_rods)
1280 (staffline-clearance . 0.35)
1281 (details . ((ratio . 0.333) (height-limit . 1.0)))
1285 (minimum-length . 2.5)
1286 (meta . ((interfaces . (tie-interface spanner-interface))))
1291 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1292 (before-line-breaking-callback . ,Tie_column::before_line_breaking)
1293 (X-extent-callback . #f)
1294 (Y-extent-callback . #f)
1295 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1300 (print-function . ,Time_signature::print)
1301 ; (print-function . ,Text_interface::print)
1302 (break-align-symbol . time-signature)
1303 (break-visibility . ,all-visible)
1305 (first-note . (fixed-space . 2.0))
1306 (right-edge . (extra-space . 0.5))
1307 (staff-bar . (minimum-space . 2.0))
1311 ; (text . (,time-signature-glue-markup))
1312 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1318 (print-function . ,Dynamic_text_spanner::print)
1319 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1322 (staff-padding . 1.0)
1325 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1326 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1329 (TrillPitchAccidental
1330 . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1334 (print-function . ,Accidental_interface::print)
1335 (meta . ((interfaces . (item-interface side-position-interface font-interface))))
1339 . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1342 (print-function . ,parenthesize-elements)
1343 (direction . ,RIGHT)
1345 (meta . ((interfaces . (side-position-interface
1346 font-interface accidental-interface
1347 item-interface axis-group-interface))))
1351 . ((print-function . ,Note_head::print)
1353 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1355 (meta . ((interfaces . (item-interface
1356 font-interface pitched-trill-interface
1357 ledgered-interface staff-symbol-referencer-interface))))
1365 (edge-height . (0.7 . 0.7))
1366 (shorten-pair . (-0.2 . -0.2))
1367 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1368 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1369 (print-function . ,Tuplet_bracket::print)
1370 (font-shape . italic)
1371 ; (font-series . bold)
1374 (meta . ((interfaces . (text-interface line-interface
1375 tuplet-bracket-interface
1376 font-interface spanner-interface))))
1381 (print-function . ,Text_interface::print)
1382 (font-shape . italic)
1383 (no-spacing-rods . #t)
1384 (self-alignment-X . 0)
1386 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1387 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1388 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1391 (UnaCordaPedalLineSpanner
1394 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1395 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1397 (staff-padding . 1.2)
1398 (minimum-space . 1.0)
1400 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1407 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1408 (print-function . ,Vaticana_ligature::print)
1409 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1416 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1417 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1419 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1425 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1426 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1428 (meta . ((interfaces . (axis-group-interface
1429 vertically-spaceable-interface spanner-interface))))
1435 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
1437 (space-alist . ((left-edge . (extra-space . 1.0))
1439 (break-align-symbol . instrument-name)
1440 (print-function . ,Text_interface::print)
1441 (break-align-symbol . clef)
1442 (break-visibility . ,begin-of-line-visible)
1444 (meta . ((interfaces . (font-interface
1445 self-alignment-interface
1446 side-position-interface text-interface
1447 break-aligned-interface item-interface ))))
1452 (print-function . ,Volta_bracket_interface::print)
1455 (font-encoding . fetaNumber)
1456 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1457 (thickness . 1.6) ;; linethickness
1458 (height . 2.0) ;; staffspace;
1461 (meta . ((interfaces . (volta-bracket-interface
1462 line-interface text-interface
1463 side-position-interface font-interface spanner-interface))))
1472 (X-extent-callback . #f)
1473 (Y-extent-callback . #f)
1474 (print-function . ,Line_spanner::print)
1475 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
1476 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
1480 (define (completize-grob-entry x)
1481 "transplant assoc key into 'name entry of 'meta of X
1483 (let* ((name-sym (car x))
1484 (grob-entry (cdr x))
1485 (metaentry (cdr (assoc 'meta grob-entry)))
1487 (cdr (assoc 'interfaces metaentry)))
1490 (set! metaentry (assoc-set! metaentry 'name name-sym))
1491 (set! metaentry (assoc-set! metaentry 'interfaces
1492 (cons 'grob-interface ifaces-entry)))
1493 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1494 (cons name-sym grob-entry)))
1496 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1499 ;; (display (map pair? all-grob-descriptions))
1501 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1504 ;; (display (car x)) (newline)
1506 (set-object-property! (car x) 'translation-type? list?)
1507 (set-object-property! (car x) 'is-grob? #t))
1508 all-grob-descriptions)
1510 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))