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_interface::centered_on_parent))
389 (self-alignment-X . 0)
390 (no-spacing-rods . #t)
391 (script-priority . 100)
393 (font-encoding . fetaDynamic)
394 (font-shape . italic)
395 (self-alignment-Y . 0)
396 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
397 dynamic-interface script-interface item-interface))))
400 . ((print-function . ,Dynamic_text_spanner::print)
402 ;; rather ugh with NCSB
403 ; (font-series . bold)
404 (font-shape . italic)
405 (style . dashed-line)
407 ; need to blend with dynamic texts.
409 (bound-padding . 0.75)
410 (dash-fraction . 0.2)
412 (meta . ((interfaces . (font-interface
414 dynamic-interface dynamic-text-spanner-interface
421 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
422 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
423 (staff-padding . 0.1)
425 (minimum-space . 1.2)
428 (meta . ((interfaces . (dynamic-interface axis-group-interface
429 side-position-interface spanner-interface))))))
433 (break-align-symbol . left-edge)
436 (break-visibility . ,center-invisible)
438 (custos . (extra-space . 0.0))
439 (ambitus . (extra-space . 2.0))
440 (time-signature . (extra-space . 0.0))
441 (staff-bar . (extra-space . 0.0))
442 (breathing-sign . (minimum-space . 0.0))
443 (clef . (extra-space . 0.8))
444 (first-note . (fixed-space . 1.0))
445 (right-edge . (extra-space . 0.0))
446 (key-signature . (extra-space . 0.0))
447 (key-cancellation . (extra-space . 0.0))
450 (meta . ((interfaces . (break-aligned-interface item-interface ))))
455 (print-function . ,Text_interface::print)
457 ; sync with TextScript (?)
459 (staff-padding . 0.5)
460 (self-alignment-X . 0)
461 (self-alignment-Y . 0)
462 (script-priority . 100)
463 (font-encoding . fetaNumber)
464 (font-size . -5) ; don't overlap when next to heads.
465 (meta . ((interfaces . (finger-interface
466 font-interface text-script-interface text-interface
467 side-position-interface self-alignment-interface
472 (print-function . ,print-circled-text-callback)
474 (staff-padding . 0.5)
475 (self-alignment-X . 0)
476 (self-alignment-Y . 0)
477 (script-priority . 100)
478 (font-encoding . fetaNumber)
479 (font-size . -5) ; don't overlap when next to heads.
480 (meta . ((interfaces . (string-number-interface
481 font-interface text-script-interface text-interface
482 side-position-interface self-alignment-interface
490 (zigzag-width . 0.75)
492 (X-extent-callback . #f)
493 (Y-extent-callback . #f)
494 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
495 (print-function . ,Line_spanner::print)
496 (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
503 (meta . ((interfaces . (grid-point-interface))))
508 (print-function . ,Grid_line_interface::print)
509 (X-extent-callback . ,Grid_line_interface::width_callback)
510 (self-alignment-X . ,CENTER)
511 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
512 ,Self_alignment_interface::centered_on_parent))
514 (meta . ((interfaces . (self-alignment-interface grid-line-interface)))
519 (print-function . ,Hairpin::print)
520 (after-line-breaking-callback . ,Hairpin::after_line_breaking)
523 (spacing-procedure . ,Spanner::set_spacing_rods)
524 (minimum-length . 2.0)
525 (bound-padding . 1.0)
526 (self-alignment-Y . 0)
527 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
528 (meta . ((interfaces . (hairpin-interface
529 line-interface self-alignment-interface dynamic-interface
530 spanner-interface))))
536 (print-function . ,Horizontal_bracket::print)
537 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
539 (staff-padding . 0.2)
541 (bracket-flare . (0.5 . 0.5))
542 (meta . ((interfaces . (horizontal-bracket-interface
543 side-position-interface
545 spanner-interface))))
550 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
551 ,Side_position_interface::aligned_on_support_refpoints))
552 ;; This direction is for aligned_on_support_refpoints
556 (left-edge . (extra-space . 1.0))
559 (self-alignment-Y . 0)
560 (print-function . ,Text_interface::print)
561 (break-align-symbol . instrument-name)
562 (break-visibility . ,begin-of-line-visible)
564 (meta . ((interfaces . (font-interface
565 self-alignment-interface side-position-interface text-interface
566 break-aligned-interface item-interface ))))
572 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
574 (space-alist . ((left-edge . (extra-space . 1.0))
576 (break-align-symbol . instrument-name)
577 (print-function . ,Text_interface::print)
578 (break-align-symbol . clef)
579 (break-visibility . ,begin-of-line-visible)
581 (meta . ((interfaces . (font-interface
582 self-alignment-interface
583 side-position-interface text-interface
584 break-aligned-interface item-interface ))))
588 (print-function . ,Key_signature_interface::print)
590 (time-signature . (extra-space . 1.25))
591 (staff-bar . (extra-space . 0.6))
592 (key-signature . (extra-space . 0.5))
593 (right-edge . (extra-space . 0.5))
594 (first-note . (fixed-space . 2.5))
596 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
597 (break-align-symbol . key-cancellation)
598 (break-visibility . ,begin-of-line-invisible)
601 (meta . ((interfaces . (key-signature-interface font-interface
602 break-aligned-interface item-interface ))))
606 (print-function . ,Key_signature_interface::print)
608 (time-signature . (extra-space . 1.25))
609 (staff-bar . (extra-space . 1.1))
610 (right-edge . (extra-space . 0.5))
611 (first-note . (fixed-space . 2.5))
613 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
614 (break-align-symbol . key-signature)
615 (break-visibility . ,begin-of-line-visible)
618 (meta . ((interfaces . (key-signature-interface font-interface
619 break-aligned-interface item-interface ))))
623 (print-function . ,Ledger_line_spanner::print)
624 (X-extent-callback . #f)
625 (Y-extent-callback . #f)
626 (minimum-length-fraction . 0.25)
627 (length-fraction . 0.25)
628 (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
629 (print-function . ,Ledger_line_spanner::print)
631 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
636 (ligature-primitive-callback . ,Note_head::print)
641 (edge-height . (0.7 . 0.7))
642 (shorten-pair . (-0.2 . -0.2))
643 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
644 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
645 (print-function . ,Tuplet_bracket::print)
646 (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
655 (minimum-length . 0.3)
657 ; (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
658 (print-function . ,Hyphen_spanner::print)
660 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
661 spanner-interface))))
666 (print-function . ,Lyric_extender::print)
667 (thickness . 0.8) ; linethickness
668 (minimum-length . 1.5)
670 (meta . ((interfaces . (lyric-interface
671 lyric-extender-interface spanner-interface))))
675 . ((print-function . ,Text_interface::print)
676 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
677 (self-alignment-X . 0)
679 (font-series . bold-narrow)
681 (meta . ((interfaces . (rhythmic-grob-interface
682 lyric-syllable-interface
683 self-alignment-interface text-interface
684 font-interface item-interface ))))
691 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
692 (print-function . ,Mensural_ligature::print)
693 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
698 (print-function . ,Text_interface::print)
699 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
700 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
701 (after-line-breaking-callback . ,shift-right-at-line-begin)
702 (self-alignment-X . 0)
707 (break-visibility . ,end-of-line-invisible)
709 (meta . ((interfaces . (text-interface
710 side-position-interface font-interface mark-interface
711 self-alignment-interface item-interface ))))
715 (print-function . ,Text_interface::print)
716 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
719 (meta . ((interfaces . (text-interface
720 side-position-interface font-interface
721 metronome-mark-interface item-interface))))
725 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
726 (print-function . ,Measure_grouping::print)
732 (meta . ((interfaces . (spanner-interface side-position-interface
733 measure-grouping-interface))))
737 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
738 (print-function . ,Multi_measure_rest::print)
739 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
742 (thick-thickness . 6.6)
743 (hair-thickness . 2.0)
745 (meta . ((interfaces . (multi-measure-rest-interface
746 multi-measure-interface rest-interface
747 font-interface staff-symbol-referencer-interface))))
750 (MultiMeasureRestNumber
752 (print-function . ,Text_interface::print)
753 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
754 ,Self_alignment_interface::centered_on_other_axis_parent))
755 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
756 (self-alignment-X . 0)
759 (staff-padding . 0.4)
760 (font-encoding . fetaNumber)
761 (meta . ((interfaces . (side-position-interface
762 multi-measure-interface self-alignment-interface
763 font-interface spanner-interface text-interface))))
765 (MultiMeasureRestText
767 (print-function . ,Text_interface::print)
768 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
769 ,Self_alignment_interface::centered_on_other_axis_parent))
770 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
771 (self-alignment-X . 0)
774 (staff-padding . 0.25)
775 (meta . ((interfaces . (side-position-interface
776 multi-measure-interface self-alignment-interface font-interface
777 spanner-interface text-interface))))
783 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
784 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
785 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
791 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
792 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
793 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
799 (print-function . ,Note_head::print)
800 (ligature-primitive-callback . ,Note_head::print)
801 (glyph-name-procedure . ,find-notehead-symbol)
802 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
803 (stem-attachment-function . ,note-head-style->attachment-coordinates)
804 (meta . ((interfaces . (rhythmic-grob-interface
805 rhythmic-head-interface font-interface note-head-interface
807 staff-symbol-referencer-interface item-interface ))))
812 (stem-spacing-correction . 0.5)
813 (same-direction-correction . 0.25)
814 ;; Changed this from 0.75.
815 ;; If you ever change this back, please document! --hwn
816 (knee-spacing-correction . 1.0)
818 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
826 (X-extent-callback . #f)
827 (Y-extent-callback . #f)
828 (print-function . ,Line_spanner::print)
829 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
830 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
835 (print-function . ,Text_interface::print)
836 (meta . ((interfaces . (note-name-interface
837 text-interface font-interface item-interface ))))
842 (self-alignment-X . 0)
843 (break-visibility . ,begin-of-line-visible)
844 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
845 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
846 (print-function . ,Text_interface::print)
848 ;; no Y dimensions, because of lyrics under tenor clef.
850 (font-shape . italic)
852 (staff-padding . 0.2)
854 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
860 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
861 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
863 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
864 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
868 . ((slur-details . ,default-slur-details)
869 (print-function . ,Slur::print)
871 (spacing-procedure . ,Spanner::set_spacing_rods)
872 (minimum-length . 1.5)
873 (after-line-breaking-callback . ,Slur::after_line_breaking)
874 (Y-extent-callback . ,Slur::height)
877 (meta . ((interfaces . (slur-interface spanner-interface))))
880 (NonMusicalPaperColumn
883 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
884 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
886 ;; debugging stuff: print column number.
887 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
890 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
895 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
896 (print-function . ,Multi_measure_rest::percent)
899 (font-encoding . fetaMusic)
900 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
903 ;; an example of a text spanner
906 (print-function . ,Piano_pedal_bracket::print)
908 (bound-padding . 1.0)
910 (bracket-flare . (0.5 . 0.5))
911 (edge-height . (1.0 . 1.0))
912 (shorten-pair . (0.0 . 0.0))
914 (meta . ((interfaces . (line-interface
915 piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
919 (RemoveEmptyVerticalGroup
921 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
922 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
924 (meta . ((interfaces . (axis-group-interface
925 vertically-spaceable-interface hara-kiri-group-interface
926 item-interface spanner-interface))))
931 (print-function . ,Percent_repeat_item_interface::beat_slash)
934 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
938 (after-line-breaking-callback . ,Rest::after_line_breaking)
939 (X-extent-callback . ,Rest::extent_callback)
940 (Y-extent-callback . ,Rest::extent_callback)
941 (print-function . ,Rest::print)
942 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
943 ,Rest::polyphonic_offset_callback
945 (minimum-distance . 0.25)
947 (interfaces . (font-interface
948 rhythmic-head-interface
949 rhythmic-grob-interface
950 staff-symbol-referencer-interface
951 rest-interface item-interface ))
956 (minimum-distance . 0.75)
957 (meta . ((interfaces . (rest-collision-interface item-interface ))))
962 ;; don't set direction here: it breaks staccato.
963 (print-function . ,Script_interface::print)
965 ;; This value is sensitive: if too large, staccato dots will move a
968 (staff-padding . 0.25)
969 ;; (script-priority . 0) priorities for scripts, see script.scm
970 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
971 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
972 (font-encoding . fetaMusic)
973 (meta . ((interfaces . (script-interface
974 side-position-interface font-interface item-interface ))))
979 (before-line-breaking-callback . ,Script_column::before_line_breaking)
980 (meta . ((interfaces . (script-column-interface item-interface ))))
984 . ((slur-details . ,default-slur-details)
985 (print-function . ,Slur::print)
987 (spacing-procedure . ,Spanner::set_spacing_rods)
988 (minimum-length . 1.5)
989 (after-line-breaking-callback . ,Slur::after_line_breaking)
990 (Y-extent-callback . ,Slur::height)
994 (meta . ((interfaces . (slur-interface spanner-interface))))
999 (spacing-procedure . ,Spacing_spanner::set_springs)
1000 (grace-space-factor . 0.6)
1001 (shortest-duration-space . 2.0)
1002 (spacing-increment . 1.2)
1003 (base-shortest-duration . ,(ly:make-moment 3 16))
1004 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
1009 (break-align-symbol . staff-bar)
1010 (bar-size-procedure . ,Span_bar::get_bar_size)
1011 (print-function . ,Span_bar::print)
1012 (X-extent-callback . ,Span_bar::width_callback)
1013 (Y-extent-callback . ())
1016 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
1020 ;; Ross. page 151 lists other values, we opt for a leaner look
1024 (hair-thickness . 1.6)
1025 (thick-thickness . 6.0)
1026 (meta . ((interfaces . (span-bar-interface font-interface
1027 bar-line-interface item-interface ))))
1031 . ((print-function . ,Text_interface::print)
1032 (font-series . bold)
1034 (X-offset-callbacks . (,Side_position_interface::aligned_side))
1036 (meta . ((interfaces . (side-position-interface
1037 stanza-number-interface text-interface font-interface item-interface ))))
1043 (stem-spacing-correction . 0.4)
1045 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
1050 (print-function . ,Text_interface::print)
1052 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1053 (no-spacing-rods . #t)
1054 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1055 (font-shape . italic)
1056 (self-alignment-X . 0)
1057 (meta . ((interfaces . (text-interface
1058 self-alignment-interface font-interface item-interface))))
1061 (SostenutoPedalLineSpanner
1064 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1065 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1069 (minimum-space . 1.0)
1071 (meta . ((interfaces . (piano-pedal-interface
1072 axis-group-interface side-position-interface spanner-interface))))
1077 (print-function . ,Staff_symbol::print)
1079 (ledger-line-thickness . (1.0 . 0.1))
1081 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1086 ;; this list is rather long. Trim --hwn
1087 (before-line-breaking-callback . ,Stem::before_line_breaking)
1088 (print-function . ,Stem::print)
1091 ;; 3.5 (or 3 measured from note head) is standard length
1092 ;; 32nd, 64th flagged stems should be longer
1093 (lengths . (3.5 3.5 3.5 4.5 5.0))
1095 ;; Stems in unnatural (forced) direction should be shortened by
1096 ;; one staff space, according to [Roush & Gourlay].
1097 ;; Flagged stems we shorten only half a staff space.
1098 (stem-shorten . (1.0 0.5))
1100 ;; default stem direction for note on middle line
1101 (neutral-direction . -1)
1105 ;; FIXME. 3.5 yields too long beams (according to Ross and
1106 ;; looking at Baerenreiter examples) for a number of common
1107 ;; boundary cases. Subtracting half a beam thickness fixes
1108 ;; this, but the bug may well be somewhere else.
1110 ;; FIXME this should come from 'lengths
1112 (beamed-lengths . (3.26 3.5 3.6))
1114 ;; We use the normal minima as minimum for the ideal lengths,
1115 ;; and the extreme minima as abolute minimum length.
1117 ;; The 'normal' minima
1118 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1119 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1121 ;; The 'extreme case' minima
1122 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1124 (X-offset-callbacks . (,Stem::offset_callback))
1125 (X-extent-callback . ,Stem::width_callback)
1126 (Y-extent-callback . ,Stem::height)
1127 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1128 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1133 (print-function . ,Stem_tremolo::print)
1134 (Y-extent-callback . ,Stem_tremolo::height)
1135 (X-extent-callback . #f)
1137 (beam-width . 1.6) ; staff-space
1138 (beam-thickness . 0.48) ; staff-space
1139 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1144 (X-extent-callback . #f)
1145 (Y-extent-callback . #f)
1146 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1149 (SeparatingGroupSpanner
1151 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1152 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1157 (no-spacing-rods . #t)
1158 (print-function . ,Sustain_pedal::print)
1159 (self-alignment-X . 0)
1161 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1162 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1163 (meta . ((interfaces . (piano-pedal-interface
1164 text-spanner-interface text-interface self-alignment-interface
1165 font-interface item-interface))))
1168 (SustainPedalLineSpanner
1171 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1172 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1175 (staff-padding . 1.2)
1176 (minimum-space . 1.0)
1178 (meta . ((interfaces . (piano-pedal-interface
1179 axis-group-interface side-position-interface spanner-interface))))
1185 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1186 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1187 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1193 (print-function . ,System_start_delimiter::print)
1194 (collapse-height . 5.0)
1195 (font-encoding . fetaBraces)
1196 (Y-extent-callback . #f)
1197 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1202 (Y-extent-callback . #f)
1203 (print-function . ,System_start_delimiter::print)
1209 (collapse-height . 1)
1211 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1216 (Y-extent-callback . #f)
1217 (print-function . ,System_start_delimiter::print)
1218 (glyph . "bar-line")
1220 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1221 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1226 (print-function . ,Text_interface::print)
1227 (no-spacing-rods . #t)
1228 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1231 ; sync with Fingering ?
1233 (staff-padding . 0.5)
1234 (script-priority . 200)
1235 ;; todo: add X self alignment?
1236 (meta . ((interfaces . (text-script-interface
1237 text-interface side-position-interface font-interface
1242 (print-function . ,Text_interface::print)
1243 (no-spacing-rods . #t)
1244 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1245 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1248 (staff-padding . 0.5)
1249 (script-priority . 200)
1250 ;; todo: add X self alignment?
1252 (font-series . bold)
1253 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1257 (print-function . ,Text_spanner::print)
1258 (font-shape . italic)
1259 (style . dashed-line)
1260 (staff-padding . 0.8)
1261 (dash-fraction . 0.2)
1264 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1268 (print-function . ,Dynamic_text_spanner::print)
1269 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1272 (staff-padding . 1.0)
1275 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1276 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1281 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1282 (print-function . ,Ottava_bracket::print)
1283 (font-shape . italic)
1284 (shorten-pair . (0.0 . -0.6))
1285 (staff-padding . 1.0)
1287 (minimum-length . 1.0)
1288 (dash-fraction . 0.3)
1289 (edge-height . (0 . 1.2))
1291 (meta . ((interfaces . (ottava-bracket-interface
1292 line-interface side-position-interface
1293 font-interface text-interface spanner-interface))))
1299 (print-function . ,Text_interface::print)
1300 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1301 (stem-attachment-function . ,tablature-stem-attachment-function)
1302 (font-series . bold)
1303 (meta . ((interfaces
1304 . (rhythmic-head-interface
1306 note-head-interface staff-symbol-referencer-interface
1307 text-interface item-interface ))))
1313 (print-function . ,Tie::print)
1314 (spacing-procedure . ,Spanner::set_spacing_rods)
1315 (staffline-clearance . 0.35)
1316 (details . ((ratio . 0.333) (height-limit . 1.0)))
1320 (minimum-length . 2.5)
1321 (meta . ((interfaces . (tie-interface spanner-interface))))
1326 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1327 (before-line-breaking-callback . ,Tie_column::before_line_breaking)
1328 (X-extent-callback . #f)
1329 (Y-extent-callback . #f)
1330 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1335 (print-function . ,Time_signature::print)
1336 ; (print-function . ,Text_interface::print)
1337 (break-align-symbol . time-signature)
1338 (break-visibility . ,all-visible)
1340 (first-note . (fixed-space . 2.0))
1341 (right-edge . (extra-space . 0.5))
1342 (staff-bar . (minimum-space . 2.0))
1346 ; (text . (,time-signature-glue-markup))
1347 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1354 (edge-height . (0.7 . 0.7))
1355 (shorten-pair . (-0.2 . -0.2))
1356 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1357 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1358 (print-function . ,Tuplet_bracket::print)
1359 (font-shape . italic)
1360 ; (font-series . bold)
1363 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1368 (print-function . ,Text_interface::print)
1369 (font-shape . italic)
1370 (no-spacing-rods . #t)
1371 (self-alignment-X . 0)
1373 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1374 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1375 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1378 (UnaCordaPedalLineSpanner
1381 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1382 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1384 (staff-padding . 1.2)
1385 (minimum-space . 1.0)
1387 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1394 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1395 (print-function . ,Vaticana_ligature::print)
1396 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1401 (print-function . ,Volta_bracket_interface::print)
1404 (font-encoding . fetaNumber)
1405 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1406 (thickness . 1.6) ;; linethickness
1407 (height . 2.0) ;; staffspace;
1410 (meta . ((interfaces . (volta-bracket-interface
1411 line-interface text-interface
1412 side-position-interface font-interface spanner-interface))))
1418 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1419 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1421 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1427 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1428 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1430 (meta . ((interfaces . (axis-group-interface
1431 vertically-spaceable-interface spanner-interface))))
1435 (define (completize-grob-entry x)
1436 "transplant assoc key into 'name entry of 'meta of X
1438 (let* ((name-sym (car x))
1439 (grob-entry (cdr x))
1440 (metaentry (cdr (assoc 'meta grob-entry)))
1442 (cdr (assoc 'interfaces metaentry)))
1445 (set! metaentry (assoc-set! metaentry 'name name-sym))
1446 (set! metaentry (assoc-set! metaentry 'interfaces
1447 (cons 'grob-interface ifaces-entry)))
1448 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1449 (cons name-sym grob-entry)))
1451 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1454 ;; (display (map pair? all-grob-descriptions))
1456 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1459 ;; (display (car x)) (newline)
1461 (set-object-property! (car x) 'translation-type? list?)
1462 (set-object-property! (car x) 'is-grob? #t))
1463 all-grob-descriptions)
1465 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))