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 . ((class . Item)
27 (interfaces . (accidental-interface font-interface))))
31 . ((print-function . ,Accidental_interface::print)
32 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
33 ,Self_alignment_interface::aligned_on_self))
34 (self-alignment-X . ,CENTER)
36 (cautionary-style . smaller)
37 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
38 (cautionary-style . parentheses)
40 (staff-padding . 0.25)
42 (meta . ((class . Item)
43 (interfaces . (side-position-interface script-interface accidental-interface
44 accidental-suggestion-interface self-alignment-interface
48 . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
51 ;; this is quite small, but it is very ugly to have
52 ;; accs closer to the previous note than to the next one.
53 (right-padding . 0.15)
54 (meta . ((class . Item)
55 (interfaces . (accidental-placement-interface))))
60 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
61 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
63 (clef . (extra-space . 0.5))
64 (key-signature . (extra-space . 0.0))
65 (staff-bar . (extra-space . 0.0))
66 (time-signature . (extra-space . 0.0))
67 (first-note . (fixed-space . 0.0))
70 (break-align-symbol . ambitus)
71 (break-visibility . ,begin-of-line-visible)
72 (meta . ((class . Item)
73 (interfaces . (axis-group-interface
74 break-aligned-interface ambitus-interface))))
79 (print-function . ,Ambitus::print)
82 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
84 (meta . ((class . Item)
85 (interfaces . (ambitus-interface staff-symbol-referencer-interface font-interface))))
89 (print-function . ,Accidental_interface::print)
92 (X-offset-callbacks . (,Side_position_interface::aligned_side))
94 (cautionary-style . parentheses)
95 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking)
96 (meta . ((class . Item)
97 (interfaces . (item-interface
98 accidental-interface break-aligned-interface
99 side-position-interface font-interface))))
105 (print-function . ,Note_head::print)
106 (glyph-name-procedure . ,find-notehead-symbol)
107 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
108 (meta . ((class . Item)
109 (interfaces . (font-interface note-head-interface
111 staff-symbol-referencer-interface
112 rhythmic-head-interface
119 (X-extent-callback . ,Arpeggio::width_callback)
120 (print-function . ,Arpeggio::print)
121 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
122 (X-offset-callbacks . (,Side_position_interface::aligned_side))
125 (staff-position . 0.0)
126 (meta . ((class . Item)
127 (interfaces . (arpeggio-interface
128 staff-symbol-referencer-interface side-position-interface
134 (break-align-symbol . staff-bar)
136 (break-glyph-function . ,default-break-barline)
138 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
139 (print-function . ,Bar_line::print)
140 (break-visibility . ,all-visible)
142 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
144 (time-signature . (extra-space . 0.75))
145 (custos . (minimum-space . 2.0))
146 (clef . (minimum-space . 1.0))
147 (key-signature . (extra-space . 1.0))
148 (key-cancellation . (extra-space . 1.0))
149 (first-note . (fixed-space . 1.3))
150 (next-note . (semi-fixed-space . 1.3))
151 (right-edge . (extra-space . 0.0))
155 ;; Ross. page 151 lists other values, we opt for a leaner look
158 ;; kern should scale with linethickness too.
161 (hair-thickness . 1.9)
162 (thick-thickness . 6.0)
163 (meta . ((class . Item)
164 (interfaces . (bar-line-interface
165 break-aligned-interface font-interface))))
171 (print-function . ,Text_interface::print)
173 (break-visibility . ,begin-of-line-visible)
176 (font-family . roman)
178 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
179 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
180 (self-alignment-X . 1)
184 (interfaces . (side-position-interface
186 self-alignment-interface
187 font-interface break-aligned-interface))))
193 (print-function . ,Text_interface::print)
194 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
196 (font-family . number)
198 ;; We must do this, other BFs in
199 ;; layout16 become too small.
202 (meta . ((class . Item)
203 (interfaces . (text-interface
204 rhythmic-grob-interface bass-figure-interface
205 self-alignment-interface font-interface))))
209 ;; todo: clean this up a bit: the list is getting
211 (print-function . ,Beam::print)
213 (positions . (#f . #f))
214 (position-callbacks . (,Beam::least_squares
217 ,Beam::shift_region_to_valid
221 ;; TODO: should be in SLT.
222 (thickness . 0.48) ; in staff-space
223 (before-line-breaking-callback . ,Beam::before_line_breaking)
224 (after-line-breaking-callback . ,Beam::after_line_breaking)
225 (neutral-direction . -1)
226 (dir-function . ,beam-dir-majority-median)
228 ;; Whe have some unreferenced problems here.
230 ;; If we shorten beamed stems less than normal stems (1 staffspace),
231 ;; or high order less than 8th beams, patterns like
232 ;; c''4 [c''8 c''] c''4 [c''16 c]
233 ;; are ugly (different stem lengths).
235 ;; But if we shorten 16th beams as much as 8th beams, a single
236 ;; forced 16th beam looks *very* short.
238 ;; We choose to shorten 8th beams the same as single stems,
239 ;; and high order beams less than 8th beams, so that all
240 ;; isolated shortened beams look nice and a bit shortened,
241 ;; sadly possibly breaking patterns with high order beams.
242 (beamed-stem-shorten . (1.0 0.5 0.25))
244 (flag-width-function . ,beam-flag-width-function)
246 (auto-knee-gap . 5.5)
248 ;; only for debugging.
249 (font-family . roman)
251 (space-function . ,Beam::space_function)
252 (meta . ((class . Spanner)
253 (interfaces . (staff-symbol-referencer-interface beam-interface))))
260 (break-align-orders . #(; end-of-line:
262 left-edge ambitus breathing-sign
263 clef staff-bar key-cancellation key-signature
264 time-signature custos)
267 (instrument-name left-edge ambitus breathing-sign
268 clef staff-bar key-cancellation key-signature
270 time-signature custos)
272 (instrument-name left-edge ambitus breathing-sign
273 clef key-cancellation key-signature staff-bar
274 time-signature custos)
278 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
279 (meta . ((class . Item)
280 (interfaces . (break-alignment-interface axis-group-interface)))))
286 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
287 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
288 (meta . ((class . Item)
289 (interfaces . (break-aligned-interface axis-group-interface ))))
294 (break-align-symbol . breathing-sign)
297 (ambitus . (extra-space . 2.0))
298 (custos . (minimum-space . 1.0))
299 (key-signature . (minimum-space . 1.5))
300 (staff-bar . (minimum-space . 1.5))
301 (clef . (minimum-space . 2.0))
302 (first-note . (fixed-space . 1.0)) ;huh?
303 (right-edge . (extra-space . 0.1))
305 (print-function . ,Text_interface::print)
306 (text . ,(make-musicglyph-markup "scripts.rcomma"))
307 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
308 (break-visibility . ,begin-of-line-invisible)
309 (meta . ((class . Item)
310 (interfaces . (break-aligned-interface
311 breathing-sign-interface text-interface font-interface ))))
316 (print-function . ,Clef::print)
317 (before-line-breaking-callback . ,Clef::before_line_breaking)
319 (font-family . music)
320 (break-align-symbol . clef)
321 (break-visibility . ,begin-of-line-visible)
322 (space-alist . ((ambitus . (extra-space . 2.0))
323 (staff-bar . (extra-space . 0.7))
324 (key-cancellation . (minimum-space . 4.0))
325 (key-signature . (minimum-space . 4.0))
326 (time-signature . (minimum-space . 4.2))
327 (first-note . (minimum-fixed-space . 5.0))
328 (next-note . (extra-space . 0.5))
329 (right-edge . (extra-space . 0.5))
331 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
332 (meta . ((class . Item)
333 (interfaces . (clef-interface
334 staff-symbol-referencer-interface font-interface
335 break-aligned-interface ))))
338 (ClusterSpannerBeacon
340 (print-function . #f)
341 (Y-extent-callback . ,Cluster_beacon::height)
342 (meta . ((class . Item)
343 (interfaces . (cluster-beacon-interface))))
348 (print-function . ,Cluster::print)
349 (spacing-procedure . ,Spanner::set_spacing_rods)
350 (minimum-length . 0.0)
353 (meta . ((class . Spanner)
354 (interfaces . (cluster-interface))))
360 (print-function . ,Text_interface::print)
361 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
365 (meta . ((class . Item)
366 (interfaces . (font-interface
367 rhythmic-grob-interface text-interface chord-name-interface
373 (print-function . ,Text_interface::print)
374 (no-spacing-rods . #t)
375 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
376 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
379 (staff-padding . 0.5)
380 (script-priority . 200)
381 ;; todo: add X self alignment?
384 (meta . ((class . Item)
385 (interfaces . (text-script-interface
386 text-interface side-position-interface
392 (break-align-symbol . custos)
394 (print-function . ,Custos::print)
395 (break-visibility . ,end-of-line-visible)
397 (neutral-direction . -1)
398 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
400 (first-note . (minimum-fixed-space . 0.0))
401 (right-edge . (extra-space . 0.1))
403 (meta . ((class . Item)
405 . (custos-interface staff-symbol-referencer-interface
407 break-aligned-interface ))))
414 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
415 (X-offset-callbacks . (,Dot_column::side_position))
416 (meta . ((class . Item)
417 (interfaces . (dot-column-interface axis-group-interface ))))
422 (print-function . ,Dots::print)
424 (meta . ((class . Item)
425 (interfaces . (font-interface
426 staff-symbol-referencer-interface dots-interface ))))
431 (print-function . ,Percent_repeat_item_interface::double_percent)
434 (font-encoding . fetaMusic)
437 (break-align-symbol . staff-bar)
438 (break-visibility . ,begin-of-line-invisible)
439 (meta . ((class . Item)
440 (interfaces . (font-interface
441 break-aligned-interface
442 percent-repeat-interface ))))
447 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
448 (print-function . ,Text_interface::print)
449 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
450 (self-alignment-X . 0)
451 (no-spacing-rods . #t)
452 (script-priority . 100)
454 (font-encoding . fetaDynamic)
455 (font-shape . italic)
456 (self-alignment-Y . 0)
457 (meta . ((class . Item)
458 (interfaces . (font-interface text-interface self-alignment-interface
459 dynamic-interface script-interface))))
463 . ((print-function . ,Dynamic_text_spanner::print)
465 ;; rather ugh with NCSB
466 ; (font-series . bold)
467 (font-shape . italic)
468 (style . dashed-line)
470 ; need to blend with dynamic texts.
472 (bound-padding . 0.75)
473 (dash-fraction . 0.2)
475 (meta . ((class . Spanner)
476 (interfaces . (font-interface
478 dynamic-interface dynamic-text-spanner-interface
479 spanner-interface))))
485 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
486 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
487 (staff-padding . 0.1)
489 (minimum-space . 1.2)
492 (meta . ((class . Spanner)
493 (interfaces . (dynamic-interface axis-group-interface
494 side-position-interface))))))
498 (print-function . ,Text_interface::print)
500 ; sync with TextScript (?)
502 (staff-padding . 0.5)
503 (self-alignment-X . 0)
504 (self-alignment-Y . 0)
505 (script-priority . 100)
506 (font-encoding . fetaNumber)
507 (font-size . -5) ; don't overlap when next to heads.
508 (meta . ((class . Item)
509 (interfaces . (finger-interface
510 font-interface text-script-interface text-interface
511 side-position-interface self-alignment-interface
518 (zigzag-width . 0.75)
520 (X-extent-callback . #f)
521 (Y-extent-callback . #f)
522 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
523 (print-function . ,Line_spanner::print)
524 (meta . ((class . Spanner)
525 (interfaces . (line-interface line-spanner-interface))))
532 (meta . ((class . Item)
533 (interfaces . (grid-point-interface))))
538 (print-function . ,Grid_line_interface::print)
539 (X-extent-callback . ,Grid_line_interface::width_callback)
540 (self-alignment-X . ,CENTER)
541 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
542 ,Self_alignment_interface::centered_on_parent))
544 (meta . ((class . Item)
545 (interfaces . (self-alignment-interface grid-line-interface)))
550 (print-function . ,Hairpin::print)
551 (after-line-breaking-callback . ,Hairpin::after_line_breaking)
554 (spacing-procedure . ,Spanner::set_spacing_rods)
555 (minimum-length . 2.0)
556 (bound-padding . 1.0)
557 (self-alignment-Y . 0)
558 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
559 (meta . ((class . Spanner)
560 (interfaces . (hairpin-interface
561 line-interface self-alignment-interface dynamic-interface
562 spanner-interface))))
568 (print-function . ,Horizontal_bracket::print)
569 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
571 (staff-padding . 0.2)
573 (bracket-flare . (0.5 . 0.5))
574 (meta . ((class . Spanner)
575 (interfaces . (horizontal-bracket-interface
576 side-position-interface
578 spanner-interface))))
583 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
584 ,Side_position_interface::aligned_on_support_refpoints))
585 ;; This direction is for aligned_on_support_refpoints
589 (left-edge . (extra-space . 1.0))
592 (self-alignment-Y . 0)
593 (print-function . ,Text_interface::print)
594 (break-align-symbol . instrument-name)
595 (break-visibility . ,begin-of-line-visible)
597 (meta . ((class . Item)
598 (interfaces . (font-interface
599 self-alignment-interface side-position-interface text-interface
600 break-aligned-interface ))))
605 (print-function . ,Key_signature_interface::print)
607 (time-signature . (extra-space . 1.25))
608 (staff-bar . (extra-space . 0.6))
609 (key-signature . (extra-space . 0.5))
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-cancellation)
615 (break-visibility . ,begin-of-line-invisible)
618 (meta . ((class . Item)
619 (interfaces . (key-signature-interface font-interface
620 break-aligned-interface ))))
624 (print-function . ,Key_signature_interface::print)
626 (time-signature . (extra-space . 1.25))
627 (staff-bar . (extra-space . 1.1))
628 (right-edge . (extra-space . 0.5))
629 (first-note . (fixed-space . 2.5))
631 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
632 (break-align-symbol . key-signature)
633 (break-visibility . ,begin-of-line-visible)
636 (meta . ((class . Item)
637 (interfaces . (key-signature-interface font-interface
638 break-aligned-interface ))))
642 (print-function . ,Ledger_line_spanner::print)
643 (X-extent-callback . #f)
644 (Y-extent-callback . #f)
645 (minimum-length-fraction . 0.25)
646 (length-fraction . 0.25)
647 (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
648 (print-function . ,Ledger_line_spanner::print)
650 (meta . ((class . Spanner)
651 (interfaces . (ledger-line-interface))))
656 (break-align-symbol . left-edge)
659 (break-visibility . ,center-invisible)
661 (custos . (extra-space . 0.0))
662 (ambitus . (extra-space . 2.0))
663 (time-signature . (extra-space . 0.0))
664 (staff-bar . (extra-space . 0.0))
665 (breathing-sign . (minimum-space . 0.0))
666 (clef . (extra-space . 0.8))
667 (first-note . (fixed-space . 1.0))
668 (right-edge . (extra-space . 0.0))
669 (key-signature . (extra-space . 0.0))
670 (key-cancellation . (extra-space . 0.0))
673 (meta . ((class . Item)
674 (interfaces . (break-aligned-interface ))))
679 (ligature-primitive-callback . ,Note_head::print)
684 (edge-height . (0.7 . 0.7))
685 (shorten-pair . (-0.2 . -0.2))
686 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
687 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
688 (print-function . ,Tuplet_bracket::print)
689 (meta . ((class . Spanner)
690 (interfaces . (tuplet-bracket-interface line-interface))))
699 (minimum-length . 0.3)
701 ; (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
702 (print-function . ,Hyphen_spanner::print)
704 (meta . ((class . Spanner)
705 (interfaces . (lyric-interface lyric-hyphen-interface
706 spanner-interface))))
711 (print-function . ,Lyric_extender::print)
712 (thickness . 0.8) ; linethickness
713 (minimum-length . 1.5)
715 (meta . ((class . Spanner)
716 (interfaces . (lyric-interface
717 lyric-extender-interface))))
721 . ((print-function . ,Text_interface::print)
722 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
723 (self-alignment-X . 0)
725 (font-series . bold-narrow)
727 (meta . ((class . Item)
728 (interfaces . (rhythmic-grob-interface
729 lyric-syllable-interface
730 self-alignment-interface text-interface
738 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
739 (print-function . ,Mensural_ligature::print)
740 (meta . ((class . Spanner)
741 (interfaces . (mensural-ligature-interface font-interface))))
746 (print-function . ,Text_interface::print)
747 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
750 (meta . ((class . Item)
751 (interfaces . (text-interface
752 side-position-interface font-interface
753 metronome-mark-interface))))
757 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
758 (print-function . ,Measure_grouping::print)
764 (meta . ((class . Spanner)
765 (interfaces . (side-position-interface
766 measure-grouping-interface))))
770 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
771 (print-function . ,Multi_measure_rest::print)
772 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
775 (thick-thickness . 6.6)
776 (hair-thickness . 2.0)
778 (meta . ((class . Spanner)
779 (interfaces . (multi-measure-rest-interface
780 multi-measure-interface rest-interface
781 font-interface staff-symbol-referencer-interface))))
784 (MultiMeasureRestNumber
786 (print-function . ,Text_interface::print)
787 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
788 ,Self_alignment_interface::centered_on_other_axis_parent))
789 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
790 (self-alignment-X . 0)
793 (staff-padding . 0.4)
794 (font-encoding . fetaNumber)
795 (meta . ((class . Spanner)
796 (interfaces . (side-position-interface
797 multi-measure-interface self-alignment-interface
798 font-interface text-interface))))
800 (MultiMeasureRestText
802 (print-function . ,Text_interface::print)
803 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
804 ,Self_alignment_interface::centered_on_other_axis_parent))
805 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
806 (self-alignment-X . 0)
809 (staff-padding . 0.25)
810 (meta . ((class . Spanner)
811 (interfaces . (side-position-interface
812 multi-measure-interface self-alignment-interface font-interface
819 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
820 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
821 (meta . ((class . Item)
822 (interfaces . (note-collision-interface axis-group-interface ))))
828 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
829 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
830 (meta . ((class . Item)
831 (interfaces . (axis-group-interface note-column-interface ))))
836 (print-function . ,Note_head::print)
837 (ligature-primitive-callback . ,Note_head::print)
838 (glyph-name-procedure . ,find-notehead-symbol)
839 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
840 (stem-attachment-function . ,note-head-style->attachment-coordinates)
841 (meta . ((class . Item)
842 (interfaces . (rhythmic-grob-interface
843 rhythmic-head-interface font-interface note-head-interface
845 staff-symbol-referencer-interface ))))
850 (stem-spacing-correction . 0.5)
851 (same-direction-correction . 0.25)
852 ;; Changed this from 0.75.
853 ;; If you ever change this back, please document! --hwn
854 (knee-spacing-correction . 1.0)
856 (meta . ((class . Item)
857 (interfaces . (spacing-interface note-spacing-interface ))))
863 (print-function . ,Text_interface::print)
864 (meta . ((class . Item)
865 (interfaces . (note-name-interface
866 text-interface font-interface ))))
871 (self-alignment-X . 0)
872 (break-visibility . ,begin-of-line-visible)
873 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
874 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
875 (print-function . ,Text_interface::print)
877 ;; no Y dimensions, because of lyrics under tenor clef.
879 (font-shape . italic)
881 (staff-padding . 0.2)
883 (meta . ((class . Item)
884 (interfaces . (text-interface self-alignment-interface
885 side-position-interface font-interface ))))
890 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
891 (print-function . ,Ottava_bracket::print)
892 (font-shape . italic)
893 (shorten-pair . (0.0 . -0.6))
894 (staff-padding . 1.0)
896 (minimum-length . 1.0)
897 (dash-fraction . 0.3)
898 (edge-height . (0 . 1.2))
900 (meta . ((class . Spanner)
901 (interfaces . (ottava-bracket-interface
902 line-interface side-position-interface
903 font-interface text-interface))))
909 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
910 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
913 ;; (print-function . ,Paper_column::print) (font-size . -6) (font-name . "sans") (Y-extent-callback . #f)
914 (meta . ((class . Paper_column)
915 (interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface ))))
919 . ((slur-details . ,default-slur-details)
920 (print-function . ,Slur::print)
922 (spacing-procedure . ,Spanner::set_spacing_rods)
923 (minimum-length . 1.5)
924 (after-line-breaking-callback . ,Slur::after_line_breaking)
925 (Y-extent-callback . ,Slur::height)
928 (meta . ((class . Spanner)
929 (interfaces . (slur-interface))))
932 (NonMusicalPaperColumn
935 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
936 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
939 ;; debugging stuff: print column number.
940 ;; (print-function . ,Paper_column::print) (font-size . -6) (font-name . "sans") (Y-extent-callback . #f)
943 (meta . ((class . Paper_column)
944 (interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface ))))
949 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
950 (print-function . ,Multi_measure_rest::percent)
953 (font-encoding . fetaMusic)
954 (meta . ((class . Spanner)
955 (interfaces . (multi-measure-rest-interface
956 font-interface percent-repeat-interface))))
959 ;; an example of a text spanner
962 (print-function . ,Piano_pedal_bracket::print)
964 (bound-padding . 1.0)
966 (bracket-flare . (0.5 . 0.5))
967 (edge-height . (1.0 . 1.0))
968 (shorten-pair . (0.0 . 0.0))
970 (meta . ((class . Spanner)
971 (interfaces . (line-interface
972 piano-pedal-interface piano-pedal-bracket-interface))))
977 (print-function . ,Text_interface::print)
978 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
979 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
980 (after-line-breaking-callback . ,shift-right-at-line-begin)
981 (self-alignment-X . 0)
986 (break-visibility . ,end-of-line-invisible)
988 (meta . ((class . Item)
989 (interfaces . (text-interface
990 side-position-interface font-interface mark-interface
991 self-alignment-interface ))))
995 (RemoveEmptyVerticalGroup
997 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
998 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
1000 (meta . ((class . Spanner)
1001 (interfaces . (axis-group-interface
1002 vertically-spaceable-interface hara-kiri-group-interface
1003 spanner-interface))))
1008 (print-function . ,Percent_repeat_item_interface::beat_slash)
1011 (meta . ((class . Item)
1012 (interfaces . (percent-repeat-interface ))))
1016 (after-line-breaking-callback . ,Rest::after_line_breaking)
1017 (X-extent-callback . ,Rest::extent_callback)
1018 (Y-extent-callback . ,Rest::extent_callback)
1019 (print-function . ,Rest::print)
1020 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
1021 ,Rest::polyphonic_offset_callback
1023 (minimum-distance . 0.25)
1024 (meta . ((class . Item)
1025 (interfaces . (font-interface
1026 rhythmic-head-interface
1027 rhythmic-grob-interface
1028 staff-symbol-referencer-interface
1034 (minimum-distance . 0.75)
1035 (meta . ((class . Item)
1036 (interfaces . (rest-collision-interface ))))
1041 ;; don't set direction here: it breaks staccato.
1042 (print-function . ,Script_interface::print)
1044 ;; This value is sensitive: if too large, staccato dots will move a
1047 (staff-padding . 0.25)
1048 ;; (script-priority . 0) priorities for scripts, see script.scm
1049 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
1050 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
1051 (font-encoding . fetaMusic)
1052 (meta . ((class . Item)
1053 (interfaces . (script-interface
1054 side-position-interface font-interface ))))
1059 (before-line-breaking-callback . ,Script_column::before_line_breaking)
1060 (meta . ((class . Item)
1061 (interfaces . (script-column-interface ))))
1067 (X-extent-callback . #f)
1068 (Y-extent-callback . #f)
1069 (meta . ((class . Item)
1070 (interfaces . (spacing-interface separation-item-interface ))))
1073 (SeparatingGroupSpanner
1075 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1076 (meta . ((class . Spanner)
1077 (interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface))))
1081 . ((slur-details . ,default-slur-details)
1082 (print-function . ,Slur::print)
1084 (spacing-procedure . ,Spanner::set_spacing_rods)
1085 (minimum-length . 1.5)
1086 (after-line-breaking-callback . ,Slur::after_line_breaking)
1087 (Y-extent-callback . ,Slur::height)
1089 (height-limit . 2.0)
1091 (meta . ((class . Spanner)
1092 (interfaces . (slur-interface))))
1097 (spacing-procedure . ,Spacing_spanner::set_springs)
1098 (grace-space-factor . 0.6)
1099 (shortest-duration-space . 2.0)
1100 (spacing-increment . 1.2)
1101 (base-shortest-duration . ,(ly:make-moment 3 16))
1102 (meta . ((class . Spanner)
1103 (interfaces . (spacing-interface spacing-spanner-interface))))
1108 (break-align-symbol . staff-bar)
1109 (bar-size-procedure . ,Span_bar::get_bar_size)
1110 (print-function . ,Span_bar::print)
1111 (X-extent-callback . ,Span_bar::width_callback)
1112 (Y-extent-callback . ())
1115 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
1119 ;; Ross. page 151 lists other values, we opt for a leaner look
1123 (hair-thickness . 1.6)
1124 (thick-thickness . 6.0)
1125 (meta . ((class . Item)
1126 (interfaces . (span-bar-interface font-interface
1127 bar-line-interface ))))
1131 . ((print-function . ,Text_interface::print)
1132 (font-series . bold)
1134 (X-offset-callbacks . (,Side_position_interface::aligned_side))
1136 (meta . ((class . Item)
1137 (interfaces . (side-position-interface
1138 stanza-number-interface text-interface font-interface ))))
1143 (print-function . ,print-circled-text-callback)
1145 (staff-padding . 0.5)
1146 (self-alignment-X . 0)
1147 (self-alignment-Y . 0)
1148 (script-priority . 100)
1149 (font-encoding . fetaNumber)
1150 (font-size . -5) ; don't overlap when next to heads.
1151 (meta . ((class . Item)
1152 (interfaces . (string-number-interface
1153 font-interface text-script-interface text-interface
1154 side-position-interface self-alignment-interface
1161 (stem-spacing-correction . 0.4)
1163 (meta . ((class . Item)
1164 (interfaces . (spacing-interface staff-spacing-interface ))))
1169 (print-function . ,Text_interface::print)
1171 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1172 (no-spacing-rods . #t)
1173 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1174 (font-shape . italic)
1175 (self-alignment-X . 0)
1176 (meta . ((class . Item)
1177 (interfaces . (text-interface
1178 self-alignment-interface font-interface))))
1181 (SostenutoPedalLineSpanner
1184 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1185 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1189 (minimum-space . 1.0)
1191 (meta . ((class . Spanner)
1192 (interfaces . (piano-pedal-interface
1193 axis-group-interface side-position-interface))))
1198 (print-function . ,Staff_symbol::print)
1200 (ledger-line-thickness . (1.0 . 0.1))
1202 (meta . ((class . Spanner)
1203 (interfaces . (staff-symbol-interface))))
1208 ;; this list is rather long. Trim --hwn
1209 (before-line-breaking-callback . ,Stem::before_line_breaking)
1210 (print-function . ,Stem::print)
1213 ;; 3.5 (or 3 measured from note head) is standard length
1214 ;; 32nd, 64th flagged stems should be longer
1215 (lengths . (3.5 3.5 3.5 4.5 5.0))
1217 ;; Stems in unnatural (forced) direction should be shortened by
1218 ;; one staff space, according to [Roush & Gourlay].
1219 ;; Flagged stems we shorten only half a staff space.
1220 (stem-shorten . (1.0 0.5))
1222 ;; default stem direction for note on middle line
1223 (neutral-direction . -1)
1227 ;; FIXME. 3.5 yields too long beams (according to Ross and
1228 ;; looking at Baerenreiter examples) for a number of common
1229 ;; boundary cases. Subtracting half a beam thickness fixes
1230 ;; this, but the bug may well be somewhere else.
1232 ;; FIXME this should come from 'lengths
1234 (beamed-lengths . (3.26 3.5 3.6))
1236 ;; We use the normal minima as minimum for the ideal lengths,
1237 ;; and the extreme minima as abolute minimum length.
1239 ;; The 'normal' minima
1240 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1241 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1243 ;; The 'extreme case' minima
1244 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1246 (X-offset-callbacks . (,Stem::offset_callback))
1247 (X-extent-callback . ,Stem::width_callback)
1248 (Y-extent-callback . ,Stem::height)
1249 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1250 (meta . ((class . Item)
1251 (interfaces . (stem-interface font-interface ))))
1256 (print-function . ,Stem_tremolo::print)
1257 (Y-extent-callback . ,Stem_tremolo::height)
1258 (X-extent-callback . #f)
1260 (beam-width . 1.6) ; staff-space
1261 (beam-thickness . 0.48) ; staff-space
1262 (meta . ((class . Item)
1263 (interfaces . (stem-tremolo-interface ))))
1268 (no-spacing-rods . #t)
1269 (print-function . ,Sustain_pedal::print)
1270 (self-alignment-X . 0)
1272 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1273 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1274 (meta . ((class . Item)
1275 (interfaces . (piano-pedal-interface
1276 text-spanner-interface text-interface self-alignment-interface
1280 (SustainPedalLineSpanner
1283 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1284 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1287 (staff-padding . 1.2)
1288 (minimum-space . 1.0)
1290 (meta . ((class . Spanner)
1291 (interfaces . (piano-pedal-interface
1292 axis-group-interface side-position-interface))))
1298 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1299 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1300 (meta . ((class . System)
1301 (interfaces . (system-interface axis-group-interface))))
1307 (print-function . ,System_start_delimiter::print)
1308 (collapse-height . 5.0)
1309 (font-encoding . fetaBraces)
1310 (Y-extent-callback . #f)
1311 (meta . ((class . Spanner)
1312 (interfaces . (system-start-delimiter-interface font-interface))))
1317 (Y-extent-callback . #f)
1318 (X-offset-callbacks . (,(lambda (g a) -0.8)))
1319 (print-function . ,System_start_delimiter::print)
1321 (collapse-height . 1)
1323 (meta . ((class . Spanner)
1324 (interfaces . (font-interface system-start-delimiter-interface
1330 (Y-extent-callback . #f)
1331 (print-function . ,System_start_delimiter::print)
1332 (glyph . "bar-line")
1334 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1335 (meta . ((class . Spanner)
1336 (interfaces . (system-start-delimiter-interface))))
1342 (print-function . ,Text_interface::print)
1343 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1345 (stem-attachment-function . ,tablature-stem-attachment-function)
1346 (font-series . bold)
1347 (meta . ((class . Item)
1349 . (rhythmic-head-interface
1351 note-head-interface staff-symbol-referencer-interface
1358 (print-function . ,Text_interface::print)
1359 (no-spacing-rods . #t)
1360 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1363 ; sync with Fingering ?
1365 (staff-padding . 0.5)
1366 (script-priority . 200)
1367 ;; todo: add X self alignment?
1368 (meta . ((class . Item)
1369 (interfaces . (text-script-interface
1370 text-interface side-position-interface font-interface
1376 (print-function . ,Text_spanner::print)
1377 (font-shape . italic)
1378 (style . dashed-line)
1379 (staff-padding . 0.8)
1380 (dash-fraction . 0.2)
1383 (meta . ((class . Spanner)
1384 (interfaces . (text-spanner-interface
1385 side-position-interface font-interface))))
1391 (print-function . ,Tie::print)
1392 (spacing-procedure . ,Spanner::set_spacing_rods)
1393 (staffline-clearance . 0.35)
1394 (details . ((ratio . 0.333) (height-limit . 1.0)))
1398 (minimum-length . 2.5)
1399 (meta . ((class . Spanner)
1400 (interfaces . (tie-interface))))
1405 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1406 (before-line-breaking-callback . ,Tie_column::before_line_breaking)
1407 (X-extent-callback . #f)
1408 (Y-extent-callback . #f)
1409 (meta . ((class . Spanner)
1410 (interfaces . (tie-column-interface))))
1415 (print-function . ,Time_signature::print)
1416 (break-align-symbol . time-signature)
1417 (break-visibility . ,all-visible)
1419 (first-note . (fixed-space . 2.0))
1420 (right-edge . (extra-space . 0.5))
1421 (staff-bar . (minimum-space . 2.0))
1425 (meta . ((class . Item)
1426 (interfaces . (time-signature-interface break-aligned-interface font-interface ))))
1432 (print-function . ,Dynamic_text_spanner::print)
1433 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1436 (staff-padding . 1.0)
1439 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1440 (meta . ((class . Spanner)
1441 (interfaces . (text-spanner-interface side-position-interface font-interface))))
1444 (TrillPitchAccidental
1445 . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1449 (print-function . ,Accidental_interface::print)
1450 (meta . ((class . Item)
1451 (interfaces . (item-interface
1452 accidental-interface
1453 side-position-interface font-interface))))
1457 . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1460 (print-function . ,parenthesize-elements)
1461 (direction . ,RIGHT)
1463 (meta . ((class . Item)
1464 (interfaces . (side-position-interface
1465 note-head-interface rhythmic-head-interface
1466 font-interface accidental-interface
1467 axis-group-interface))))
1471 . ((print-function . ,Note_head::print)
1473 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1475 (meta . ((class . Item)
1476 (interfaces . (item-interface
1477 rhythmic-head-interface
1478 font-interface pitched-trill-interface
1479 ledgered-interface staff-symbol-referencer-interface))))
1486 (edge-height . (0.7 . 0.7))
1487 (shorten-pair . (-0.2 . -0.2))
1488 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1489 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1490 (print-function . ,Tuplet_bracket::print)
1491 (font-shape . italic)
1494 (meta . ((class . Spanner)
1495 (interfaces . (text-interface line-interface
1496 tuplet-bracket-interface
1502 (print-function . ,Text_interface::print)
1503 (font-shape . italic)
1504 (no-spacing-rods . #t)
1505 (self-alignment-X . 0)
1507 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1508 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1509 (meta . ((class . Item)
1510 (interfaces . (text-interface self-alignment-interface font-interface ))))
1513 (UnaCordaPedalLineSpanner
1516 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1517 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1519 (staff-padding . 1.2)
1520 (minimum-space . 1.0)
1522 (meta . ((class . Spanner)
1523 (interfaces . (piano-pedal-interface axis-group-interface side-position-interface))))
1530 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1531 (print-function . ,Vaticana_ligature::print)
1532 (meta . ((class . Spanner)
1533 (interfaces . (vaticana-ligature-interface font-interface))))
1540 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1541 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1543 (meta . ((class . Spanner)
1544 (interfaces . (align-interface axis-group-interface))))
1550 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1551 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1553 (meta . ((class . Spanner)
1554 (interfaces . (axis-group-interface
1555 vertically-spaceable-interface))))
1561 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
1563 (space-alist . ((left-edge . (extra-space . 1.0))
1565 (break-align-symbol . instrument-name)
1566 (print-function . ,Text_interface::print)
1567 (break-align-symbol . clef)
1568 (break-visibility . ,begin-of-line-visible)
1570 (meta . ((class . Item)
1571 (interfaces . (font-interface
1572 self-alignment-interface
1573 side-position-interface text-interface
1574 break-aligned-interface))))
1579 (print-function . ,Volta_bracket_interface::print)
1582 (font-encoding . fetaNumber)
1583 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1584 (thickness . 1.6) ;; linethickness
1585 (height . 2.0) ;; staffspace;
1588 (meta . ((class . Spanner)
1589 (interfaces . (volta-bracket-interface
1590 line-interface text-interface
1591 side-position-interface font-interface))))
1600 (X-extent-callback . #f)
1601 (Y-extent-callback . #f)
1602 (print-function . ,Line_spanner::print)
1603 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
1604 (meta . ((class . Spanner)
1605 (interfaces . (line-spanner-interface line-interface))))
1609 (define (completize-grob-entry x)
1610 "transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc.
1612 ;; (display (car x))
1614 (let* ((name-sym (car x))
1615 (grob-entry (cdr x))
1616 (meta-entry (cdr (assoc 'meta grob-entry)))
1617 (class (cdr (assoc 'class meta-entry)))
1619 (cdr (assoc 'interfaces meta-entry)))
1624 (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1625 ((eq? 'Spanner class)
1626 (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1627 ((eq? 'Paper_column class)
1628 (set! ifaces-entry (cons 'item-interface
1629 (cons 'paper-column-interface ifaces-entry))))
1630 ((eq? 'System class)
1631 (set! ifaces-entry (cons 'system-interface
1632 (cons 'spanner-interface ifaces-entry))))
1634 (ly:warning "Unknown class ~a" class)))
1637 (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1639 (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1640 (set! meta-entry (assoc-set! meta-entry 'interfaces
1642 (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1643 (cons name-sym grob-entry)))
1645 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1648 ;; (display (map pair? all-grob-descriptions))
1650 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1653 ;; (display (car x)) (newline)
1655 (set-object-property! (car x) 'translation-type? list?)
1656 (set-object-property! (car x) 'is-grob? #t))
1657 all-grob-descriptions)
1659 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))