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 font-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))))
39 (break-align-symbol . ambitus)
40 (print-function . ,Ambitus::print)
42 (break-visibility . ,begin-of-line-visible)
44 (clef . (extra-space . 0.0))
45 (key-signature . (extra-space . 0.0))
46 (staff-bar . (extra-space . 0.0))
47 (time-signature . (extra-space . 0.0))
48 (first-note . (fixed-space . 0.0))
50 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface break-aligned-interface item-interface font-interface))))
54 (print-function . ,Accidental_interface::print)
56 (X-offset-callbacks . (,Side_position_interface::aligned_side))
58 (cautionary-style . parentheses)
59 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface font-interface))))
66 (print-function . ,Note_head::print)
67 (break-align-symbol . ambitus)
68 (break-visibility . ,begin-of-line-visible)
69 (glyph-name-procedure . ,find-notehead-symbol)
70 (X-extent-callback . ,Note_head::extent)
71 (Y-extent-callback . ,Note_head::extent)
72 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
73 (meta . ((interfaces . (font-interface note-head-interface ambitus-interface staff-symbol-referencer-interface item-interface ))))
78 (X-extent-callback . ,Arpeggio::width_callback)
79 (Y-extent-callback . #f)
80 (print-function . ,Arpeggio::print)
81 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
82 (X-offset-callbacks . (,Side_position_interface::aligned_side))
85 (staff-position . 0.0)
86 (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
91 (break-align-symbol . staff-bar)
93 (break-glyph-function . ,default-break-barline)
94 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
95 (print-function . ,Bar_line::print)
96 (break-visibility . ,all-visible)
98 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
100 (time-signature . (extra-space . 0.75))
101 (custos . (minimum-space . 2.0))
102 (clef . (minimum-space . 1.0))
103 (key-signature . (extra-space . 1.0))
104 (first-note . (fixed-space . 1.3))
105 (next-note . (semi-fixed-space . 1.3))
106 (right-edge . (extra-space . 0.0))
110 ;; Ross. page 151 lists other values, we opt for a leaner look
114 (hair-thickness . 1.6)
115 (thick-thickness . 6.0)
116 (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
122 (print-function . ,Text_item::print)
124 (break-visibility . ,begin-of-line-visible)
127 (font-family . roman)
129 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
130 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
131 (self-alignment-X . 1)
133 ;; hmm. why did we do this: ?
134 (extra-offset . (1.3 . 0))
136 ((interfaces . (side-position-interface
138 self-alignment-interface
139 font-interface item-interface break-aligned-interface))))
145 (print-function . ,Text_item::print)
146 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
148 (font-family . number)
150 ;; We must do this, other BFs in
151 ;; paper16 become too small.
154 (meta . ((interfaces . (text-interface rhythmic-grob-interface
155 bass-figure-interface item-interface
156 self-alignment-interface font-interface))))
160 ;; todo: clean this up a bit: the list is getting
162 (print-function . ,Beam::print)
163 (concaveness-gap . 1.85)
164 (concaveness-threshold . 0.26)
166 (positions . (#f . #f))
167 (position-callbacks . (,Beam::least_squares
170 ,Beam::shift_region_to_valid
174 ;; TODO: should be in SLT.
175 (thickness . 0.48) ; in staff-space
176 (before-line-breaking-callback . ,Beam::before_line_breaking)
177 (after-line-breaking-callback . ,Beam::after_line_breaking)
178 (neutral-direction . -1)
179 (dir-function . ,beam-dir-majority-median)
181 ;; Whe have some unreferenced problems here.
183 ;; If we shorten beamed stems less than normal stems (1 staffspace),
184 ;; or high order less than 8th beams, patterns like
185 ;; c''4 [c''8 c''] c''4 [c''16 c]
186 ;; are ugly (different stem lengths).
188 ;; But if we shorten 16th beams as much as 8th beams, a single
189 ;; forced 16th beam looks *very* short.
191 ;; We choose to shorten 8th beams the same as single stems,
192 ;; and high order beams less than 8th beams, so that all
193 ;; isolated shortened beams look nice and a bit shortened,
194 ;; sadly possibly breaking patterns with high order beams.
195 (beamed-stem-shorten . (1.0 0.5 0.25))
198 (flag-width-function . ,beam-flag-width-function)
200 (auto-knee-gap . 5.5)
202 ;; only for debugging.
203 (font-family . roman)
205 (space-function . ,Beam::space_function)
206 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
213 (break-align-orders . #(; end-of-line:
214 (instrument-name left-edge ambitus breathing-sign
215 clef staff-bar key-signature
216 time-signature custos)
219 (instrument-name left-edge ambitus breathing-sign
220 clef staff-bar key-signature
222 time-signature custos)
224 (instrument-name left-edge ambitus breathing-sign
225 clef key-signature staff-bar
226 time-signature custos)
230 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
231 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
237 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
238 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
239 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
244 (break-align-symbol . breathing-sign)
247 (ambitus . (extra-space . 2.0))
248 (custos . (minimum-space . 1.0))
249 (key-signature . (minimum-space . 1.5))
250 (staff-bar . (minimum-space . 1.5))
251 (clef . (minimum-space . 2.0))
252 (first-note . (fixed-space . 1.0)) ;huh?
253 (right-edge . (extra-space . 0.1))
255 (print-function . ,Text_item::print)
256 (text . ,(make-musicglyph-markup "scripts-rcomma"))
257 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
258 (break-visibility . ,begin-of-line-invisible)
259 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
264 (print-function . ,Clef::print)
265 (before-line-breaking-callback . ,Clef::before_line_breaking)
267 (font-family . music)
268 (break-align-symbol . clef)
269 (break-visibility . ,begin-of-line-visible)
270 (space-alist . ((ambitus . (extra-space . 2.0))
271 (staff-bar . (extra-space . 0.7))
272 (key-signature . (minimum-space . 4.0))
273 (time-signature . (minimum-space . 4.2))
274 (first-note . (minimum-fixed-space . 5.0))
275 (next-note . (extra-space . 0.5))
276 (right-edge . (extra-space . 0.5))
278 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
279 (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
282 (ClusterSpannerBeacon
284 (print-function . #f)
285 (Y-extent-callback . ,Cluster_beacon::height)
286 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
291 (print-function . ,Cluster::print)
292 (spacing-procedure . ,Spanner::set_spacing_rods)
293 (minimum-length . 0.0)
296 (meta . ((interfaces . (cluster-interface spanner-interface))))
301 (print-function . ,Text_item::print)
302 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
306 (meta . ((interfaces . (font-interface rhythmic-grob-interface
307 text-interface chord-name-interface item-interface ))))
312 (break-align-symbol . custos)
314 (print-function . ,Custos::print)
315 (break-visibility . ,end-of-line-visible)
317 (neutral-direction . -1)
318 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
320 (first-note . (minimum-fixed-space . 0.0))
321 (right-edge . (extra-space . 0.1))
324 . (custos-interface staff-symbol-referencer-interface
326 break-aligned-interface item-interface ))))
334 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
335 (X-offset-callbacks . (,Dot_column::side_position))
336 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
341 (print-function . ,Dots::print)
343 (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
346 (DoublePercentRepeat .
348 (print-function . ,Percent_repeat_item_interface::double_percent)
351 (font-encoding . fetaMusic)
354 (break-align-symbol . staff-bar)
355 (break-visibility . ,begin-of-line-invisible)
356 (meta . ((interfaces . (font-interface
357 break-aligned-interface
358 percent-repeat-interface item-interface ))))
363 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
364 (print-function . ,Text_item::print)
365 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
366 ,Self_alignment_interface::centered_on_parent))
367 (self-alignment-X . 0)
368 (no-spacing-rods . #t)
369 (script-priority . 100)
371 (font-encoding . fetaDynamic)
372 (font-shape . italic)
373 (self-alignment-Y . 0)
374 (meta . ((interfaces . (font-interface text-interface self-alignment-interface dynamic-interface script-interface item-interface))))
380 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
381 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
382 (staff-padding . 0.1)
384 (minimum-space . 1.2)
386 (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface spanner-interface))))
391 (break-align-symbol . left-edge)
395 (custos . (extra-space . 0.0))
396 (ambitus . (extra-space . 2.0))
397 (time-signature . (extra-space . 0.0))
398 (staff-bar . (extra-space . 0.0))
399 (breathing-sign . (minimum-space . 0.0))
400 (clef . (extra-space . 0.85))
401 (first-note . (fixed-space . 1.0))
402 (right-edge . (extra-space . 0.0))
403 (key-signature . (extra-space . 0.0))
405 (meta . ((interfaces . (break-aligned-interface item-interface ))))
410 (print-function . ,Text_item::print)
412 (staff-padding . 0.6)
413 (self-alignment-X . 0)
414 (self-alignment-Y . 0)
415 (script-priority . 100)
416 (font-encoding . fetaNumber)
417 (font-size . -5) ; don't overlap when next to heads.
418 (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
425 (zigzag-width . 0.75)
427 (X-extent-callback . #f)
428 (Y-extent-callback . #f)
429 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
430 (print-function . ,Line_spanner::print)
431 (meta . ((interfaces . (line-spanner-interface spanner-interface))))
436 (print-function . ,Hairpin::print)
439 (spacing-procedure . ,Spanner::set_spacing_rods)
440 (minimum-length . 2.0)
441 (if-text-padding . 1.0)
442 (self-alignment-Y . 0)
443 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
444 (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
450 (print-function . ,Horizontal_bracket::print)
451 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
454 (meta . ((interfaces . (horizontal-bracket-interface side-position-interface spanner-interface))))
459 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
460 ,Side_position_interface::aligned_on_support_refpoints))
461 ;; This direction is for aligned_on_support_refpoints
465 (left-edge . (extra-space . 1.0))
468 (self-alignment-Y . 0)
469 (print-function . ,Text_item::print)
470 (break-align-symbol . instrument-name)
471 (break-visibility . ,begin-of-line-visible)
473 (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
479 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
481 (space-alist . ((left-edge . (extra-space . 1.0))
483 (break-align-symbol . instrument-name)
484 (print-function . ,Text_item::print)
485 (break-align-symbol . clef)
486 (break-visibility . ,begin-of-line-visible)
488 (meta . ((interfaces . (font-interface
489 self-alignment-interface
490 side-position-interface text-interface
491 break-aligned-interface item-interface ))))
496 (print-function . ,Key_signature_interface::print)
498 (time-signature . (extra-space . 1.25))
499 (staff-bar . (extra-space . 1.1))
500 (right-edge . (extra-space . 0.5))
501 (first-note . (fixed-space . 2.5))
503 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
504 (break-align-symbol . key-signature)
505 (break-visibility . ,begin-of-line-visible)
507 (meta . ((interfaces . (key-signature-interface font-interface break-aligned-interface item-interface ))))
511 (print-function . ,Ledger_line_spanner::print)
512 (X-extent-callback . #f)
513 (Y-extent-callback . #f)
514 (print-function . ,Ledger_line_spanner::print)
515 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
520 (ligature-primitive-callback . ,Note_head::print)
525 (edge-height . (0.7 . 0.7))
526 (shorten-pair . (-0.2 . -0.2))
527 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
528 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
529 (print-function . ,Tuplet_bracket::print)
530 (meta . ((interfaces . (tuplet-bracket-interface spanner-interface))))
539 (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
540 (print-function . ,Hyphen_spanner::print)
542 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
543 spanner-interface))))
548 (print-function . ,Lyric_extender::print)
549 (thickness . 0.8) ; linethickness
550 (minimum-length . 1.5)
552 (meta . ((interfaces . (lyric-interface
553 lyric-extender-interface spanner-interface))))
557 . ((print-function . ,Text_item::print)
558 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
559 (self-alignment-X . 0)
561 (font-series . bold-narrow)
563 (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
570 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
571 (print-function . ,Mensural_ligature::print)
572 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
577 (print-function . ,Text_item::print)
578 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
579 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
580 (after-line-breaking-callback . ,shift-right-at-line-begin)
581 (self-alignment-X . 0)
586 (break-visibility . ,end-of-line-invisible)
588 (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
592 (print-function . ,Text_item::print)
593 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
596 (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
600 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
601 (print-function . ,Measure_grouping::print)
607 (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
611 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
612 (print-function . ,Multi_measure_rest::print)
613 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
616 (thick-thickness . 6.6)
617 (hair-thickness . 2.0)
619 (font-encoding . fetaMusic)
620 (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
623 (MultiMeasureRestNumber
625 (print-function . ,Text_item::print)
626 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
627 ,Self_alignment_interface::centered_on_other_axis_parent))
628 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
629 (self-alignment-X . 0)
632 (staff-padding . 1.3)
633 (font-encoding . fetaNumber)
634 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
636 (MultiMeasureRestText
638 (print-function . ,Text_item::print)
639 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
640 ,Self_alignment_interface::centered_on_other_axis_parent))
641 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
642 (self-alignment-X . 0)
645 (staff-padding . 1.5)
646 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
651 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
652 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
653 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
659 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
660 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
661 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
667 (print-function . ,Note_head::print)
668 (ligature-primitive-callback . ,Note_head::print)
669 (glyph-name-procedure . ,find-notehead-symbol)
670 (X-extent-callback . ,Note_head::extent)
671 (Y-extent-callback . ,Note_head::extent)
672 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
673 (stem-attachment-function . ,note-head-style->attachment-coordinates)
674 (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
679 (stem-spacing-correction . 0.5)
681 ;; Changed this from 0.75.
682 ;; If you ever change this back, please document! --hwn
683 (knee-spacing-correction . 1.0)
685 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
693 (X-extent-callback . #f)
694 (Y-extent-callback . #f)
695 (print-function . ,Line_spanner::print)
696 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
697 (meta . ((interfaces . (line-spanner-interface spanner-interface))))
702 (print-function . ,Text_item::print)
703 (meta . ((interfaces . (note-name-interface
704 text-interface font-interface item-interface ))))
709 (self-alignment-X . 0)
710 (break-visibility . ,begin-of-line-visible)
711 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
712 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
713 (print-function . ,Text_item::print)
715 ;; no Y dimensions, because of lyrics under tenor clef.
717 (font-shape . italic)
719 (staff-padding . 0.2)
721 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
727 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
728 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
730 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
731 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
736 (print-function . ,New_slur::print)
738 (spacing-procedure . ,Spanner::set_spacing_rods)
739 (minimum-length . 1.5)
740 (after-line-breaking-callback . ,New_slur::after_line_breaking)
741 (Y-extent-callback . ,New_slur::height)
744 (meta . ((interfaces . (slur-interface spanner-interface))))
747 (NonMusicalPaperColumn
750 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
751 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
753 ;; debugging stuff: print column number.
754 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
757 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
762 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
763 (print-function . ,Multi_measure_rest::percent)
766 (font-encoding . fetaMusic)
767 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
770 (PianoPedalBracket ;; an example of a text spanner
772 (print-function . ,Piano_pedal_bracket::print)
774 (if-text-padding . 1.0)
776 (bracket-flare . (0.5 . 0.5))
777 (edge-height . (1.0 . 1.0))
778 (shorten-pair . (0.0 . 0.0))
780 (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
784 (RemoveEmptyVerticalGroup
786 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
787 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
790 (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface spanner-interface))))
795 (print-function . ,Percent_repeat_item_interface::beat_slash)
798 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
802 (after-line-breaking-callback . ,Rest::after_line_breaking)
803 (X-extent-callback . ,Rest::extent_callback)
804 (Y-extent-callback . ,Rest::extent_callback)
805 (print-function . ,Rest::print)
806 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
807 ,Rest::polyphonic_offset_callback
809 (minimum-distance . 0.25)
811 (interfaces . (font-interface
812 rhythmic-head-interface
813 rhythmic-grob-interface
814 staff-symbol-referencer-interface
815 rest-interface item-interface ))
820 (minimum-distance . 0.75)
821 (meta . ((interfaces . (rest-collision-interface item-interface ))))
826 ;; don't set direction here: it breaks staccato.
827 (print-function . ,Script_interface::print)
829 ;; This value is sensitive: if too large, staccato dots will move a
832 (staff-padding . 0.25)
833 ;; (script-priority . 0) priorities for scripts, see script.scm
834 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
835 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
836 (font-encoding . fetaMusic)
837 (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
842 (before-line-breaking-callback . ,Script_column::before_line_breaking)
843 (meta . ((interfaces . (script-column-interface item-interface ))))
848 (print-function . ,New_slur::print)
850 (spacing-procedure . ,Spanner::set_spacing_rods)
851 (minimum-length . 1.5)
852 (after-line-breaking-callback . ,New_slur::after_line_breaking)
853 (Y-extent-callback . ,New_slur::height)
857 (meta . ((interfaces . (slur-interface spanner-interface))))
862 (spacing-procedure . ,Spacing_spanner::set_springs)
863 (grace-space-factor . 0.6)
864 (shortest-duration-space . 2.0)
865 (spacing-increment . 1.2)
866 (base-shortest-duration . ,(ly:make-moment 1 8))
867 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
872 (break-align-symbol . staff-bar)
873 (bar-size-procedure . ,Span_bar::get_bar_size)
874 (print-function . ,Span_bar::print)
875 (X-extent-callback . ,Span_bar::width_callback)
876 (Y-extent-callback . ())
878 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
882 ;; Ross. page 151 lists other values, we opt for a leaner look
886 (hair-thickness . 1.6)
887 (thick-thickness . 6.0)
888 (meta . ((interfaces . (span-bar-interface font-interface
889 bar-line-interface item-interface ))))
893 . ((print-function . ,Text_item::print)
896 (X-offset-callbacks . (,Side_position_interface::aligned_side))
898 (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))
904 (stem-spacing-correction . 0.4)
906 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
911 (print-function . ,Text_item::print)
913 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
914 (no-spacing-rods . #t)
915 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
916 (font-shape . italic)
917 (self-alignment-X . 0)
918 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
921 (SostenutoPedalLineSpanner
924 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
925 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
929 (minimum-space . 1.0)
931 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
936 (print-function . ,Staff_symbol::print)
938 (ledger-line-thickness . (1.0 . 0.1))
940 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
945 ;; this list is rather long. Trim --hwn
946 (before-line-breaking-callback . ,Stem::before_line_breaking)
947 (print-function . ,Stem::print)
950 ;; 3.5 (or 3 measured from note head) is standard length
951 ;; 32nd, 64th flagged stems should be longer
952 (lengths . (3.5 3.5 3.5 4.5 5.0))
954 ;; Stems in unnatural (forced) direction should be shortened by
955 ;; one staff space, according to [Roush & Gourlay].
956 ;; Flagged stems we shorten only half a staff space.
957 (stem-shorten . (1.0 0.5))
959 ;; default stem direction for note on middle line
960 (neutral-direction . -1)
964 ;; FIXME. 3.5 yields too long beams (according to Ross and
965 ;; looking at Baerenreiter examples) for a number of common
966 ;; boundary cases. Subtracting half a beam thickness fixes
967 ;; this, but the bug may well be somewhere else.
969 ;; FIXME this should come from 'lengths
971 (beamed-lengths . (3.26 3.26 1.5))
972 ; (beamed-lengths . (3.5 3.5 3.5 4.5 5.0))
974 ;; We use the normal minima as minimum for the ideal lengths,
975 ;; and the extreme minima as abolute minimum length.
977 ;; The 'normal' minima
978 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
980 ;; The 'extreme case' minima
981 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
983 (X-offset-callbacks . (,Stem::off_callback))
984 (X-extent-callback . ,Stem::dim_callback)
985 (Y-extent-callback . ,Stem::height)
986 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
987 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
992 (print-function . ,Stem_tremolo::print)
993 (Y-extent-callback . ,Stem_tremolo::height)
994 (X-extent-callback . #f)
996 (beam-width . 1.6) ; staff-space
997 (beam-thickness . 0.48) ; staff-space
998 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1003 (X-extent-callback . #f)
1004 (Y-extent-callback . #f)
1005 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1008 (SeparatingGroupSpanner
1010 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1011 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1016 (no-spacing-rods . #t)
1017 (print-function . ,Sustain_pedal::print)
1018 (self-alignment-X . 0)
1020 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1021 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1022 (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
1025 (SustainPedalLineSpanner
1028 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1029 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1032 (staff-padding . 1.2)
1033 (minimum-space . 1.0)
1035 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1041 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1042 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1043 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1049 (print-function . ,System_start_delimiter::print)
1050 (collapse-height . 5.0)
1051 (font-encoding . fetaBraces)
1052 (Y-extent-callback . #f)
1053 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1058 (Y-extent-callback . #f)
1059 (print-function . ,System_start_delimiter::print)
1065 (collapse-height . 1)
1067 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1072 (Y-extent-callback . #f)
1073 (print-function . ,System_start_delimiter::print)
1074 (glyph . "bar-line")
1076 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1077 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1082 (print-function . ,Text_item::print)
1083 (no-spacing-rods . #t)
1084 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1087 (staff-padding . 0.5)
1088 (script-priority . 200)
1089 ;; todo: add X self alignment?
1090 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1094 (print-function . ,Text_item::print)
1095 (no-spacing-rods . #t)
1096 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1097 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1099 (extra-offset . (-1 . 0))
1101 (staff-padding . 0.5)
1102 (script-priority . 200)
1103 ;; todo: add X self alignment?
1105 (font-series . bold)
1106 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1110 (print-function . ,Text_spanner::print)
1111 (font-shape . italic)
1112 (style . dashed-line)
1113 (staff-padding . 0.1)
1115 ;; urg, only for (de)cresc. text spanners
1116 (if-text-padding . 1.0)
1117 (dash-fraction . 0.2)
1120 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1125 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1126 (print-function . ,Ottava_bracket::print)
1127 (font-shape . italic)
1128 (shorten-pair . (0.0 . -0.6))
1129 (staff-padding . 1.0)
1131 (minimum-length . 1.0)
1132 (dash-fraction . 0.3)
1133 (edge-height . (0 . 1.2))
1135 (meta . ((interfaces . (ottava-bracket-interface
1136 line-interface side-position-interface
1137 font-interface text-interface spanner-interface))))
1143 (print-function . ,Text_item::print)
1144 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1145 (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
1146 (stem-attachment-function . ,tablature-stem-attachment-function)
1147 (meta . ((interfaces
1148 . (rhythmic-head-interface
1150 note-head-interface staff-symbol-referencer-interface
1151 text-interface item-interface ))))
1157 (print-function . ,Tie::print)
1158 (spacing-procedure . ,Spanner::set_spacing_rods)
1159 (staffline-clearance . 0.35)
1160 (details . ((ratio . 0.333) (height-limit . 1.0)))
1164 (minimum-length . 2.5)
1165 (meta . ((interfaces . (tie-interface spanner-interface))))
1170 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1171 (X-extent-callback . #f)
1172 (Y-extent-callback . #f)
1173 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1178 (print-function . ,Time_signature::print)
1179 ; (print-function . ,Text_item::print)
1180 (break-align-symbol . time-signature)
1181 (break-visibility . ,all-visible)
1183 (first-note . (fixed-space . 2.0))
1184 (right-edge . (extra-space . 0.5))
1185 (staff-bar . (minimum-space . 2.0))
1189 ; (text . (,time-signature-glue-markup))
1190 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1197 (edge-height . (0.7 . 0.7))
1198 (shorten-pair . (-0.2 . -0.2))
1199 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1200 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1201 (print-function . ,Tuplet_bracket::print)
1202 (font-shape . italic)
1203 (font-series . bold)
1206 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1211 (print-function . ,Text_item::print)
1212 (font-shape . italic)
1213 (no-spacing-rods . #t)
1214 (self-alignment-X . 0)
1216 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1217 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1218 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1221 (UnaCordaPedalLineSpanner
1224 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1225 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1227 (staff-padding . 1.2)
1228 (minimum-space . 1.0)
1230 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1237 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1238 (print-function . ,Vaticana_ligature::print)
1239 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1244 (print-function . ,Volta_bracket_interface::print)
1247 (font-encoding . fetaNumber)
1248 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1249 (thickness . 1.6) ; linethickness
1250 (height . 2.0) ; staffspace;
1253 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1259 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1260 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1262 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1268 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1269 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1271 (meta . ((interfaces . (axis-group-interface spanner-interface))))
1279 (define (completize-grob-entry x)
1280 "transplant assoc key into 'name entry of 'meta of X
1282 (let* ((name-sym (car x))
1283 (grob-entry (cdr x))
1284 (metaentry (cdr (assoc 'meta grob-entry)))
1286 (cdr (assoc 'interfaces metaentry)))
1289 (set! metaentry (assoc-set! metaentry 'name name-sym))
1290 (set! metaentry (assoc-set! metaentry 'interfaces
1291 (cons 'grob-interface ifaces-entry)))
1292 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1293 (cons name-sym grob-entry)))
1295 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1299 ; (display (map pair? all-grob-descriptions))
1302 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1305 ; (display (car x)) (newline)
1307 (set-object-property! (car x) 'translation-type? list?)
1308 (set-object-property! (car x) 'is-grob? #t))
1309 all-grob-descriptions)
1312 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))