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)
20 (cautionary-style . parentheses)
21 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface font-interface))))
26 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
29 ;; this is quite small, but it is very ugly to have
30 ;; accs closer to the previous note than to the next one.
31 (right-padding . 0.15)
32 (meta . ((interfaces . (item-interface accidental-placement-interface))))
37 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
38 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
40 (clef . (extra-space . 0.5))
41 (key-signature . (extra-space . 0.0))
42 (staff-bar . (extra-space . 0.0))
43 (time-signature . (extra-space . 0.0))
44 (first-note . (fixed-space . 0.0))
47 (break-align-symbol . ambitus)
48 (break-visibility . ,begin-of-line-visible)
49 (meta . ((interfaces . (axis-group-interface break-aligned-interface ambitus-interface item-interface ))))
54 (print-function . ,Ambitus::print)
57 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
59 (meta . ((interfaces . (ambitus-interface staff-symbol-referencer-interface item-interface font-interface))))
63 (print-function . ,Accidental_interface::print)
66 (X-offset-callbacks . (,Side_position_interface::aligned_side))
68 (cautionary-style . parentheses)
69 (after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface break-aligned-interface side-position-interface font-interface))))
75 (print-function . ,Note_head::print)
76 (glyph-name-procedure . ,find-notehead-symbol)
77 (X-extent-callback . ,Note_head::extent)
78 (Y-extent-callback . ,Note_head::extent)
79 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
80 (meta . ((interfaces . (font-interface note-head-interface ambitus-interface staff-symbol-referencer-interface rhythmic-head-interface item-interface ))))
85 (X-extent-callback . ,Arpeggio::width_callback)
86 (Y-extent-callback . #f)
87 (print-function . ,Arpeggio::print)
88 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
89 (X-offset-callbacks . (,Side_position_interface::aligned_side))
92 (staff-position . 0.0)
93 (meta . ((interfaces . (arpeggio-interface staff-symbol-referencer-interface side-position-interface item-interface font-interface))))
98 (break-align-symbol . staff-bar)
100 (break-glyph-function . ,default-break-barline)
101 (bar-size-procedure . ,Bar_line::get_staff_bar_size)
102 (print-function . ,Bar_line::print)
103 (break-visibility . ,all-visible)
105 (before-line-breaking-callback . ,Bar_line::before_line_breaking)
107 (time-signature . (extra-space . 0.75))
108 (custos . (minimum-space . 2.0))
109 (clef . (minimum-space . 1.0))
110 (key-signature . (extra-space . 1.0))
111 (first-note . (fixed-space . 1.3))
112 (next-note . (semi-fixed-space . 1.3))
113 (right-edge . (extra-space . 0.0))
117 ;; Ross. page 151 lists other values, we opt for a leaner look
121 (hair-thickness . 1.6)
122 (thick-thickness . 6.0)
123 (meta . ((interfaces . (bar-line-interface item-interface break-aligned-interface font-interface))))
129 (print-function . ,Text_item::print)
131 (break-visibility . ,begin-of-line-visible)
134 (font-family . roman)
136 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
137 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
138 (self-alignment-X . 1)
140 ;; hmm. why did we do this: ?
141 (extra-offset . (1.3 . 0))
143 ((interfaces . (side-position-interface
145 self-alignment-interface
146 font-interface item-interface break-aligned-interface))))
152 (print-function . ,Text_item::print)
153 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
155 (font-family . number)
157 ;; We must do this, other BFs in
158 ;; paper16 become too small.
161 (meta . ((interfaces . (text-interface rhythmic-grob-interface
162 bass-figure-interface item-interface
163 self-alignment-interface font-interface))))
167 ;; todo: clean this up a bit: the list is getting
169 (print-function . ,Beam::print)
170 (concaveness-gap . 1.85)
171 (concaveness-threshold . 0.26)
173 (positions . (#f . #f))
174 (position-callbacks . (,Beam::least_squares
177 ,Beam::shift_region_to_valid
181 ;; TODO: should be in SLT.
182 (thickness . 0.48) ; in staff-space
183 (before-line-breaking-callback . ,Beam::before_line_breaking)
184 (after-line-breaking-callback . ,Beam::after_line_breaking)
185 (neutral-direction . -1)
186 (dir-function . ,beam-dir-majority-median)
188 ;; Whe have some unreferenced problems here.
190 ;; If we shorten beamed stems less than normal stems (1 staffspace),
191 ;; or high order less than 8th beams, patterns like
192 ;; c''4 [c''8 c''] c''4 [c''16 c]
193 ;; are ugly (different stem lengths).
195 ;; But if we shorten 16th beams as much as 8th beams, a single
196 ;; forced 16th beam looks *very* short.
198 ;; We choose to shorten 8th beams the same as single stems,
199 ;; and high order beams less than 8th beams, so that all
200 ;; isolated shortened beams look nice and a bit shortened,
201 ;; sadly possibly breaking patterns with high order beams.
202 (beamed-stem-shorten . (1.0 0.5 0.25))
205 (flag-width-function . ,beam-flag-width-function)
207 (auto-knee-gap . 5.5)
209 ;; only for debugging.
210 (font-family . roman)
212 (space-function . ,Beam::space_function)
213 (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface))))
220 (break-align-orders . #(; end-of-line:
221 (instrument-name left-edge ambitus breathing-sign
222 clef staff-bar key-signature
223 time-signature custos)
226 (instrument-name left-edge ambitus breathing-sign
227 clef staff-bar key-signature
229 time-signature custos)
231 (instrument-name left-edge ambitus breathing-sign
232 clef key-signature staff-bar
233 time-signature custos)
237 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
238 (meta . ((interfaces . (break-alignment-interface item-interface axis-group-interface)))))
244 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
245 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
246 (meta . ((interfaces . (break-aligned-interface item-interface axis-group-interface item-interface ))))
251 (break-align-symbol . breathing-sign)
254 (ambitus . (extra-space . 2.0))
255 (custos . (minimum-space . 1.0))
256 (key-signature . (minimum-space . 1.5))
257 (staff-bar . (minimum-space . 1.5))
258 (clef . (minimum-space . 2.0))
259 (first-note . (fixed-space . 1.0)) ;huh?
260 (right-edge . (extra-space . 0.1))
262 (print-function . ,Text_item::print)
263 (text . ,(make-musicglyph-markup "scripts-rcomma"))
264 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
265 (break-visibility . ,begin-of-line-invisible)
266 (meta . ((interfaces . (break-aligned-interface breathing-sign-interface text-interface font-interface item-interface ))))
271 (print-function . ,Clef::print)
272 (before-line-breaking-callback . ,Clef::before_line_breaking)
274 (font-family . music)
275 (break-align-symbol . clef)
276 (break-visibility . ,begin-of-line-visible)
277 (space-alist . ((ambitus . (extra-space . 2.0))
278 (staff-bar . (extra-space . 0.7))
279 (key-signature . (minimum-space . 4.0))
280 (time-signature . (minimum-space . 4.2))
281 (first-note . (minimum-fixed-space . 5.0))
282 (next-note . (extra-space . 0.5))
283 (right-edge . (extra-space . 0.5))
285 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
286 (meta . ((interfaces . (clef-interface staff-symbol-referencer-interface font-interface break-aligned-interface item-interface ))))
289 (ClusterSpannerBeacon
291 (print-function . #f)
292 (Y-extent-callback . ,Cluster_beacon::height)
293 (meta . ((interfaces . (cluster-beacon-interface item-interface))))
298 (print-function . ,Cluster::print)
299 (spacing-procedure . ,Spanner::set_spacing_rods)
300 (minimum-length . 0.0)
303 (meta . ((interfaces . (cluster-interface spanner-interface))))
308 (print-function . ,Text_item::print)
309 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
313 (meta . ((interfaces . (font-interface rhythmic-grob-interface
314 text-interface chord-name-interface item-interface ))))
319 (break-align-symbol . custos)
321 (print-function . ,Custos::print)
322 (break-visibility . ,end-of-line-visible)
324 (neutral-direction . -1)
325 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
327 (first-note . (minimum-fixed-space . 0.0))
328 (right-edge . (extra-space . 0.1))
331 . (custos-interface staff-symbol-referencer-interface
333 break-aligned-interface item-interface ))))
341 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
342 (X-offset-callbacks . (,Dot_column::side_position))
343 (meta . ((interfaces . (dot-column-interface axis-group-interface item-interface ))))
348 (print-function . ,Dots::print)
350 (meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
355 (print-function . ,Percent_repeat_item_interface::double_percent)
358 (font-encoding . fetaMusic)
361 (break-align-symbol . staff-bar)
362 (break-visibility . ,begin-of-line-invisible)
363 (meta . ((interfaces . (font-interface
364 break-aligned-interface
365 percent-repeat-interface item-interface ))))
369 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
370 (print-function . ,Text_item::print)
371 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
372 ,Self_alignment_interface::centered_on_parent))
373 (self-alignment-X . 0)
374 (no-spacing-rods . #t)
375 (script-priority . 100)
377 (font-encoding . fetaDynamic)
378 (font-shape . italic)
379 (self-alignment-Y . 0)
380 (meta . ((interfaces . (font-interface text-interface self-alignment-interface
381 dynamic-interface script-interface item-interface))))
384 . ((print-function . ,Dynamic_text_spanner::print)
386 (font-shape . italic)
387 (style . dashed-line)
389 ; need to blend with dynamic texts.
391 (bound-padding . 0.75)
392 (dash-fraction . 0.2)
394 (meta . ((interfaces . (font-interface
396 dynamic-interface dynamic-text-spanner-interface
403 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
404 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
405 (staff-padding . 0.1)
407 (minimum-space . 1.2)
409 (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface spanner-interface))))
414 (break-align-symbol . left-edge)
418 (custos . (extra-space . 0.0))
419 (ambitus . (extra-space . 2.0))
420 (time-signature . (extra-space . 0.0))
421 (staff-bar . (extra-space . 0.0))
422 (breathing-sign . (minimum-space . 0.0))
423 (clef . (extra-space . 0.85))
424 (first-note . (fixed-space . 1.0))
425 (right-edge . (extra-space . 0.0))
426 (key-signature . (extra-space . 0.0))
428 (meta . ((interfaces . (break-aligned-interface item-interface ))))
433 (print-function . ,Text_item::print)
435 (staff-padding . 0.6)
436 (self-alignment-X . 0)
437 (self-alignment-Y . 0)
438 (script-priority . 100)
439 (font-encoding . fetaNumber)
440 (font-size . -5) ; don't overlap when next to heads.
441 (meta . ((interfaces . (finger-interface font-interface text-script-interface text-interface side-position-interface self-alignment-interface item-interface ))))
448 (zigzag-width . 0.75)
450 (X-extent-callback . #f)
451 (Y-extent-callback . #f)
452 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
453 (print-function . ,Line_spanner::print)
454 (meta . ((interfaces . (line-spanner-interface spanner-interface))))
459 (print-function . ,Hairpin::print)
462 (spacing-procedure . ,Spanner::set_spacing_rods)
463 (minimum-length . 2.0)
464 (bound-padding . 1.0)
465 (self-alignment-Y . 0)
466 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
467 (meta . ((interfaces . (hairpin-interface line-interface self-alignment-interface dynamic-interface spanner-interface))))
473 (print-function . ,Horizontal_bracket::print)
474 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
477 (meta . ((interfaces . (horizontal-bracket-interface side-position-interface spanner-interface))))
482 (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
483 ,Side_position_interface::aligned_on_support_refpoints))
484 ;; This direction is for aligned_on_support_refpoints
488 (left-edge . (extra-space . 1.0))
491 (self-alignment-Y . 0)
492 (print-function . ,Text_item::print)
493 (break-align-symbol . instrument-name)
494 (break-visibility . ,begin-of-line-visible)
496 (meta . ((interfaces . (font-interface self-alignment-interface side-position-interface text-interface break-aligned-interface item-interface ))))
502 (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
504 (space-alist . ((left-edge . (extra-space . 1.0))
506 (break-align-symbol . instrument-name)
507 (print-function . ,Text_item::print)
508 (break-align-symbol . clef)
509 (break-visibility . ,begin-of-line-visible)
511 (meta . ((interfaces . (font-interface
512 self-alignment-interface
513 side-position-interface text-interface
514 break-aligned-interface item-interface ))))
519 (print-function . ,Key_signature_interface::print)
521 (time-signature . (extra-space . 1.25))
522 (staff-bar . (extra-space . 1.1))
523 (right-edge . (extra-space . 0.5))
524 (first-note . (fixed-space . 2.5))
526 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
527 (break-align-symbol . key-signature)
528 (break-visibility . ,begin-of-line-visible)
530 (meta . ((interfaces . (key-signature-interface font-interface break-aligned-interface item-interface ))))
534 (print-function . ,Ledger_line_spanner::print)
535 (X-extent-callback . #f)
536 (Y-extent-callback . #f)
537 (print-function . ,Ledger_line_spanner::print)
538 (meta . ((interfaces . (spanner-interface ledger-line-interface))))
543 (ligature-primitive-callback . ,Note_head::print)
548 (edge-height . (0.7 . 0.7))
549 (shorten-pair . (-0.2 . -0.2))
550 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
551 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
552 (print-function . ,Tuplet_bracket::print)
553 (meta . ((interfaces . (tuplet-bracket-interface spanner-interface))))
562 (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
563 (print-function . ,Hyphen_spanner::print)
565 (meta . ((interfaces . (lyric-interface lyric-hyphen-interface
566 spanner-interface))))
571 (print-function . ,Lyric_extender::print)
572 (thickness . 0.8) ; linethickness
573 (minimum-length . 1.5)
575 (meta . ((interfaces . (lyric-interface
576 lyric-extender-interface spanner-interface))))
580 . ((print-function . ,Text_item::print)
581 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
582 (self-alignment-X . 0)
584 (font-series . bold-narrow)
586 (meta . ((interfaces . (rhythmic-grob-interface lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface ))))
593 (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
594 (print-function . ,Mensural_ligature::print)
595 (meta . ((interfaces . (mensural-ligature-interface font-interface))))
600 (print-function . ,Text_item::print)
601 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
602 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
603 (after-line-breaking-callback . ,shift-right-at-line-begin)
604 (self-alignment-X . 0)
609 (break-visibility . ,end-of-line-invisible)
611 (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
615 (print-function . ,Text_item::print)
616 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
619 (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
623 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
624 (print-function . ,Measure_grouping::print)
630 (meta . ((interfaces . (spanner-interface side-position-interface measure-grouping-interface))))
634 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
635 (print-function . ,Multi_measure_rest::print)
636 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
639 (thick-thickness . 6.6)
640 (hair-thickness . 2.0)
642 (meta . ((interfaces . (multi-measure-rest-interface multi-measure-interface rest-interface font-interface staff-symbol-referencer-interface))))
645 (MultiMeasureRestNumber
647 (print-function . ,Text_item::print)
648 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
649 ,Self_alignment_interface::centered_on_other_axis_parent))
650 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
651 (self-alignment-X . 0)
654 (staff-padding . 1.3)
655 (font-encoding . fetaNumber)
656 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
658 (MultiMeasureRestText
660 (print-function . ,Text_item::print)
661 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
662 ,Self_alignment_interface::centered_on_other_axis_parent))
663 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
664 (self-alignment-X . 0)
667 (staff-padding . 1.5)
668 (meta . ((interfaces . (side-position-interface multi-measure-interface self-alignment-interface font-interface spanner-interface text-interface))))
673 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
674 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
675 (meta . ((interfaces . (note-collision-interface axis-group-interface item-interface ))))
681 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
682 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
683 (meta . ((interfaces . (axis-group-interface note-column-interface item-interface ))))
689 (print-function . ,Note_head::print)
690 (ligature-primitive-callback . ,Note_head::print)
691 (glyph-name-procedure . ,find-notehead-symbol)
692 (X-extent-callback . ,Note_head::extent)
693 (Y-extent-callback . ,Note_head::extent)
694 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
695 (stem-attachment-function . ,note-head-style->attachment-coordinates)
696 (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
701 (stem-spacing-correction . 0.5)
703 ;; Changed this from 0.75.
704 ;; If you ever change this back, please document! --hwn
705 (knee-spacing-correction . 1.0)
707 (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface ))))
715 (X-extent-callback . #f)
716 (Y-extent-callback . #f)
717 (print-function . ,Line_spanner::print)
718 (after-line-breaking-callback . ,Line_spanner::after_line_breaking)
719 (meta . ((interfaces . (line-spanner-interface line-interface spanner-interface))))
724 (print-function . ,Text_item::print)
725 (meta . ((interfaces . (note-name-interface
726 text-interface font-interface item-interface ))))
731 (self-alignment-X . 0)
732 (break-visibility . ,begin-of-line-visible)
733 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
734 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
735 (print-function . ,Text_item::print)
737 ;; no Y dimensions, because of lyrics under tenor clef.
739 (font-shape . italic)
741 (staff-padding . 0.2)
743 (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
749 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
750 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
752 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
753 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
758 (print-function . ,New_slur::print)
760 (spacing-procedure . ,Spanner::set_spacing_rods)
761 (minimum-length . 1.5)
762 (after-line-breaking-callback . ,New_slur::after_line_breaking)
763 (Y-extent-callback . ,New_slur::height)
766 (meta . ((interfaces . (slur-interface spanner-interface))))
769 (NonMusicalPaperColumn
772 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
773 (before-line-breaking-callback . ,Paper_column::before_line_breaking)
775 ;; debugging stuff: print column number.
776 ; (print-function . ,Paper_column::print) (font-name . "ecrm8") (Y-extent-callback . #f)
779 (meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
784 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
785 (print-function . ,Multi_measure_rest::percent)
788 (font-encoding . fetaMusic)
789 (meta . ((interfaces . (multi-measure-rest-interface spanner-interface font-interface percent-repeat-interface))))
792 (PianoPedalBracket ;; an example of a text spanner
794 (print-function . ,Piano_pedal_bracket::print)
796 (bound-padding . 1.0)
798 (bracket-flare . (0.5 . 0.5))
799 (edge-height . (1.0 . 1.0))
800 (shorten-pair . (0.0 . 0.0))
802 (meta . ((interfaces . (line-interface piano-pedal-interface piano-pedal-bracket-interface spanner-interface))))
806 (RemoveEmptyVerticalGroup
808 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
809 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
812 (meta . ((interfaces . (axis-group-interface hara-kiri-group-interface item-interface spanner-interface))))
817 (print-function . ,Percent_repeat_item_interface::beat_slash)
820 (meta . ((interfaces . (percent-repeat-interface item-interface ))))
824 (after-line-breaking-callback . ,Rest::after_line_breaking)
825 (X-extent-callback . ,Rest::extent_callback)
826 (Y-extent-callback . ,Rest::extent_callback)
827 (print-function . ,Rest::print)
828 (Y-offset-callbacks . (,Staff_symbol_referencer::callback
829 ,Rest::polyphonic_offset_callback
831 (minimum-distance . 0.25)
833 (interfaces . (font-interface
834 rhythmic-head-interface
835 rhythmic-grob-interface
836 staff-symbol-referencer-interface
837 rest-interface item-interface ))
842 (minimum-distance . 0.75)
843 (meta . ((interfaces . (rest-collision-interface item-interface ))))
848 ;; don't set direction here: it breaks staccato.
849 (print-function . ,Script_interface::print)
851 ;; This value is sensitive: if too large, staccato dots will move a
854 (staff-padding . 0.25)
855 ;; (script-priority . 0) priorities for scripts, see script.scm
856 (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
857 (before-line-breaking-callback . ,Script_interface::before_line_breaking)
858 (font-encoding . fetaMusic)
859 (meta . ((interfaces . (script-interface side-position-interface font-interface item-interface ))))
864 (before-line-breaking-callback . ,Script_column::before_line_breaking)
865 (meta . ((interfaces . (script-column-interface item-interface ))))
870 (print-function . ,New_slur::print)
872 (spacing-procedure . ,Spanner::set_spacing_rods)
873 (minimum-length . 1.5)
874 (after-line-breaking-callback . ,New_slur::after_line_breaking)
875 (Y-extent-callback . ,New_slur::height)
879 (meta . ((interfaces . (slur-interface spanner-interface))))
884 (spacing-procedure . ,Spacing_spanner::set_springs)
885 (grace-space-factor . 0.6)
886 (shortest-duration-space . 2.0)
887 (spacing-increment . 1.2)
888 (base-shortest-duration . ,(ly:make-moment 1 8))
889 (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
894 (break-align-symbol . staff-bar)
895 (bar-size-procedure . ,Span_bar::get_bar_size)
896 (print-function . ,Span_bar::print)
897 (X-extent-callback . ,Span_bar::width_callback)
898 (Y-extent-callback . ())
900 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
904 ;; Ross. page 151 lists other values, we opt for a leaner look
908 (hair-thickness . 1.6)
909 (thick-thickness . 6.0)
910 (meta . ((interfaces . (span-bar-interface font-interface
911 bar-line-interface item-interface ))))
915 . ((print-function . ,Text_item::print)
918 (X-offset-callbacks . (,Side_position_interface::aligned_side))
920 (meta . ((interfaces . (side-position-interface stanza-number-interface text-interface font-interface item-interface ))))
926 (stem-spacing-correction . 0.4)
928 (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface ))))
933 (print-function . ,Text_item::print)
935 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
936 (no-spacing-rods . #t)
937 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
938 (font-shape . italic)
939 (self-alignment-X . 0)
940 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface))))
943 (SostenutoPedalLineSpanner
946 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
947 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
951 (minimum-space . 1.0)
953 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
958 (print-function . ,Staff_symbol::print)
960 (ledger-line-thickness . (1.0 . 0.1))
962 (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
967 ;; this list is rather long. Trim --hwn
968 (before-line-breaking-callback . ,Stem::before_line_breaking)
969 (print-function . ,Stem::print)
972 ;; 3.5 (or 3 measured from note head) is standard length
973 ;; 32nd, 64th flagged stems should be longer
974 (lengths . (3.5 3.5 3.5 4.5 5.0))
976 ;; Stems in unnatural (forced) direction should be shortened by
977 ;; one staff space, according to [Roush & Gourlay].
978 ;; Flagged stems we shorten only half a staff space.
979 (stem-shorten . (1.0 0.5))
981 ;; default stem direction for note on middle line
982 (neutral-direction . -1)
986 ;; FIXME. 3.5 yields too long beams (according to Ross and
987 ;; looking at Baerenreiter examples) for a number of common
988 ;; boundary cases. Subtracting half a beam thickness fixes
989 ;; this, but the bug may well be somewhere else.
991 ;; FIXME this should come from 'lengths
993 (beamed-lengths . (3.26 3.26 1.5))
995 ;; We use the normal minima as minimum for the ideal lengths,
996 ;; and the extreme minima as abolute minimum length.
998 ;; The 'normal' minima
999 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1001 ;; The 'extreme case' minima
1002 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1004 (X-offset-callbacks . (,Stem::off_callback))
1005 (X-extent-callback . ,Stem::dim_callback)
1006 (Y-extent-callback . ,Stem::height)
1007 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1008 (meta . ((interfaces . (stem-interface font-interface item-interface ))))
1013 (print-function . ,Stem_tremolo::print)
1014 (Y-extent-callback . ,Stem_tremolo::height)
1015 (X-extent-callback . #f)
1017 (beam-width . 1.6) ; staff-space
1018 (beam-thickness . 0.48) ; staff-space
1019 (meta . ((interfaces . (stem-tremolo-interface item-interface ))))
1024 (X-extent-callback . #f)
1025 (Y-extent-callback . #f)
1026 (meta . ((interfaces . (spacing-interface separation-item-interface item-interface ))))
1029 (SeparatingGroupSpanner
1031 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1032 (meta . ((interfaces . (only-prebreak-interface spacing-interface separation-spanner-interface spanner-interface))))
1037 (no-spacing-rods . #t)
1038 (print-function . ,Sustain_pedal::print)
1039 (self-alignment-X . 0)
1041 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1042 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1043 (meta . ((interfaces . (piano-pedal-interface text-spanner-interface text-interface self-alignment-interface font-interface item-interface))))
1046 (SustainPedalLineSpanner
1049 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1050 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1053 (staff-padding . 1.2)
1054 (minimum-space . 1.0)
1056 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1062 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1063 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1064 (meta . ((interfaces . (system-interface axis-group-interface spanner-interface))))
1070 (print-function . ,System_start_delimiter::print)
1071 (collapse-height . 5.0)
1072 (font-encoding . fetaBraces)
1073 (Y-extent-callback . #f)
1074 (meta . ((interfaces . (system-start-delimiter-interface font-interface))))
1079 (Y-extent-callback . #f)
1080 (print-function . ,System_start_delimiter::print)
1086 (collapse-height . 1)
1088 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1093 (Y-extent-callback . #f)
1094 (print-function . ,System_start_delimiter::print)
1095 (glyph . "bar-line")
1097 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
1098 (meta . ((interfaces . (system-start-delimiter-interface spanner-interface))))
1103 (print-function . ,Text_item::print)
1104 (no-spacing-rods . #t)
1105 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1108 (staff-padding . 0.5)
1109 (script-priority . 200)
1110 ;; todo: add X self alignment?
1111 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1115 (print-function . ,Text_item::print)
1116 (no-spacing-rods . #t)
1117 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1118 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1120 (extra-offset . (-1 . 0))
1122 (staff-padding . 0.5)
1123 (script-priority . 200)
1124 ;; todo: add X self alignment?
1126 (font-series . bold)
1127 (meta . ((interfaces . (text-script-interface text-interface side-position-interface font-interface item-interface ))))
1131 (print-function . ,Text_spanner::print)
1132 (font-shape . italic)
1133 (style . dashed-line)
1134 (staff-padding . 0.1)
1135 (dash-fraction . 0.2)
1138 (meta . ((interfaces . (text-spanner-interface side-position-interface font-interface spanner-interface))))
1143 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1144 (print-function . ,Ottava_bracket::print)
1145 (font-shape . italic)
1146 (shorten-pair . (0.0 . -0.6))
1147 (staff-padding . 1.0)
1149 (minimum-length . 1.0)
1150 (dash-fraction . 0.3)
1151 (edge-height . (0 . 1.2))
1153 (meta . ((interfaces . (ottava-bracket-interface
1154 line-interface side-position-interface
1155 font-interface text-interface spanner-interface))))
1161 (print-function . ,Text_item::print)
1162 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1163 (extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
1164 (stem-attachment-function . ,tablature-stem-attachment-function)
1165 (meta . ((interfaces
1166 . (rhythmic-head-interface
1168 note-head-interface staff-symbol-referencer-interface
1169 text-interface item-interface ))))
1175 (print-function . ,Tie::print)
1176 (spacing-procedure . ,Spanner::set_spacing_rods)
1177 (staffline-clearance . 0.35)
1178 (details . ((ratio . 0.333) (height-limit . 1.0)))
1182 (minimum-length . 2.5)
1183 (meta . ((interfaces . (tie-interface spanner-interface))))
1188 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
1189 (X-extent-callback . #f)
1190 (Y-extent-callback . #f)
1191 (meta . ((interfaces . (tie-column-interface spanner-interface))))
1196 (print-function . ,Time_signature::print)
1197 ; (print-function . ,Text_item::print)
1198 (break-align-symbol . time-signature)
1199 (break-visibility . ,all-visible)
1201 (first-note . (fixed-space . 2.0))
1202 (right-edge . (extra-space . 0.5))
1203 (staff-bar . (minimum-space . 2.0))
1207 ; (text . (,time-signature-glue-markup))
1208 (meta . ((interfaces . (time-signature-interface break-aligned-interface font-interface item-interface ))))
1215 (edge-height . (0.7 . 0.7))
1216 (shorten-pair . (-0.2 . -0.2))
1217 (before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
1218 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
1219 (print-function . ,Tuplet_bracket::print)
1220 (font-shape . italic)
1221 (font-series . bold)
1224 (meta . ((interfaces . (text-interface line-interface tuplet-bracket-interface font-interface spanner-interface))))
1229 (print-function . ,Text_item::print)
1230 (font-shape . italic)
1231 (no-spacing-rods . #t)
1232 (self-alignment-X . 0)
1234 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
1235 (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1236 (meta . ((interfaces . (text-interface self-alignment-interface font-interface item-interface ))))
1239 (UnaCordaPedalLineSpanner
1242 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1243 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1245 (staff-padding . 1.2)
1246 (minimum-space . 1.0)
1248 (meta . ((interfaces . (piano-pedal-interface axis-group-interface side-position-interface spanner-interface))))
1255 (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1256 (print-function . ,Vaticana_ligature::print)
1257 (meta . ((interfaces . (vaticana-ligature-interface font-interface))))
1262 (print-function . ,Volta_bracket_interface::print)
1265 (font-encoding . fetaNumber)
1266 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1267 (thickness . 1.6) ; linethickness
1268 (height . 2.0) ; staffspace;
1271 (meta . ((interfaces . (volta-bracket-interface line-interface text-interface side-position-interface font-interface spanner-interface))))
1277 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1278 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1280 (meta . ((interfaces . (align-interface axis-group-interface spanner-interface))))
1286 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1287 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1289 (meta . ((interfaces . (axis-group-interface spanner-interface))))
1297 (define (completize-grob-entry x)
1298 "transplant assoc key into 'name entry of 'meta of X
1300 (let* ((name-sym (car x))
1301 (grob-entry (cdr x))
1302 (metaentry (cdr (assoc 'meta grob-entry)))
1304 (cdr (assoc 'interfaces metaentry)))
1307 (set! metaentry (assoc-set! metaentry 'name name-sym))
1308 (set! metaentry (assoc-set! metaentry 'interfaces
1309 (cons 'grob-interface ifaces-entry)))
1310 (set! grob-entry (assoc-set! grob-entry 'meta metaentry))
1311 (cons name-sym grob-entry)))
1313 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1317 ; (display (map pair? all-grob-descriptions))
1320 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1323 ; (display (car x)) (newline)
1325 (set-object-property! (car x) 'translation-type? list?)
1326 (set-object-property! (car x) 'is-grob? #t))
1327 all-grob-descriptions)
1330 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))