1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;;; distances are given in linethickness (thicknesses) and
9 ;;;; staffspace (distances)
11 ;;;; WARNING: the meta field should be the last one.
12 ;;;; WARNING: don't use anonymous functions for initialization.
14 ;; TODO: junk the meta field in favor of something more compact?
15 (define-public all-grob-descriptions
19 (print-function . ,Accidental_interface::print)
21 (cautionary-style . parentheses)
22 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface
27 . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
30 ;; this is quite small, but it is very ugly to have
31 ;; accs closer to the previous note than to the next one.
32 (right-padding . 0.15)
33 (meta . ((interfaces . (item-interface accidental-placement-interface))))
38 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
39 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
41 (clef . (extra-space . 0.5))
42 (key-signature . (extra-space . 0.0))
43 (staff-bar . (extra-space . 0.0))
44 (time-signature . (extra-space . 0.0))
45 (first-note . (fixed-space . 0.0))
48 (break-align-symbol . ambitus)
49 (break-visibility . ,begin-of-line-visible)
50 (meta . ((interfaces . (axis-group-interface break-aligned-interface ambitus-interface item-interface))))
55 (print-function . ,Ambitus::print)
58 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
60 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
64 (print-function . ,Accidental_interface::print)
67 (X-offset-callbacks . (,Side_position_interface::aligned_side))
69 (cautionary-style . parentheses)
70 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface break-aligned-interface side-position-interface font-interface))))
77 (print-function . ,Note_head::print)
78 (glyph-name-procedure . ,find-notehead-symbol)
79 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
80 (meta . ((interfaces . (font-interface note-head-interface
82 staff-symbol-referencer-interface
83 rhythmic-head-interface
90 (X-extent-callback . ,Arpeggio::width_callback)
91 (Y-extent-callback . #f)
92 (print-function . ,Arpeggio::print)
93 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
94 (X-offset-callbacks . (,Side_position_interface::aligned_side))
97 (staff-position . 0.0)
98 (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
103 (break-align-symbol . staff-bar)
105 (break-glyph-function . ,default-break-barline)
106 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
107 (print-function . ,Bar_line::print)
108 (break-visibility . ,all-visible)
110 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
112 (time-signature . (extra-space . 0.75))
113 (custos . (minimum-space . 2.0))
114 (clef . (minimum-space . 1.0))
115 (key-signature . (extra-space . 1.0))
116 (key-cancellation . (extra-space . 1.0))
117 (first-note . (fixed-space . 1.3))
118 (next-note . (semi-fixed-space . 1.3))
119 (right-edge . (extra-space . 0.0))
123 ;; Ross. page 151 lists other values, we opt for a leaner look
126 ;; kern should scale with linethickness too.
129 (hair-thickness . 1.9)
130 (thick-thickness . 6.0)
131 (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
137 (print-function . ,Text_interface::print)
139 (break-visibility . ,begin-of-line-visible)
142 (font-family . roman)
144 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
145 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
146 (self-alignment-X . 1)
148 ;; hmm. why did we do this: ?
149 (extra-offset . (1.3 . 0))
151 ((interfaces . (side-position-interface
153 self-alignment-interface
154 font-interface item-interface break-aligned-interface))))
160 (print-function . ,Text_interface::print)
161 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
163 (font-family . number)
165 ;; We must do this, other BFs in
166 ;; layout16 become too small.
169 (meta . ((interfaces . (text-interface rhythmic-grob-interface
170 bass-figure-interface item-interface
171 self-alignment-interface font-interface))))
175 ;; todo: clean this up a bit: the list is getting
177 (print-function . ,Beam::print)
179 (positions . (#f . #f))
180 (position-callbacks . (,Beam::least_squares
183 ,Beam::shift_region_to_valid
187 ;; TODO: should be in SLT.
188 (thickness . 0.48) ; in staff-space
189 (before-line-breaking-callback . ,Beam::before_line_breaking)
190 (after-line-breaking-callback . ,Beam::after_line_breaking)
191 (neutral-direction . -1)
192 (dir-function . ,beam-dir-majority-median)
194 ;; Whe have some unreferenced problems here.
196 ;; If we shorten beamed stems less than normal stems (1 staffspace),
197 ;; or high order less than 8th beams, patterns like
198 ;; c''4 [c''8 c''] c''4 [c''16 c]
199 ;; are ugly (different stem lengths).
201 ;; But if we shorten 16th beams as much as 8th beams, a single
202 ;; forced 16th beam looks *very* short.
204 ;; We choose to shorten 8th beams the same as single stems,
205 ;; and high order beams less than 8th beams, so that all
206 ;; isolated shortened beams look nice and a bit shortened,
207 ;; sadly possibly breaking patterns with high order beams.
208 (beamed-stem-shorten . (1.0 0.5 0.25))
210 (flag-width-function . ,beam-flag-width-function)
212 (auto-knee-gap . 5.5)
214 ;; only for debugging.
215 (font-family . roman)
217 (space-function . ,Beam::space_function)
218 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
225 (break-align-orders . #(; end-of-line:
227 left-edge ambitus breathing-sign
228 clef staff-bar key-cancellation key-signature
229 time-signature custos)
232 (instrument-name left-edge ambitus breathing-sign
233 clef staff-bar key-cancellation key-signature
235 time-signature custos)
237 (instrument-name left-edge ambitus breathing-sign
238 clef key-cancellation key-signature staff-bar
239 time-signature custos)
243 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
244 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
250 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
251 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
252 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
257 (break-align-symbol . breathing-sign)
260 (ambitus . (extra-space . 2.0))
261 (custos . (minimum-space . 1.0))
262 (key-signature . (minimum-space . 1.5))
263 (staff-bar . (minimum-space . 1.5))
264 (clef . (minimum-space . 2.0))
265 (first-note . (fixed-space . 1.0)) ;huh?
266 (right-edge . (extra-space . 0.1))
268 (print-function . ,Text_interface::print)
269 (text . ,(make-musicglyph-markup "scripts.rcomma"))
270 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
271 (break-visibility . ,begin-of-line-invisible)
272 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
277 (print-function . ,Clef::print)
278 (before-line-breaking-callback . ,Clef::before_line_breaking)
280 (font-family . music)
281 (break-align-symbol . clef)
282 (break-visibility . ,begin-of-line-visible)
283 (space-alist . ((ambitus . (extra-space . 2.0))
284 (staff-bar . (extra-space . 0.7))
285 (key-cancellation . (minimum-space . 4.0))
286 (key-signature . (minimum-space . 4.0))
287 (time-signature . (minimum-space . 4.2))
288 (first-note . (minimum-fixed-space . 5.0))
289 (next-note . (extra-space . 0.5))
290 (right-edge . (extra-space . 0.5))
292 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
293 (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
296 (ClusterSpannerBeacon
298 (print-function . #f)
299 (Y-extent-callback . ,Cluster_beacon::height)
300 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
305 (print-function . ,Cluster::print)
306 (spacing-procedure . ,Spanner::set_spacing_rods)
307 (minimum-length . 0.0)
310 (meta . ((interfaces . (cluster-interface spanner-interface))))
315 (print-function . ,Text_interface::print)
316 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
320 (meta . ((interfaces . (font-interface rhythmic-grob-interface
321 text-interface chord-name-interface item-interface ))))
326 (break-align-symbol . custos)
328 (print-function . ,Custos::print)
329 (break-visibility . ,end-of-line-visible)
331 (neutral-direction . -1)
332 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
334 (first-note . (minimum-fixed-space . 0.0))
335 (right-edge . (extra-space . 0.1))
338 . (custos-interface staff-symbol-referencer-interface
340 break-aligned-interface item-interface ))))
348 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
349 (X-offset-callbacks . (,Dot_column::side_position))
350 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
355 (print-function . ,Dots::print)
357 (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
362 (print-function . ,Percent_repeat_item_interface::double_percent)
365 (font-encoding . fetaMusic)
368 (break-align-symbol . staff-bar)
369 (break-visibility . ,begin-of-line-invisible)
370 (meta . ((interfaces . (font-interface
371 break-aligned-interface
372 percent-repeat-interface item-interface ))))
376 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
377 (print-function . ,Text_interface::print)
378 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
379 ,Self_alignment_interface::centered_on_parent))
380 (self-alignment-X . 0)
381 (no-spacing-rods . #t)
382 (script-priority . 100)
384 (font-encoding . fetaDynamic)
385 (font-shape . italic)
386 (self-alignment-Y . 0)
387 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
388 dynamic-interface script-interface item-interface))))
391 . ((print-function . ,Dynamic_text_spanner::print)
393 (font-shape . italic)
394 (style . dashed-line)
396 ; need to blend with dynamic texts.
398 (bound-padding . 0.75)
399 (dash-fraction . 0.2)
401 (meta . ((interfaces . (font-interface
403 dynamic-interface dynamic-text-spanner-interface
410 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
411 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
412 (staff-padding . 0.1)
414 (minimum-space . 1.2)
417 (meta . ((interfaces . (dynamic-interface axis-group-interface
418 side-position-interface spanner-interface))))))
422 (break-align-symbol . left-edge)
426 (custos . (extra-space . 0.0))
427 (ambitus . (extra-space . 2.0))
428 (time-signature . (extra-space . 0.0))
429 (staff-bar . (extra-space . 0.0))
430 (breathing-sign . (minimum-space . 0.0))
431 (clef . (extra-space . 0.85))
432 (first-note . (fixed-space . 1.0))
433 (right-edge . (extra-space . 0.0))
434 (key-signature . (extra-space . 0.0))
435 (key-cancellation . (extra-space . 0.0))
438 (meta . ((interfaces . (break-aligned-interface item-interface ))))
443 (print-function . ,Text_interface::print)
445 ; sync with TextScript (?)
447 (staff-padding . 0.5)
448 (self-alignment-X . 0)
449 (self-alignment-Y . 0)
450 (script-priority . 100)
451 (font-encoding . fetaNumber)
452 (font-size . -5) ; don't overlap when next to heads.
453 (meta . ((interfaces . (finger-interface
454 font-interface text-script-interface text-interface
455 side-position-interface self-alignment-interface
463 (zigzag-width . 0.75)
465 (X-extent-callback . #f)
466 (Y-extent-callback . #f)
467 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
468 (print-function . ,Line_spanner::print)
469 (meta . ((interfaces . (line-interface line-spanner-interface spanner-interface))))
474 (print-function . ,Hairpin::print)
477 (spacing-procedure . ,Spanner::set_spacing_rods)
478 (minimum-length . 2.0)
479 (bound-padding . 1.0)
480 (self-alignment-Y . 0)
481 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
482 (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
488 (print-function . ,Horizontal_bracket::print)
489 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
492 (bracket-flare . (0.5 . 0.5))
493 (meta . ((interfaces . (horizontal-bracket-interface
494 side-position-interface
496 spanner-interface))))
501 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
502 ,Side_position_interface::aligned_on_support_refpoints))
503 ;; This direction is for aligned_on_support_refpoints
507 (left-edge . (extra-space . 1.0))
510 (self-alignment-Y . 0)
511 (print-function . ,Text_interface::print)
512 (break-align-symbol . instrument-name)
513 (break-visibility . ,begin-of-line-visible)
515 (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
521 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
523 (space-alist . ((left-edge . (extra-space . 1.0))
525 (break-align-symbol . instrument-name)
526 (print-function . ,Text_interface::print)
527 (break-align-symbol . clef)
528 (break-visibility . ,begin-of-line-visible)
530 (meta . ((interfaces . (font-interface
531 self-alignment-interface
532 side-position-interface text-interface
533 break-aligned-interface item-interface ))))
537 (print-function . ,Key_signature_interface::print)
539 (time-signature . (extra-space . 1.25))
540 (staff-bar . (extra-space . 0.6))
541 (key-signature . (extra-space . 0.5))
542 (right-edge . (extra-space . 0.5))
543 (first-note . (fixed-space . 2.5))
545 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
546 (break-align-symbol . key-cancellation)
547 (break-visibility . ,begin-of-line-invisible)
550 (meta . ((interfaces . (key-signature-interface font-interface
551 break-aligned-interface item-interface ))))
555 (print-function . ,Key_signature_interface::print)
557 (time-signature . (extra-space . 1.25))
558 (staff-bar . (extra-space . 1.1))
559 (right-edge . (extra-space . 0.5))
560 (first-note . (fixed-space . 2.5))
562 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
563 (break-align-symbol . key-signature)
564 (break-visibility . ,begin-of-line-visible)
567 (meta . ((interfaces . (key-signature-interface font-interface
568 break-aligned-interface item-interface ))))
572 (print-function . ,Ledger_line_spanner::print)
573 (X-extent-callback . #f)
574 (Y-extent-callback . #f)
575 (print-function . ,Ledger_line_spanner::print)
576 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
581 (ligature-primitive-callback . ,Note_head::print)
586 (edge-height . (0.7 . 0.7))
587 (shorten-pair . (-0.2 . -0.2))
588 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
589 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
590 (print-function . ,Tuplet_bracket::print)
591 (meta . ((interfaces . (tuplet-bracket-interface line-interface spanner-interface))))
600 (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
601 (print-function . ,Hyphen_spanner::print)
603 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
604 spanner-interface))))
609 (print-function . ,Lyric_extender::print)
610 (thickness . 0.8) ; linethickness
611 (minimum-length . 1.5)
613 (meta . ((interfaces . (lyric-interface
614 lyric-extender-interface spanner-interface))))
618 . ((print-function . ,Text_interface::print)
619 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
620 (self-alignment-X . 0)
622 (font-series . bold-narrow)
624 (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
631 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
632 (print-function . ,Mensural_ligature::print)
633 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
638 (print-function . ,Text_interface::print)
639 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
640 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
641 (after-line-breaking-callback . ,shift-right-at-line-begin)
642 (self-alignment-X . 0)
647 (break-visibility . ,end-of-line-invisible)
649 (meta . ((interfaces . (text-interface
650 side-position-interface font-interface mark-interface
651 self-alignment-interface item-interface ))))
655 (print-function . ,Text_interface::print)
656 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
659 (meta . ((interfaces . (text-interface
660 side-position-interface font-interface
661 metronome-mark-interface item-interface))))
665 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
666 (print-function . ,Measure_grouping::print)
672 (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
676 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
677 (print-function . ,Multi_measure_rest::print)
678 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
681 (thick-thickness . 6.6)
682 (hair-thickness . 2.0)
684 (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
687 (MultiMeasureRestNumber
689 (print-function . ,Text_interface::print)
690 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
691 ,Self_alignment_interface::centered_on_other_axis_parent))
692 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
693 (self-alignment-X . 0)
696 (staff-padding . 0.4)
697 (font-encoding . fetaNumber)
698 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
700 (MultiMeasureRestText
702 (print-function . ,Text_interface::print)
703 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
704 ,Self_alignment_interface::centered_on_other_axis_parent))
705 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
706 (self-alignment-X . 0)
709 (staff-padding . 0.25)
710 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
715 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
716 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
717 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
723 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
724 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
725 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
731 (print-function . ,Note_head::print)
732 (ligature-primitive-callback . ,Note_head::print)
733 (glyph-name-procedure . ,find-notehead-symbol)
734 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
735 (stem-attachment-function . ,note-head-style->attachment-coordinates)
736 (meta . ((interfaces . (rhythmic-grob-interface
737 rhythmic-head-interface font-interface note-head-interface
739 staff-symbol-referencer-interface item-interface ))))
744 (stem-spacing-correction . 0.5)
746 ;; Changed this from 0.75.
747 ;; If you ever change this back, please document! --hwn
748 (knee-spacing-correction . 1.0)
750 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
758 (X-extent-callback . #f)
759 (Y-extent-callback . #f)
760 (print-function . ,Line_spanner::print)
761 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
762 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
767 (print-function . ,Text_interface::print)
768 (meta . ((interfaces . (note-name-interface
769 text-interface font-interface item-interface ))))
774 (self-alignment-X . 0)
775 (break-visibility . ,begin-of-line-visible)
776 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
777 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
778 (print-function . ,Text_interface::print)
780 ;; no Y dimensions, because of lyrics under tenor clef.
782 (font-shape . italic)
784 (staff-padding . 0.2)
786 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
792 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
793 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
795 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
796 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
800 . ((slur-details . ,default-slur-details)
801 (print-function . ,Slur::print)
803 (spacing-procedure . ,Spanner::set_spacing_rods)
804 (minimum-length . 1.5)
805 (after-line-breaking-callback . ,Slur::after_line_breaking)
806 (Y-extent-callback . ,Slur::height)
809 (meta . ((interfaces . (slur-interface spanner-interface))))
812 (NonMusicalPaperColumn
815 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
816 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
818 ;; debugging stuff: print column number.
819 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
822 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
827 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
828 (print-function . ,Multi_measure_rest::percent)
831 (font-encoding . fetaMusic)
832 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
835 ;; an example of a text spanner
838 (print-function . ,Piano_pedal_bracket::print)
840 (bound-padding . 1.0)
842 (bracket-flare . (0.5 . 0.5))
843 (edge-height . (1.0 . 1.0))
844 (shorten-pair . (0.0 . 0.0))
846 (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
850 (RemoveEmptyVerticalGroup
852 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
853 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
856 (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface hara-kiri-group-interface item-interface spanner-interface))))
861 (print-function . ,Percent_repeat_item_interface::beat_slash)
864 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
868 (after-line-breaking-callback . ,Rest::after_line_breaking)
869 (X-extent-callback . ,Rest::extent_callback)
870 (Y-extent-callback . ,Rest::extent_callback)
871 (print-function . ,Rest::print)
872 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
873 ,Rest::polyphonic_offset_callback
875 (minimum-distance . 0.25)
877 (interfaces . (font-interface
878 rhythmic-head-interface
879 rhythmic-grob-interface
880 staff-symbol-referencer-interface
881 rest-interface item-interface ))
886 (minimum-distance . 0.75)
887 (meta . ((interfaces . (rest-collision-interface item-interface ))))
892 ;; don't set direction here: it breaks staccato.
893 (print-function . ,Script_interface::print)
895 ;; This value is sensitive: if too large, staccato dots will move a
898 (staff-padding . 0.25)
899 ;; (script-priority . 0) priorities for scripts, see script.scm
900 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
901 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
902 (font-encoding . fetaMusic)
903 (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
908 (before-line-breaking-callback . ,Script_column::before_line_breaking)
909 (meta . ((interfaces . (script-column-interface item-interface ))))
913 . ((slur-details . ,default-slur-details)
914 (print-function . ,Slur::print)
916 (spacing-procedure . ,Spanner::set_spacing_rods)
917 (minimum-length . 1.5)
918 (after-line-breaking-callback . ,Slur::after_line_breaking)
919 (Y-extent-callback . ,Slur::height)
923 (meta . ((interfaces . (slur-interface spanner-interface))))
928 (spacing-procedure . ,Spacing_spanner::set_springs)
929 (grace-space-factor . 0.6)
930 (shortest-duration-space . 2.0)
931 (spacing-increment . 1.2)
932 (base-shortest-duration . ,(ly:make-moment 3 16))
933 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
938 (break-align-symbol . staff-bar)
939 (bar-size-procedure . ,Span_bar::get_bar_size)
940 (print-function . ,Span_bar::print)
941 (X-extent-callback . ,Span_bar::width_callback)
942 (Y-extent-callback . ())
944 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
948 ;; Ross. page 151 lists other values, we opt for a leaner look
952 (hair-thickness . 1.6)
953 (thick-thickness . 6.0)
954 (meta . ((interfaces . (span-bar-interface font-interface
955 bar-line-interface item-interface ))))
959 . ((print-function . ,Text_interface::print)
962 (X-offset-callbacks . (,Side_position_interface::aligned_side))
964 (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))
970 (stem-spacing-correction . 0.4)
972 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
977 (print-function . ,Text_interface::print)
979 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
980 (no-spacing-rods . #t)
981 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
982 (font-shape . italic)
983 (self-alignment-X . 0)
984 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
987 (SostenutoPedalLineSpanner
990 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
991 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
995 (minimum-space . 1.0)
997 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1002 (print-function . ,Staff_symbol::print)
1004 (ledger-line-thickness . (1.0 . 0.1))
1006 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
1011 ;; this list is rather long. Trim --hwn
1012 (before-line-breaking-callback . ,Stem::before_line_breaking)
1013 (print-function . ,Stem::print)
1016 ;; 3.5 (or 3 measured from note head) is standard length
1017 ;; 32nd, 64th flagged stems should be longer
1018 (lengths . (3.5 3.5 3.5 4.5 5.0))
1020 ;; Stems in unnatural (forced) direction should be shortened by
1021 ;; one staff space, according to [Roush & Gourlay].
1022 ;; Flagged stems we shorten only half a staff space.
1023 (stem-shorten . (1.0 0.5))
1025 ;; default stem direction for note on middle line
1026 (neutral-direction . -1)
1030 ;; FIXME. 3.5 yields too long beams (according to Ross and
1031 ;; looking at Baerenreiter examples) for a number of common
1032 ;; boundary cases. Subtracting half a beam thickness fixes
1033 ;; this, but the bug may well be somewhere else.
1035 ;; FIXME this should come from 'lengths
1037 (beamed-lengths . (3.26 3.5 3.6))
1039 ;; We use the normal minima as minimum for the ideal lengths,
1040 ;; and the extreme minima as abolute minimum length.
1042 ;; The 'normal' minima
1043 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1044 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1046 ;; The 'extreme case' minima
1047 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1049 (X-offset-callbacks . (,Stem::offset_callback))
1050 (X-extent-callback . ,Stem::width_callback)
1051 (Y-extent-callback . ,Stem::height)
1052 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1053 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1058 (print-function . ,Stem_tremolo::print)
1059 (Y-extent-callback . ,Stem_tremolo::height)
1060 (X-extent-callback . #f)
1062 (beam-width . 1.6) ; staff-space
1063 (beam-thickness . 0.48) ; staff-space
1064 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1069 (X-extent-callback . #f)
1070 (Y-extent-callback . #f)
1071 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1074 (SeparatingGroupSpanner
1076 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1077 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1082 (no-spacing-rods . #t)
1083 (print-function . ,Sustain_pedal::print)
1084 (self-alignment-X . 0)
1086 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1087 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1088 (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
1091 (SustainPedalLineSpanner
1094 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1095 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1098 (staff-padding . 1.2)
1099 (minimum-space . 1.0)
1101 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1107 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1108 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1109 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1115 (print-function . ,System_start_delimiter::print)
1116 (collapse-height . 5.0)
1117 (font-encoding . fetaBraces)
1118 (Y-extent-callback . #f)
1119 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1124 (Y-extent-callback . #f)
1125 (print-function . ,System_start_delimiter::print)
1131 (collapse-height . 1)
1133 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1138 (Y-extent-callback . #f)
1139 (print-function . ,System_start_delimiter::print)
1140 (glyph . "bar-line")
1142 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1143 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1148 (print-function . ,Text_interface::print)
1149 (no-spacing-rods . #t)
1150 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1153 ; sync with Fingering ?
1155 (staff-padding . 0.5)
1156 (script-priority . 200)
1157 ;; todo: add X self alignment?
1158 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1162 (print-function . ,Text_interface::print)
1163 (no-spacing-rods . #t)
1164 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1165 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1167 (extra-offset . (-1 . 0))
1169 (staff-padding . 0.5)
1170 (script-priority . 200)
1171 ;; todo: add X self alignment?
1173 (font-series . bold)
1174 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1178 (print-function . ,Text_spanner::print)
1179 (font-shape . italic)
1180 (style . dashed-line)
1181 (staff-padding . 0.1)
1182 (dash-fraction . 0.2)
1185 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1189 (print-function . ,Dynamic_text_spanner::print)
1190 (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1193 (staff-padding . 1.0)
1196 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1197 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1202 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1203 (print-function . ,Ottava_bracket::print)
1204 (font-shape . italic)
1205 (shorten-pair . (0.0 . -0.6))
1206 (staff-padding . 1.0)
1208 (minimum-length . 1.0)
1209 (dash-fraction . 0.3)
1210 (edge-height . (0 . 1.2))
1212 (meta . ((interfaces . (ottava-bracket-interface
1213 line-interface side-position-interface
1214 font-interface text-interface spanner-interface))))
1220 (print-function . ,Text_interface::print)
1221 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1222 (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
1223 (stem-attachment-function . ,tablature-stem-attachment-function)
1224 (meta . ((interfaces
1225 . (rhythmic-head-interface
1227 note-head-interface staff-symbol-referencer-interface
1228 text-interface item-interface ))))
1234 (print-function . ,Tie::print)
1235 (spacing-procedure . ,Spanner::set_spacing_rods)
1236 (staffline-clearance . 0.35)
1237 (details . ((ratio . 0.333) (height-limit . 1.0)))
1241 (minimum-length . 2.5)
1242 (meta . ((interfaces . (tie-interface spanner-interface))))
1247 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1248 (X-extent-callback . #f)
1249 (Y-extent-callback . #f)
1250 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1255 (print-function . ,Time_signature::print)
1256 ; (print-function . ,Text_interface::print)
1257 (break-align-symbol . time-signature)
1258 (break-visibility . ,all-visible)
1260 (first-note . (fixed-space . 2.0))
1261 (right-edge . (extra-space . 0.5))
1262 (staff-bar . (minimum-space . 2.0))
1266 ; (text . (,time-signature-glue-markup))
1267 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1274 (edge-height . (0.7 . 0.7))
1275 (shorten-pair . (-0.2 . -0.2))
1276 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1277 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1278 (print-function . ,Tuplet_bracket::print)
1279 (font-shape . italic)
1280 (font-series . bold)
1283 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1288 (print-function . ,Text_interface::print)
1289 (font-shape . italic)
1290 (no-spacing-rods . #t)
1291 (self-alignment-X . 0)
1293 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1294 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1295 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1298 (UnaCordaPedalLineSpanner
1301 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1302 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1304 (staff-padding . 1.2)
1305 (minimum-space . 1.0)
1307 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1314 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1315 (print-function . ,Vaticana_ligature::print)
1316 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1321 (print-function . ,Volta_bracket_interface::print)
1324 (font-encoding . fetaNumber)
1325 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1326 (thickness . 1.6) ;; linethickness
1327 (height . 2.0) ;; staffspace;
1330 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1336 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1337 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1339 ;; (threshold . (6 . 1000))
1340 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1346 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1347 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1349 (meta . ((interfaces . (axis-group-interface vertically-spaceable-interface spanner-interface))))
1357 (define (completize-grob-entry x)
1358 "transplant assoc key into 'name entry of 'meta of X
1360 (let* ((name-sym (car x))
1361 (grob-entry (cdr x))
1362 (metaentry (cdr (assoc 'meta grob-entry)))
1364 (cdr (assoc 'interfaces metaentry)))
1367 (set! metaentry (assoc-set! metaentry 'name name-sym))
1368 (set! metaentry (assoc-set! metaentry 'interfaces
1369 (cons 'grob-interface ifaces-entry)))
1370 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1371 (cons name-sym grob-entry)))
1373 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1376 ;; (display (map pair? all-grob-descriptions))
1378 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1381 ;; (display (car x)) (newline)
1383 (set-object-property! (car x) 'translation-type? list?)
1384 (set-object-property! (car x) 'is-grob? #t))
1385 all-grob-descriptions)
1387 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))