1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;;; distances are given in line-thickness (thicknesses) and
9 ;;;; staff-space (distances)
11 ;;;; WARNING: the meta field should be the last one.
12 ;;;; WARNING: don't use anonymous functions for initialization.
14 ;; TODO: junk the meta field in favor of something more compact?
16 ;;; todo:: reorder sensibly.
18 (define-public all-grob-descriptions
23 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
24 (alteration . ,accidental-interface::calc-alteration)
25 (stencil . ,ly:accidental-interface::print)
26 (Y-extent . ,ly:accidental-interface::height)
27 (X-extent . ,ly:accidental-interface::width)
28 (meta . ((class . Item)
29 (interfaces . (accidental-interface
36 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
37 (alteration . ,accidental-interface::calc-alteration)
38 (stencil . ,ly:accidental-interface::print)
39 (Y-extent . ,ly:accidental-interface::height)
40 (meta . ((class . Item)
41 (interfaces . (accidental-interface
46 (stencil . ,ly:accidental-interface::print)
47 (X-extent . ,ly:accidental-interface::width)
48 (Y-extent . ,ly:accidental-interface::height)
49 (X-offset . ,(ly:make-simple-closure
51 ,(ly:make-simple-closure
52 (list ly:self-alignment-interface::centered-on-x-parent))
53 ,(ly:make-simple-closure
54 (list ly:self-alignment-interface::x-aligned-on-self)))))
55 (self-alignment-X . ,CENTER)
57 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
58 (alteration . ,accidental-interface::calc-alteration)
59 (Y-offset . ,ly:side-position-interface::y-aligned-side)
61 (staff-padding . 0.25)
62 (outside-staff-priority . 0)
65 (meta . ((class . Item)
66 (interfaces . (side-position-interface
69 accidental-suggestion-interface
70 self-alignment-interface
77 ;; for horizontally stacked scripts.
78 (script-priority . -100)
81 (positioning-done . ,ly:accidental-placement::calc-positioning-done)
82 (X-extent . ,ly:axis-group-interface::width)
84 ;; this is quite small, but it is very ugly to have
85 ;; accs closer to the previous note than to the next one.
86 (right-padding . 0.15)
87 (meta . ((class . Item)
88 (interfaces . (accidental-placement-interface))))))
93 (X-extent . ,ly:axis-group-interface::width)
94 (Y-extent . ,ly:axis-group-interface::height)
96 (clef . (extra-space . 0.5))
97 (key-signature . (extra-space . 0.0))
98 (staff-bar . (extra-space . 0.0))
99 (time-signature . (extra-space . 0.0))
100 (first-note . (fixed-space . 0.0))))
102 (break-align-symbol . ambitus)
103 (break-visibility . ,begin-of-line-visible)
104 (meta . ((class . Item)
105 (interfaces . (axis-group-interface
106 break-aligned-interface
107 ambitus-interface))))))
111 (stencil . ,ly:ambitus::print)
114 (X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
115 (meta . ((class . Item)
116 (interfaces . (ambitus-interface
117 staff-symbol-referencer-interface
121 (font-family . music)
123 (X-offset . ,ly:side-position-interface::x-aligned-side)
125 (stencil . ,ly:accidental-interface::print)
126 (Y-extent . ,ly:accidental-interface::height)
127 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
129 (meta . ((class . Item)
132 break-aligned-interface
133 side-position-interface
139 (stencil . ,ly:note-head::print)
140 (glyph-name . ,note-head::calc-glyph-name)
141 (Y-offset . ,ly:staff-symbol-referencer::callback)
142 (meta . ((class . Item)
143 (interfaces . (font-interface
146 staff-symbol-referencer-interface
147 rhythmic-head-interface
148 ledgered-interface))))))
151 . ((X-extent . ,ly:arpeggio::width)
152 (stencil . ,ly:arpeggio::print)
153 (Y-offset . ,ly:staff-symbol-referencer::callback)
154 (X-offset . ,ly:side-position-interface::x-aligned-side)
156 (positions . ,ly:arpeggio::calc-positions)
158 (script-priority . 0)
160 (staff-position . 0.0)
161 (Y-extent . ,ly:arpeggio::height)
162 (meta . ((class . Item)
163 (interfaces . (arpeggio-interface
164 staff-symbol-referencer-interface
165 side-position-interface
169 . ((stencil . ,ly:balloon-interface::print)
170 (text . ,(grob::calc-property-by-copy 'text))
171 (X-offset . ,(grob::calc-property-by-copy 'X-offset))
172 (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
173 (meta . ((class . Item)
174 (interfaces . (balloon-interface
179 (break-align-symbol . staff-bar)
180 (break-align-anchor . ,ly:bar-line::calc-anchor)
184 (break-visibility . ,bar-line::calc-break-visibility)
186 (stencil . ,ly:bar-line::print)
187 (glyph-name . ,bar-line::calc-glyph-name)
188 (bar-size . ,ly:bar-line::calc-bar-size)
189 (bar-extent . ,ly:bar-line::calc-bar-extent)
190 (allow-span-bar . #t)
193 (time-signature . (extra-space . 0.75))
194 (custos . (minimum-space . 2.0))
195 (clef . (minimum-space . 1.0))
196 (key-signature . (extra-space . 1.0))
197 (key-cancellation . (extra-space . 1.0))
198 (first-note . (fixed-space . 1.3))
199 (next-note . (semi-fixed-space . 0.9))
200 (right-edge . (extra-space . 0.0))))
203 ;; Ross. page 151 lists other values, we opt for a leaner look
206 ;; kern should scale with line-thickness too.
209 (hair-thickness . 1.9)
210 (thick-thickness . 6.0)
211 (meta . ((class . Item)
212 (interfaces . (bar-line-interface
213 break-aligned-interface
218 (stencil . ,ly:text-interface::print)
220 (break-visibility . ,begin-of-line-visible)
223 (font-family . roman)
225 (Y-offset . ,ly:side-position-interface::y-aligned-side)
227 (outside-staff-priority . 100)
228 (X-offset . ,(ly:make-simple-closure
230 ,(ly:make-simple-closure
231 (list ly:break-alignable-interface::self-align-callback))
232 ,(ly:make-simple-closure
233 (list ly:self-alignment-interface::x-aligned-on-self)))))
235 (self-alignment-X . ,RIGHT)
237 ;; want the bar number before the clef at line start.
238 (break-align-symbols . (left-edge staff-bar))
241 (interfaces . (side-position-interface
243 break-alignable-interface
244 self-alignment-interface
249 (stencil . ,ly:text-interface::print)
250 (meta . ((class . Item)
251 (interfaces . (text-interface
252 rhythmic-grob-interface
253 bass-figure-interface
259 (threshold . (2 . 1000))
260 (positioning-done . ,ly:align-interface::calc-positioning-done)
261 (Y-extent . ,ly:axis-group-interface::height)
262 (stacking-dir . ,DOWN)
264 (meta . ((class . Spanner)
265 (interfaces . (align-interface
266 bass-figure-alignment-interface
267 axis-group-interface))))))
269 (BassFigureAlignmentPositioning
270 . ((Y-offset . ,ly:side-position-interface::y-aligned-side)
273 (Y-extent . ,ly:axis-group-interface::height)
275 (staff-padding . 1.0)
277 (meta . ((class . Spanner)
278 (interfaces . (side-position-interface
279 axis-group-interface))))))
283 (stencil . ,ly:enclosing-bracket::print)
284 (X-extent . ,ly:enclosing-bracket::width)
285 (edge-height . (0.2 . 0.2))
286 (meta . ((class . Item)
287 (interfaces . (enclosing-bracket-interface))))))
289 (BassFigureContinuation
291 (stencil . ,ly:figured-bass-continuation::print)
292 (Y-offset . ,ly:figured-bass-continuation::center-on-figures)
293 (meta . ((class . Spanner)
294 (interfaces . (figured-bass-continuation-interface))))))
299 (Y-extent . ,ly:axis-group-interface::height)
300 (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
301 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
302 (meta . ((class . Spanner)
303 (interfaces . (axis-group-interface))))))
308 ;; todo: clean this up a bit: the list is getting
311 (positions . ,(ly:make-simple-closure
312 (ly:make-simple-closure
313 (list chain-grob-member-functions
315 ly:beam::calc-least-squares-positions
316 ly:beam::slope-damping
317 ly:beam::shift-region-to-valid
321 ;; this is a hack to set stem lengths, if positions is set.
322 (quantized-positions . ,ly:beam::set-stem-lengths)
323 (concaveness . ,ly:beam::calc-concaveness)
324 (direction . ,ly:beam::calc-direction)
325 (shorten . ,ly:beam::calc-stem-shorten)
326 (beaming . ,ly:beam::calc-beaming)
327 (stencil . ,ly:beam::print)
329 (cross-staff . ,ly:beam::calc-cross-staff)
331 (details . ((hint-direction-penalty . 20)))
332 ;; TODO: should be in SLT.
333 (thickness . 0.48) ; in staff-space
334 (neutral-direction . ,DOWN)
336 ;; Whe have some unreferenced problems here.
338 ;; If we shorten beamed stems less than normal stems (1 staff-space),
339 ;; or high order less than 8th beams, patterns like
340 ;; c''4 [c''8 c''] c''4 [c''16 c]
341 ;; are ugly (different stem lengths).
343 ;; But if we shorten 16th beams as much as 8th beams, a single
344 ;; forced 16th beam looks *very* short.
346 ;; We choose to shorten 8th beams the same as single stems,
347 ;; and high order beams less than 8th beams, so that all
348 ;; isolated shortened beams look nice and a bit shortened,
349 ;; sadly possibly breaking patterns with high order beams.
350 (beamed-stem-shorten . (1.0 0.5 0.25))
352 (auto-knee-gap . 5.5)
354 ;; only for debugging.
355 (font-family . roman)
356 (meta . ((class . Spanner)
357 (object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems)))
358 (interfaces . (staff-symbol-referencer-interface
359 unbreakable-spanner-interface
365 (stencil . ,bend::print)
367 (meta . ((class . Spanner)
368 (interfaces . (spanner-interface
369 bend-after-interface))))))
375 (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
376 (X-extent . ,ly:axis-group-interface::width)
377 (break-align-orders . ;; end of line
399 time-signature custos)
413 (meta . ((class . Item)
414 (interfaces . (break-alignment-interface
415 axis-group-interface))))))
420 (X-extent . ,ly:axis-group-interface::width)
421 (break-align-anchor . ,ly:break-aligned-interface::calc-average-anchor)
422 (break-visibility . ,ly:break-aligned-interface::calc-break-visibility)
423 (meta . ((class . Item)
424 (interfaces . (break-aligned-interface
425 axis-group-interface))))))
429 (break-align-symbol . breathing-sign)
432 (ambitus . (extra-space . 2.0))
433 (custos . (minimum-space . 1.0))
434 (key-signature . (minimum-space . 1.5))
435 (time-signature . (minimum-space . 1.5))
436 (staff-bar . (minimum-space . 1.5))
437 (clef . (minimum-space . 2.0))
438 (first-note . (fixed-space . 1.0)) ;huh?
439 (right-edge . (extra-space . 0.1))))
440 (stencil . ,ly:text-interface::print)
441 (text . ,(make-musicglyph-markup "scripts.rcomma"))
442 (Y-offset . ,ly:breathing-sign::offset-callback)
443 (break-visibility . ,begin-of-line-invisible)
444 (meta . ((class . Item)
445 (interfaces . (break-aligned-interface
446 breathing-sign-interface
452 (stencil . ,ly:clef::print)
453 (glyph-name . ,ly:clef::calc-glyph-name)
455 (avoid-slur . inside)
456 (font-family . music)
457 (break-align-symbol . clef)
458 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
459 (break-visibility . ,begin-of-line-visible)
460 (space-alist . ((ambitus . (extra-space . 2.0))
461 (staff-bar . (extra-space . 0.7))
462 (key-cancellation . (minimum-space . 3.5))
463 (key-signature . (minimum-space . 3.5))
464 (time-signature . (minimum-space . 4.2))
465 (first-note . (minimum-fixed-space . 5.0))
466 (next-note . (extra-space . 0.5))
467 (right-edge . (extra-space . 0.5))))
468 (Y-offset . ,ly:staff-symbol-referencer::callback)
469 (meta . ((class . Item)
470 (interfaces . (clef-interface
471 staff-symbol-referencer-interface
473 break-aligned-interface))))))
475 (ClusterSpannerBeacon
477 (Y-extent . ,ly:cluster-beacon::height)
478 (meta . ((class . Item)
479 (interfaces . (rhythmic-grob-interface
480 cluster-beacon-interface))))))
484 (springs-and-rods . ,ly:spanner::set-spacing-rods)
485 (stencil . ,ly:cluster::print)
486 (minimum-length . 0.0)
488 (cross-staff . ,ly:cluster::calc-cross-staff)
490 (meta . ((class . Spanner)
491 (interfaces . (cluster-interface))))))
495 (stencil . ,ly:text-interface::print)
496 (after-line-breaking . ,ly:chord-name::after-line-breaking)
500 (meta . ((class . Item)
501 (interfaces . (font-interface
502 rhythmic-grob-interface
504 chord-name-interface))))))
508 (stencil . ,ly:text-interface::print)
509 (extra-spacing-width . (+inf.0 . -inf.0))
510 (Y-offset . ,ly:side-position-interface::y-aligned-side)
511 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
514 (staff-padding . 0.5)
515 (script-priority . 200)
516 ;; todo: add X self alignment?
519 (avoid-slur . outside )
521 (meta . ((class . Item)
522 (interfaces . (text-script-interface
524 side-position-interface
529 (break-align-symbol . custos)
531 (stencil . ,ly:custos::print)
532 (break-visibility . ,end-of-line-visible)
534 (neutral-direction . ,DOWN)
535 (Y-offset . ,ly:staff-symbol-referencer::callback)
537 (first-note . (minimum-fixed-space . 0.0))
538 (right-edge . (extra-space . 0.1))))
539 (meta . ((class . Item)
540 (interfaces . (custos-interface
541 staff-symbol-referencer-interface
543 break-aligned-interface))))))
549 (positioning-done . ,ly:dot-column::calc-positioning-done)
550 (X-extent . ,ly:axis-group-interface::width)
551 (meta . ((class . Item)
552 (interfaces . (dot-column-interface
553 axis-group-interface))))))
557 (stencil . ,ly:dots::print)
558 (dot-count . ,dots::calc-dot-count)
559 (staff-position . ,dots::calc-staff-position)
560 (meta . ((class . Item)
561 (interfaces . (font-interface
562 staff-symbol-referencer-interface
567 (stencil . ,ly:percent-repeat-item-interface::double-percent)
570 (dot-negative-kern . 0.75)
571 (slash-negative-kern . 1.6)
572 (font-encoding . fetaMusic)
575 (break-align-symbol . staff-bar)
576 (break-visibility . ,begin-of-line-invisible)
577 (meta . ((class . Item)
578 (interfaces . (font-interface
579 break-aligned-interface
580 percent-repeat-interface
581 percent-repeat-item-interface))))))
583 (DoublePercentRepeatCounter
585 (stencil . ,ly:text-interface::print)
586 (X-offset . ,(ly:make-simple-closure
588 ,(ly:make-simple-closure
589 (list ly:self-alignment-interface::centered-on-y-parent))
590 ,(ly:make-simple-closure
591 (list ly:self-alignment-interface::x-aligned-on-self)))))
592 (Y-offset . ,ly:side-position-interface::y-aligned-side)
593 (font-encoding . fetaNumber)
594 (self-alignment-X . ,CENTER)
598 (staff-padding . 0.25)
600 (meta . ((class . Item)
601 (interfaces . (side-position-interface
602 self-alignment-interface
603 percent-repeat-item-interface
604 percent-repeat-interface
611 (Y-offset . ,ly:side-position-interface::y-aligned-side)
612 (staff-padding . 0.1)
615 (minimum-space . 1.2)
618 (outside-staff-priority . 250)
619 (Y-extent . ,ly:axis-group-interface::height)
620 (X-extent . ,ly:axis-group-interface::width)
621 (cross-staff . ,ly:side-position-interface::calc-cross-staff)
622 (meta . ((class . Spanner)
623 (interfaces . (axis-group-interface
625 dynamic-line-spanner-interface
626 side-position-interface))))))
633 (stencil . ,ly:text-interface::print)
634 (direction . ,ly:script-interface::calc-direction)
635 (positioning-done . ,ly:script-interface::calc-positioning-done)
637 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
638 (self-alignment-X . ,CENTER)
639 (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
640 (self-alignment-Y . ,CENTER)
642 (font-encoding . fetaDynamic)
643 (font-shape . italic)
644 (extra-spacing-width . (+inf.0 . -inf.0))
645 (outside-staff-priority . 250)
646 (meta . ((class . Item)
647 (interfaces . (font-interface
649 self-alignment-interface
651 script-interface))))))
655 ;; rather ugh with NCSB
656 ;; (font-series . bold)
657 (font-shape . italic)
658 (style . dashed-line)
660 ;; make sure the spanner doesn't get too close to notes
661 (minimum-Y-extent . (-1 . 1))
662 (bound-details . ((right . ((attach-dir . ,LEFT)
666 (right-broken . ((attach-dir . ,RIGHT)
670 (left . ((attach-dir . ,LEFT)
672 (stencil-offset . (0 . -0.5))
675 (left-broken . ((attach-dir . ,RIGHT)
678 (stencil . ,ly:line-spanner::print)
679 (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
680 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
682 ;; need to blend with dynamic texts.
684 (dash-fraction . 0.2)
686 (meta . ((class . Spanner)
687 (interfaces . (font-interface
689 line-spanner-interface
692 dynamic-text-spanner-interface
693 spanner-interface))))))
699 ;; sync with TextScript (?)
702 (avoid-slur . around)
704 (staff-padding . 0.5)
705 (self-alignment-X . ,CENTER)
706 (self-alignment-Y . ,CENTER)
707 (script-priority . 100)
708 (stencil . ,ly:text-interface::print)
709 (direction . ,ly:script-interface::calc-direction)
710 (positioning-done . ,ly:script-interface::calc-positioning-done)
711 (cross-staff . ,ly:side-position-interface::calc-cross-staff)
713 (text . ,fingering::calc-text)
714 (font-encoding . fetaNumber)
715 (font-size . -5) ; don't overlap when next to heads.
716 (meta . ((class . Item)
717 (interfaces . (finger-interface
719 text-script-interface
721 side-position-interface
722 self-alignment-interface))))))
725 . ((stencil . ,fret-board::calc-stencil)
726 (fret-diagram-details . ((finger-code . below-string)))
727 (meta . ((class . Item)
728 (interfaces . (fret-diagram-interface
736 (zigzag-width . 0.75)
739 (bound-details . ((right . ((attach-dir . ,CENTER)
742 (left . ((attach-dir . ,CENTER)
746 (stencil . ,ly:line-spanner::print)
747 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
748 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
749 (meta . ((class . Spanner)
750 (interfaces . (line-interface
751 unbreakable-spanner-interface
752 line-spanner-interface))))))
756 (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
757 (spacing-increment . 0.8)
758 (shortest-duration-space . 1.6)
759 (meta . ((class . Spanner)
760 (interfaces . (grace-spacing-interface
761 spacing-options-interface
762 spanner-interface))))))
768 (meta . ((class . Item)
769 (interfaces . (grid-point-interface))))))
773 (X-extent . ,ly:grid-line-interface::width)
774 (stencil . ,ly:grid-line-interface::print)
775 (self-alignment-X . ,CENTER)
776 (X-offset . ,(ly:make-simple-closure
778 ,(ly:make-simple-closure
779 (list ly:self-alignment-interface::centered-on-x-parent))
780 ,(ly:make-simple-closure
781 (list ly:self-alignment-interface::x-aligned-on-self)))))
783 (meta . ((class . Item)
784 (interfaces . (self-alignment-interface
785 grid-line-interface))))))
790 (stencil . ,ly:hairpin::print)
791 (springs-and-rods . ,ly:spanner::set-spacing-rods)
792 (after-line-breaking . ,ly:hairpin::after-line-breaking)
793 (grow-direction . ,hairpin::calc-grow-direction)
798 (minimum-length . 2.0)
799 (bound-padding . 1.0)
800 (self-alignment-Y . ,CENTER)
801 (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
802 (meta . ((class . Spanner)
803 (interfaces . (hairpin-interface
805 self-alignment-interface
807 spanner-interface))))))
812 (stencil . ,ly:horizontal-bracket::print)
813 (Y-offset . ,ly:side-position-interface::y-aligned-side)
814 (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
817 (staff-padding . 0.2)
820 (bracket-flare . (0.5 . 0.5))
821 (meta . ((class . Spanner)
822 (interfaces . (horizontal-bracket-interface
823 side-position-interface
825 spanner-interface))))))
831 (stencil . ,ly:system-start-text::print)
832 (X-offset . ,ly:side-position-interface::x-aligned-side)
834 (self-alignment-Y . ,CENTER)
835 (self-alignment-X . ,CENTER)
836 (meta . ((class . Spanner)
837 (interfaces . (system-start-text-interface
838 side-position-interface
839 self-alignment-interface
845 (stencil . ,ly:text-interface::print)
846 (Y-offset . ,ly:side-position-interface::y-aligned-side)
847 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
848 (staff-padding . 0.5)
851 (self-alignment-X . ,LEFT)
852 (outside-staff-priority . 500)
853 (extra-spacing-width . (+inf.0 . -inf.0))
854 (meta . ((class . Item)
855 (interfaces . (side-position-interface
856 self-alignment-interface
863 (stencil . ,ly:key-signature-interface::print)
864 (glyph-name-alist . ,cancellation-glyph-name-alist)
866 (time-signature . (extra-space . 1.25))
867 (staff-bar . (extra-space . 0.6))
868 (key-signature . (extra-space . 0.5))
869 (right-edge . (extra-space . 0.5))
870 (first-note . (fixed-space . 2.5))))
871 (Y-offset . ,ly:staff-symbol-referencer::callback)
872 (break-align-symbol . key-cancellation)
873 (break-visibility . ,begin-of-line-invisible)
875 (meta . ((class . Item)
876 (interfaces . (key-cancellation-interface
877 key-signature-interface
878 staff-symbol-referencer-interface
880 break-aligned-interface))))))
884 (stencil . ,ly:key-signature-interface::print)
885 (avoid-slur . inside)
886 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
888 (time-signature . (extra-space . 1.15))
889 (staff-bar . (extra-space . 1.1))
890 (right-edge . (extra-space . 0.5))
891 (first-note . (fixed-space . 2.5))))
892 (Y-offset . ,ly:staff-symbol-referencer::callback)
893 (break-align-symbol . key-signature)
894 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
895 (break-visibility . ,begin-of-line-visible)
897 (meta . ((class . Item)
898 (interfaces . (key-signature-interface
899 staff-symbol-referencer-interface
901 break-aligned-interface))))))
906 (stencil . ,ly:tie::print)
907 (control-points . ,ly:semi-tie::calc-control-points)
908 (direction . ,ly:tie::calc-direction)
909 (details . ((ratio . 0.333)
910 (height-limit . 1.0)))
911 (head-direction . ,LEFT)
913 (meta . ((class . Item)
914 (interfaces . (semi-tie-interface))))))
916 (LaissezVibrerTieColumn
920 (head-direction . ,LEFT)
921 (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
922 (meta . ((class . Item)
923 (interfaces . (semi-tie-column-interface))))))
927 (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
928 (stencil . ,ly:ledger-line-spanner::print)
931 (minimum-length-fraction . 0.25)
932 (length-fraction . 0.25)
934 (meta . ((class . Spanner)
935 (interfaces . (ledger-line-spanner-interface))))))
939 (break-align-symbol . left-edge)
940 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
943 (break-visibility . ,center-invisible)
945 (custos . (extra-space . 0.0))
946 (ambitus . (extra-space . 2.0))
947 (time-signature . (extra-space . 1.0))
948 (staff-bar . (extra-space . 0.0))
949 (breathing-sign . (minimum-space . 0.0))
950 (clef . (extra-space . 0.8))
951 (first-note . (fixed-space . 2.0))
952 (right-edge . (extra-space . 0.0))
953 (key-signature . (extra-space . 0.0))
954 (key-cancellation . (extra-space . 0.0))
956 (meta . ((class . Item)
957 (interfaces . (break-aligned-interface))))))
961 ;; ugh. A ligature bracket is totally different from
966 (edge-height . (0.7 . 0.7))
967 (shorten-pair . (-0.2 . -0.2))
969 (positions . ,ly:tuplet-bracket::calc-positions)
970 (stencil . ,ly:tuplet-bracket::print)
971 (staff-padding . 0.25)
972 (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
973 (control-points . ,ly:tuplet-bracket::calc-control-points)
974 (meta . ((class . Spanner)
975 (interfaces . (line-interface
976 tuplet-bracket-interface))))))
980 (stencil . ,ly:lyric-extender::print)
981 (thickness . 0.8) ; line-thickness
982 (minimum-length . 1.5)
984 (meta . ((class . Spanner)
985 (interfaces . (lyric-interface
986 lyric-extender-interface))))))
994 (minimum-length . 0.3)
995 (minimum-distance . 0.1)
997 (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
998 (stencil . ,ly:lyric-hyphen::print)
1000 (meta . ((class . Spanner)
1001 (interfaces . (lyric-interface
1003 lyric-hyphen-interface
1004 spanner-interface))))))
1007 . ((minimum-distance . 0.45)
1008 (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1012 (meta . ((class . Spanner)
1013 (interfaces . (spanner-interface
1014 lyric-hyphen-interface))))))
1018 (stencil . ,lyric-text::print)
1019 (text . ,(grob::calc-property-by-copy 'text))
1020 (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1021 (self-alignment-X . ,CENTER)
1023 (font-series . bold-narrow)
1025 (extra-spacing-width . (0.0 . 0.0))
1026 (meta . ((class . Item)
1027 (interfaces . (rhythmic-grob-interface
1028 lyric-syllable-interface
1029 self-alignment-interface
1031 font-interface))))))
1036 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1038 (stencil . ,ly:measure-grouping::print)
1044 (meta . ((class . Spanner)
1045 (interfaces . (side-position-interface
1046 measure-grouping-interface))))))
1050 (neutral-direction . ,DOWN)
1051 (meta . ((class . Item)
1052 (interfaces . (melody-spanner-interface))))))
1058 (stencil . ,ly:mensural-ligature::print)
1059 (meta . ((class . Spanner)
1060 (interfaces . (mensural-ligature-interface
1061 font-interface))))))
1065 (stencil . ,ly:text-interface::print)
1066 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1070 (extra-spacing-width . (+inf.0 . -inf.0))
1071 (outside-staff-priority . 1000)
1072 (meta . ((class . Item)
1073 (interfaces . (text-interface
1074 side-position-interface
1076 metronome-mark-interface))))))
1080 (stencil . ,ly:multi-measure-rest::print)
1081 (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1082 (Y-offset . ,ly:staff-symbol-referencer::callback)
1083 (staff-position . 0)
1085 (thick-thickness . 6.6)
1086 (hair-thickness . 2.0)
1088 (meta . ((class . Spanner)
1089 (interfaces . (multi-measure-rest-interface
1090 multi-measure-interface
1093 staff-symbol-referencer-interface))))))
1095 (MultiMeasureRestNumber
1097 (bound-padding . 2.0)
1098 (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1099 (stencil . ,ly:text-interface::print)
1100 (X-offset . ,(ly:make-simple-closure
1102 ,(ly:make-simple-closure
1103 (list ly:self-alignment-interface::x-aligned-on-self))
1104 ,(ly:make-simple-closure
1105 (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1106 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1108 (self-alignment-X . ,CENTER)
1111 (staff-padding . 0.4)
1112 (font-encoding . fetaNumber)
1113 (meta . ((class . Spanner)
1114 (interfaces . (side-position-interface
1115 multi-measure-interface
1116 self-alignment-interface
1118 text-interface))))))
1120 (MultiMeasureRestText
1122 (stencil . ,ly:text-interface::print)
1123 (X-offset . ,(ly:make-simple-closure
1125 ,(ly:make-simple-closure
1126 (list ly:self-alignment-interface::x-centered-on-y-parent))
1127 ,(ly:make-simple-closure
1128 (list ly:self-alignment-interface::x-aligned-on-self)))))
1129 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1130 (self-alignment-X . ,CENTER)
1133 (staff-padding . 0.25)
1134 (outside-staff-priority . 450)
1135 (meta . ((class . Spanner)
1136 (interfaces . (side-position-interface
1137 multi-measure-interface
1138 self-alignment-interface
1140 text-interface))))))
1143 (NonMusicalPaperColumn
1145 (allow-loose-spacing . #t)
1147 (before-line-breaking . ,ly:paper-column::before-line-breaking)
1148 (X-extent . ,ly:axis-group-interface::width)
1149 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1150 ;; (stencil . ,ly:paper-column::print)
1153 (line-break-permission . allow)
1154 (page-break-permission . allow)
1156 ;; debugging stuff: print column number.
1157 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1159 (meta . ((class . Paper_column)
1160 (interfaces . (paper-column-interface
1161 axis-group-interface
1162 separation-item-interface
1163 spaceable-grob-interface
1164 font-interface))))))
1169 (X-extent . ,ly:axis-group-interface::width)
1170 (Y-extent . ,ly:axis-group-interface::height)
1171 (prefer-dotted-right . #t)
1172 (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1173 (meta . ((class . Item)
1174 (interfaces . (note-collision-interface
1175 axis-group-interface))))))
1180 (X-extent . ,ly:axis-group-interface::width)
1181 (Y-extent . ,ly:axis-group-interface::height)
1182 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1183 (meta . ((class . Item)
1184 (interfaces . (axis-group-interface
1185 separation-item-interface
1186 note-column-interface))))))
1190 (stencil . ,ly:note-head::print)
1191 (duration-log . ,note-head::calc-duration-log)
1192 (stem-attachment . ,ly:note-head::calc-stem-attachment)
1193 (glyph-name . ,note-head::calc-glyph-name)
1194 (Y-offset . ,ly:staff-symbol-referencer::callback)
1195 (X-offset . ,ly:note-head::stem-x-shift)
1196 (meta . ((class . Item)
1197 (interfaces . (rhythmic-grob-interface
1198 rhythmic-head-interface
1202 staff-symbol-referencer-interface
1203 gregorian-ligature-interface
1204 mensural-ligature-interface
1205 vaticana-ligature-interface))))))
1209 (stem-spacing-correction . 0.5)
1210 (same-direction-correction . 0.25)
1211 (space-to-barline . #t)
1212 ;; Changed this from 0.75.
1213 ;; If you ever change this back, please document! --hwn
1214 (knee-spacing-correction . 1.0)
1215 (meta . ((class . Item)
1216 (interfaces . (spacing-interface
1217 note-spacing-interface))))))
1221 (stencil . ,ly:text-interface::print)
1222 (meta . ((class . Item)
1223 (interfaces . (note-name-interface
1225 font-interface))))))
1230 (self-alignment-X . ,CENTER)
1231 (break-visibility . ,begin-of-line-visible)
1232 (X-offset . ,(ly:make-simple-closure
1234 ,(ly:make-simple-closure
1235 (list ly:self-alignment-interface::x-aligned-on-self))
1236 ,(ly:make-simple-closure
1237 (list ly:self-alignment-interface::centered-on-x-parent)))))
1238 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1239 (stencil . ,ly:text-interface::print)
1240 (font-shape . italic)
1241 (staff-padding . 0.2)
1243 (meta . ((class . Item)
1244 (interfaces . (text-interface
1245 self-alignment-interface
1246 side-position-interface
1247 font-interface))))))
1251 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1252 (stencil . ,ly:ottava-bracket::print)
1253 (font-shape . italic)
1254 (shorten-pair . (0.0 . -0.6))
1255 (staff-padding . 1.0)
1257 (minimum-length . 1.0)
1258 (style . dashed-line)
1259 (dash-fraction . 0.3)
1260 (edge-height . (0 . 1.2))
1262 (outside-staff-priority . 400)
1263 (meta . ((class . Spanner)
1264 (interfaces . (ottava-bracket-interface
1265 horizontal-bracket-interface
1267 side-position-interface
1269 text-interface))))))
1275 (allow-loose-spacing . #t)
1276 (before-line-breaking . ,ly:paper-column::before-line-breaking)
1277 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1278 ;; (stencil . ,ly:paper-column::print)
1279 (X-extent . ,ly:axis-group-interface::width)
1282 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1283 (meta . ((class . Paper_column)
1284 (interfaces . (paper-column-interface
1285 separation-item-interface
1286 axis-group-interface
1287 spaceable-grob-interface
1288 font-interface))))))
1291 . ((stencil . ,parentheses-item::print)
1292 (stencils . ,parentheses-item::calc-parenthesis-stencils)
1295 (meta . ((class . Item)
1296 (interfaces . (parentheses-interface font-interface))))))
1298 (HarmonicParenthesesItem
1299 . ((stencil . ,parentheses-item::print)
1301 (stencils . ,parentheses-item::calc-angled-bracket-stencils)
1302 (meta . ((class . Item)
1303 (interfaces . (parentheses-interface font-interface))))))
1306 . ((details . ,default-slur-details)
1307 (control-points . ,ly:slur::calc-control-points)
1308 (direction . ,ly:slur::calc-direction)
1309 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1310 (Y-extent . ,ly:slur::height)
1311 (stencil . ,ly:slur::print)
1313 (minimum-length . 1.5)
1314 (height-limit . 2.0)
1316 (cross-staff . ,ly:slur::calc-cross-staff)
1317 (meta . ((class . Spanner)
1318 (interfaces . (slur-interface))))))
1322 (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1323 (stencil . ,ly:multi-measure-rest::percent)
1326 (dot-negative-kern . 0.75)
1327 (font-encoding . fetaMusic)
1328 (meta . ((class . Spanner)
1329 (interfaces . (multi-measure-rest-interface
1331 percent-repeat-interface))))))
1333 (PercentRepeatCounter
1335 (stencil . ,ly:text-interface::print)
1336 (X-offset . ,(ly:make-simple-closure
1338 ,(ly:make-simple-closure
1339 (list ly:self-alignment-interface::x-centered-on-y-parent))
1340 ,(ly:make-simple-closure
1341 (list ly:self-alignment-interface::x-aligned-on-self)))))
1342 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1343 (self-alignment-X . ,CENTER)
1346 (staff-padding . 0.25)
1348 (font-encoding . fetaNumber)
1349 (meta . ((class . Spanner)
1350 (interfaces . (side-position-interface
1351 self-alignment-interface
1352 percent-repeat-interface
1354 text-interface))))))
1356 ;; an example of a text spanner
1359 (stencil . ,ly:piano-pedal-bracket::print)
1361 (bound-padding . 1.0)
1363 (bracket-flare . (0.5 . 0.5))
1364 (edge-height . (1.0 . 1.0))
1365 (shorten-pair . (0.0 . 0.0))
1367 (meta . ((class . Spanner)
1368 (interfaces . (line-interface
1369 piano-pedal-interface
1370 piano-pedal-bracket-interface))))))
1375 (stencil . ,ly:text-interface::print)
1376 (X-offset . ,(ly:make-simple-closure
1378 ,(ly:make-simple-closure
1379 (list ly:break-alignable-interface::self-align-callback))
1380 ,(ly:make-simple-closure
1381 (list ly:self-alignment-interface::x-aligned-on-self)))))
1382 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1383 (extra-spacing-width . (+inf.0 . -inf.0))
1384 (self-alignment-X . ,CENTER)
1389 (break-visibility . ,end-of-line-invisible)
1390 (break-align-symbols . (staff-bar clef))
1392 (outside-staff-priority . 1500)
1393 (meta . ((class . Item)
1394 (interfaces . (text-interface
1395 side-position-interface
1396 break-alignable-interface
1399 self-alignment-interface))))))
1403 (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1406 (meta . ((class . Item)
1407 (interfaces . (rhythmic-grob-interface
1408 percent-repeat-interface
1409 percent-repeat-item-interface))))))
1413 (stencil . ,ly:tie::print)
1414 (control-points . ,ly:semi-tie::calc-control-points)
1415 (direction . ,ly:tie::calc-direction)
1416 (details . ((ratio . 0.333)
1417 (height-limit . 1.0)))
1419 (head-direction . ,RIGHT)
1420 (meta . ((class . Item)
1421 (interfaces . (semi-tie-interface))))))
1427 (direction . ,ly:tie::calc-direction)
1428 (head-direction . ,ly:semi-tie-column::calc-head-direction)
1430 (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1431 (meta . ((class . Item)
1432 (interfaces . (semi-tie-column-interface))))))
1436 (stencil . ,ly:rest::print)
1437 (duration-log . ,stem::calc-duration-log)
1438 (X-extent . ,ly:rest::width)
1439 (Y-extent . ,ly:rest::height)
1440 (Y-offset . ,ly:rest::y-offset-callback)
1441 (minimum-distance . 0.25)
1442 (cross-staff . ,ly:rest::calc-cross-staff)
1443 (meta . ((class . Item)
1444 (interfaces . (font-interface
1445 rhythmic-head-interface
1446 rhythmic-grob-interface
1447 staff-symbol-referencer-interface
1448 rest-interface))))))
1452 (minimum-distance . 0.75)
1453 (positioning-done . ,ly:rest-collision::calc-positioning-done)
1454 (meta . ((class . Item)
1455 (interfaces . (rest-collision-interface))))))
1460 ;; don't set direction here: it breaks staccato.
1462 ;; padding set in script definitions.
1463 (staff-padding . 0.25)
1464 (X-offset . ,script-interface::calc-x-offset)
1465 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1468 (stencil . ,ly:script-interface::print)
1469 (direction . ,ly:script-interface::calc-direction)
1470 (positioning-done . ,ly:script-interface::calc-positioning-done)
1471 (font-encoding . fetaMusic)
1472 (cross-staff . ,ly:script-interface::calc-cross-staff)
1473 (meta . ((class . Item)
1474 (interfaces . (script-interface
1475 side-position-interface
1476 font-interface))))))
1480 (before-line-breaking . ,ly:script-column::before-line-breaking)
1481 (meta . ((class . Item)
1482 (interfaces . (script-column-interface))))))
1486 (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1487 (meta . ((class . Item)
1488 (interfaces . (script-column-interface))))))
1492 (avoid-slur . inside)
1493 (X-extent . ,ly:axis-group-interface::width)
1494 (Y-extent . ,ly:axis-group-interface::height)
1495 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1496 (stencil . ,ly:separation-item::print)
1497 (meta . ((class . Item)
1498 (interfaces . (separation-item-interface))))))
1502 (details . ,default-slur-details)
1503 (control-points . ,ly:slur::calc-control-points)
1504 (direction . ,ly:slur::calc-direction)
1505 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1506 (Y-extent . ,ly:slur::height)
1507 (stencil . ,ly:slur::print)
1509 (line-thickness . 0.8)
1510 (minimum-length . 1.5)
1511 (height-limit . 2.0)
1513 (avoid-slur . inside)
1514 (cross-staff . ,ly:slur::calc-cross-staff)
1515 (meta . ((class . Spanner)
1516 (interfaces . (slur-interface))))))
1520 (stencil . ,ly:text-interface::print)
1521 (direction . ,RIGHT)
1522 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1523 (extra-spacing-width . (+inf.0 . -inf.0))
1524 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1525 (font-shape . italic)
1526 (self-alignment-X . ,CENTER)
1527 (meta . ((class . Item)
1528 (interfaces . (text-interface
1529 self-alignment-interface
1530 piano-pedal-script-interface
1531 font-interface))))))
1533 (SostenutoPedalLineSpanner
1536 (Y-extent . ,ly:axis-group-interface::height)
1537 (X-extent . ,ly:axis-group-interface::width)
1538 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1539 (outside-staff-priority . 1000)
1541 (staff-padding . 1.0)
1543 (minimum-space . 1.0)
1545 (meta . ((class . Spanner)
1546 (interfaces . (piano-pedal-interface
1547 axis-group-interface
1548 side-position-interface))))))
1552 (springs-and-rods . ,ly:spacing-spanner::set-springs)
1553 (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1554 (average-spacing-wishes . #t)
1555 (shortest-duration-space . 2.0)
1556 (spacing-increment . 1.2)
1558 (base-shortest-duration . ,(ly:make-moment 3 16))
1559 (meta . ((class . Spanner)
1560 (interfaces . (spacing-options-interface
1561 spacing-spanner-interface))))))
1565 (break-align-symbol . staff-bar)
1566 (Y-extent . ,ly:axis-group-interface::height)
1570 (stencil . ,ly:span-bar::print)
1571 (bar-size . ,ly:span-bar::calc-bar-size)
1572 (bar-extent . ,ly:axis-group-interface::height)
1573 (X-extent . ,ly:span-bar::width)
1574 (glyph-name . ,ly:span-bar::calc-glyph-name)
1575 (before-line-breaking . ,ly:span-bar::before-line-breaking)
1576 (allow-span-bar . #t)
1581 ;; Ross. page 151 lists other values, we opt for a leaner look
1585 (hair-thickness . 1.6)
1586 (thick-thickness . 6.0)
1587 (meta . ((class . Item)
1588 (interfaces . (span-bar-interface
1590 bar-line-interface))))))
1594 (stencil . ,ly:text-interface::print)
1595 (font-series . bold)
1597 (X-offset . ,ly:side-position-interface::x-aligned-side)
1600 (meta . ((class . Item)
1601 (interfaces . (side-position-interface
1602 stanza-number-interface
1604 font-interface))))))
1609 (stem-spacing-correction . 0.4)
1610 (meta . ((class . Item)
1611 (interfaces . (spacing-interface
1612 staff-spacing-interface))))))
1616 (Y-extent . ,ly:staff-symbol::height)
1617 (stencil . ,ly:staff-symbol::print)
1619 (ledger-line-thickness . (1.0 . 0.1))
1621 (meta . ((class . Spanner)
1622 (interfaces . (staff-symbol-interface))))))
1626 (direction . ,ly:stem::calc-direction)
1627 (duration-log . ,stem::calc-duration-log)
1628 (default-direction . ,ly:stem::calc-default-direction)
1629 (stem-end-position . ,ly:stem::calc-stem-end-position)
1631 (neutral-direction . ,DOWN)
1632 (stem-info . ,ly:stem::calc-stem-info)
1633 (positioning-done . ,ly:stem::calc-positioning-done)
1634 (stencil . ,ly:stem::print)
1635 (X-extent . ,ly:stem::width)
1636 (Y-extent . ,ly:stem::height)
1637 (length . ,ly:stem::calc-length)
1639 (cross-staff . ,ly:stem::calc-cross-staff)
1640 (flag . ,ly:stem::calc-flag)
1643 ;; 3.5 (or 3 measured from note head) is standard length
1644 ;; 32nd, 64th, 128th flagged stems should be longer
1645 (lengths . (3.5 3.5 3.5 4.5 5.0 6.0))
1647 ;; FIXME. 3.5 yields too long beams (according to Ross and
1648 ;; looking at Baerenreiter examples) for a number of common
1649 ;; boundary cases. Subtracting half a beam thickness fixes
1650 ;; this, but the bug may well be somewhere else.
1652 ;; FIXME this should come from 'lengths
1653 (beamed-lengths . (3.26 3.5 3.6))
1655 ;; The 'normal' minima
1656 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1657 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1659 ;; The 'extreme case' minima
1660 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1662 ;; Stems in unnatural (forced) direction should be shortened by
1663 ;; one staff space, according to [Roush & Gourlay].
1664 ;; Flagged stems we shorten only half a staff space.
1665 (stem-shorten . (1.0 0.5))
1669 ;; We use the normal minima as minimum for the ideal lengths,
1670 ;; and the extreme minima as abolute minimum length.
1672 (X-offset . ,ly:stem::offset-callback)
1673 (Y-offset . ,ly:staff-symbol-referencer::callback)
1674 (meta . ((class . Item)
1675 (interfaces . (stem-interface
1676 font-interface))))))
1680 (Y-extent . ,ly:stem-tremolo::height)
1681 (X-extent . ,ly:stem-tremolo::width)
1682 (stencil . ,ly:stem-tremolo::print)
1683 (slope . ,ly:stem-tremolo::calc-slope)
1684 (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1685 (style . ,ly:stem-tremolo::calc-style)
1686 (beam-thickness . 0.48) ; staff-space
1687 (meta . ((class . Item)
1688 (interfaces . (stem-tremolo-interface))))))
1692 (stencil . ,print-circled-text-callback)
1693 (text . ,string-number::calc-text)
1695 (staff-padding . 0.5)
1696 (self-alignment-X . ,CENTER)
1697 (self-alignment-Y . ,CENTER)
1698 (script-priority . 100)
1699 (avoid-slur . around)
1700 (font-encoding . fetaNumber)
1701 (font-size . -5) ; don't overlap when next to heads.
1702 (meta . ((class . Item)
1703 (interfaces . (string-number-interface
1705 text-script-interface
1707 side-position-interface
1708 self-alignment-interface))))))
1712 (stencil . ,ly:text-interface::print)
1713 (text . ,stroke-finger::calc-text)
1714 (digit-names . #("p" "i" "m" "a" "x"))
1716 (staff-padding . 0.5)
1717 (self-alignment-X . ,CENTER)
1718 (self-alignment-Y . ,CENTER)
1719 (script-priority . 100)
1720 (font-shape . italic)
1721 (font-size . -4) ; don't overlap when next to heads.
1722 (meta . ((class . Item)
1723 (interfaces . (stroke-finger-interface
1725 text-script-interface
1727 side-position-interface
1728 self-alignment-interface))))))
1732 (extra-spacing-width . (+inf.0 . -inf.0))
1733 (stencil . ,ly:sustain-pedal::print)
1734 (self-alignment-X . ,CENTER)
1735 (direction . ,RIGHT)
1736 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1737 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1738 (meta . ((class . Item)
1739 (interfaces . (piano-pedal-interface
1741 self-alignment-interface
1742 piano-pedal-script-interface
1743 font-interface))))))
1745 (SustainPedalLineSpanner
1748 (Y-extent . ,ly:axis-group-interface::height)
1749 (X-extent . ,ly:axis-group-interface::width)
1750 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1751 (outside-staff-priority . 1000)
1754 (staff-padding . 1.2)
1755 (minimum-space . 1.0)
1757 (meta . ((class . Spanner)
1758 (interfaces . (piano-pedal-interface
1759 axis-group-interface
1760 side-position-interface))))))
1765 (X-extent . ,ly:axis-group-interface::width)
1766 (Y-extent . ,ly:axis-group-interface::height)
1767 (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
1768 (max-stretch . ,ly:axis-group-interface::calc-max-stretch)
1769 (meta . ((class . System)
1770 (interfaces . (system-interface
1771 axis-group-interface))))))
1777 (stencil . ,ly:system-start-delimiter::print)
1778 (collapse-height . 5.0)
1779 (X-offset . ,ly:side-position-interface::x-aligned-side)
1781 (font-encoding . fetaBraces)
1783 (meta . ((class . Spanner)
1784 (interfaces . (system-start-delimiter-interface
1785 side-position-interface
1786 font-interface))))))
1791 (X-offset . ,ly:side-position-interface::x-aligned-side)
1793 (stencil . ,ly:system-start-delimiter::print)
1794 (style . line-bracket)
1796 (meta . ((class . Spanner)
1797 (interfaces . (font-interface
1798 side-position-interface
1799 system-start-delimiter-interface))))))
1805 (X-offset . ,ly:side-position-interface::x-aligned-side)
1807 (stencil . ,ly:system-start-delimiter::print)
1809 (collapse-height . 5.0)
1811 (meta . ((class . Spanner)
1812 (interfaces . (font-interface
1813 side-position-interface
1814 system-start-delimiter-interface))))))
1821 (padding . -0.1) ;; bar must cover rounded ending of staff line.
1822 (X-offset . ,ly:side-position-interface::x-aligned-side)
1825 (collapse-height . 5.0)
1827 (stencil . ,ly:system-start-delimiter::print)
1828 (meta . ((class . Spanner)
1829 (interfaces . (side-position-interface
1830 system-start-delimiter-interface))))))
1835 (stencil . ,ly:text-interface::print)
1836 (duration-log . ,note-head::calc-duration-log)
1837 (Y-offset . ,ly:staff-symbol-referencer::callback)
1838 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1839 (direction . ,CENTER)
1841 (stem-attachment . (0.0 . 1.35))
1842 (font-series . bold)
1843 (meta . ((class . Item)
1844 (interfaces . (rhythmic-head-interface
1846 rhythmic-grob-interface
1848 staff-symbol-referencer-interface
1849 text-interface))))))
1853 (extra-spacing-width . (+inf.0 . -inf.0))
1854 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1855 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1859 ;; sync with Fingering ?
1861 (staff-padding . 0.5)
1863 (stencil . ,ly:text-interface::print)
1864 (direction . ,ly:script-interface::calc-direction)
1865 (positioning-done . ,ly:script-interface::calc-positioning-done)
1867 (outside-staff-priority . 450)
1868 (avoid-slur . around)
1869 (slur-padding . 0.5)
1870 (script-priority . 200)
1871 (cross-staff . ,ly:script-interface::calc-cross-staff)
1872 ;; todo: add X self alignment?
1873 (meta . ((class . Item)
1874 (interfaces . (text-script-interface
1876 instrument-specific-markup-interface
1877 side-position-interface
1878 self-alignment-interface
1879 font-interface))))))
1883 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1884 (font-shape . italic)
1885 (style . dashed-line)
1886 (staff-padding . 0.8)
1887 (dash-fraction . 0.2)
1891 (outside-staff-priority . 350)
1893 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1894 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1895 (bound-details . ((left . ((Y . 0)
1897 (attach-dir . ,LEFT)
1903 (stencil . ,ly:line-spanner::print)
1905 (meta . ((class . Spanner)
1906 (interfaces . (line-spanner-interface
1908 side-position-interface
1909 font-interface))))))
1913 (control-points . ,ly:tie::calc-control-points)
1914 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1915 (avoid-slur . inside)
1916 (direction . ,ly:tie::calc-direction)
1917 (neutral-direction . ,UP)
1918 (stencil . ,ly:tie::print)
1921 ;; for a full list, see tie-details.cc
1923 (center-staff-line-clearance . 0.6)
1924 (tip-staff-line-clearance . 0.45)
1925 (note-head-gap . 0.2)
1927 (height-limit . 1.0)
1928 (horizontal-distance-penalty-factor . 10)
1929 (same-dir-as-stem-penalty . 8)
1930 (min-length-penalty-factor . 26)
1931 (tie-tie-collision-distance . 0.45)
1932 (tie-tie-collision-penalty . 25.0)
1933 (intra-space-threshold . 1.25)
1934 (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
1935 (outer-tie-length-symmetry-penalty-factor . 10)
1936 (vertical-distance-penalty-factor . 7)
1937 (outer-tie-vertical-gap . 0.25)
1938 (multi-tie-region-size . 3)
1939 (single-tie-region-size . 4)
1940 (between-length-limit . 1.0)))
1943 (line-thickness . 0.8)
1944 (meta . ((class . Spanner)
1945 (interfaces . (tie-interface))))))
1949 (positioning-done . ,ly:tie-column::calc-positioning-done)
1950 (before-line-breaking . ,ly:tie-column::before-line-breaking)
1953 (meta . ((class . Spanner)
1954 (interfaces . (tie-column-interface))))))
1958 (stencil . ,ly:time-signature::print)
1959 (break-align-symbol . time-signature)
1961 . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1962 (break-visibility . ,all-visible)
1963 (avoid-slur . inside)
1964 (extra-spacing-height . (-1.0 . 1.0))
1966 (first-note . (fixed-space . 2.0))
1967 (right-edge . (extra-space . 0.5))
1968 (staff-bar . (minimum-space . 2.0))))
1971 (meta . ((class . Item)
1972 (interfaces . (time-signature-interface
1973 break-aligned-interface
1974 font-interface))))))
1978 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1979 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1981 (bound-details . ((left . ((text . ,(make-translate-scaled-markup
1983 (make-musicglyph-markup "scripts.trill")))
1985 (stencil-offset . (-0.5 . 0))
1987 (attach-dir . ,CENTER)
1988 ;; this isn't CENTER because the trill glyph's origin
1989 ;; is not centered in its extent; to have the trill
1990 ;; spanner aligned the same as a trill, we need a slight offset
1991 (anchor-alignment . 0.15)
1993 (left-broken . ((end-on-note . #t)))
1997 (stencil . ,ly:line-spanner::print)
2000 (staff-padding . 1.0)
2003 (Y-offset . ,ly:side-position-interface::y-aligned-side)
2005 (outside-staff-priority . 50)
2006 (meta . ((class . Spanner)
2007 (interfaces . (line-spanner-interface
2009 trill-spanner-interface
2010 side-position-interface
2011 font-interface))))))
2013 (TrillPitchAccidental
2014 . ((X-offset . ,ly:side-position-interface::x-aligned-side)
2019 (stencil . ,ly:accidental-interface::print)
2020 (Y-extent . ,ly:accidental-interface::height)
2021 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2022 (meta . ((class . Item)
2023 (interfaces . (trill-pitch-accidental-interface
2024 accidental-interface
2025 side-position-interface
2026 font-interface))))))
2029 . ((X-offset . ,ly:side-position-interface::x-aligned-side)
2032 (stencil . ,parenthesize-elements)
2033 (stencils . ,parentheses-item::calc-parenthesis-stencils)
2034 (direction . ,RIGHT)
2037 (meta . ((class . Item)
2038 (interfaces . (side-position-interface
2039 parentheses-interface
2042 axis-group-interface))))))
2046 (stencil . ,ly:note-head::print)
2048 (Y-offset . ,ly:staff-symbol-referencer::callback)
2050 (meta . ((class . Item)
2051 (interfaces . (rhythmic-head-interface
2053 pitched-trill-interface
2055 staff-symbol-referencer-interface))))))
2061 (edge-height . (0.7 . 0.7))
2062 (shorten-pair . (-0.2 . -0.2))
2063 (staff-padding . 0.25)
2064 (full-length-to-extent . #t)
2065 (direction . ,ly:tuplet-bracket::calc-direction)
2066 (positions . ,ly:tuplet-bracket::calc-positions)
2067 (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2068 (control-points . ,ly:tuplet-bracket::calc-control-points)
2069 (stencil . ,ly:tuplet-bracket::print)
2070 (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2072 (meta . ((class . Spanner)
2073 (interfaces . (line-interface
2074 tuplet-bracket-interface))))))
2078 (stencil . ,ly:tuplet-number::print)
2079 (text . ,tuplet-number::calc-denominator-text)
2080 (font-shape . italic)
2082 (avoid-slur . inside)
2083 (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2084 (meta . ((class . Spanner)
2085 (interfaces . (text-interface tuplet-number-interface
2086 font-interface))))))
2091 (stencil . ,ly:text-interface::print)
2092 (font-shape . italic)
2093 (extra-spacing-width . (+inf.0 . -inf.0))
2094 (self-alignment-X . ,CENTER)
2095 (direction . ,RIGHT)
2096 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
2097 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2098 (meta . ((class . Item)
2099 (interfaces . (text-interface
2100 piano-pedal-script-interface
2101 self-alignment-interface
2102 font-interface))))))
2104 (UnaCordaPedalLineSpanner
2107 (Y-extent . ,ly:axis-group-interface::height)
2108 (X-extent . ,ly:axis-group-interface::width)
2109 (Y-offset . ,ly:side-position-interface::y-aligned-side)
2110 (outside-staff-priority . 1000)
2113 (staff-padding . 1.2)
2114 (minimum-space . 1.0)
2116 (meta . ((class . Spanner)
2117 (interfaces . (piano-pedal-interface
2118 axis-group-interface
2119 side-position-interface))))))
2126 (stencil . ,ly:vaticana-ligature::print)
2127 (meta . ((class . Spanner)
2128 (interfaces . (vaticana-ligature-interface
2129 font-interface))))))
2134 (positioning-done . ,ly:align-interface::calc-positioning-done)
2135 (after-line-breaking . ,ly:align-interface::stretch-after-break)
2136 (Y-extent . ,ly:axis-group-interface::height)
2137 (X-extent . ,ly:axis-group-interface::width)
2140 (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2142 (meta . ((class . Spanner)
2143 (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)))
2144 (interfaces . (align-interface
2145 axis-group-interface))))))
2150 (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2151 (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2152 (X-extent . ,ly:axis-group-interface::width)
2153 (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2154 (max-stretch . ,ly:axis-group-interface::calc-max-stretch)
2155 (stencil . ,ly:axis-group-interface::print)
2156 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2157 (meta . ((class . Spanner)
2158 (object-callbacks . ((X-common . ,ly:axis-group-interface::calc-x-common)))
2159 (interfaces . (axis-group-interface
2160 hara-kiri-group-spanner-interface
2161 vertically-spaceable-interface))))))
2165 (stencil . ,ly:volta-bracket-interface::print)
2166 (font-encoding . fetaNumber)
2167 (thickness . 1.6) ;; line-thickness
2168 (edge-height . (2.0 . 2.0)) ;; staff-space;
2172 (meta . ((class . Spanner)
2173 (interfaces . (volta-bracket-interface
2174 horizontal-bracket-interface
2177 side-position-interface
2178 font-interface))))))
2180 (VoltaBracketSpanner
2186 (Y-offset . ,ly:side-position-interface::y-aligned-side)
2187 (outside-staff-priority . 100)
2188 (Y-extent . ,ly:axis-group-interface::height)
2189 (X-extent . ,ly:axis-group-interface::width)
2190 (no-alignment . ,#t)
2191 (meta . ((class . Spanner)
2192 (interfaces . (side-position-interface
2193 axis-group-interface))))))
2202 (bound-details . ((right . ((attach-dir . ,CENTER)
2205 (left . ((attach-dir . ,CENTER)
2209 (stencil . ,ly:line-spanner::print)
2210 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2211 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2212 (meta . ((class . Spanner)
2213 (interfaces . (line-spanner-interface
2214 line-interface))))))
2218 (define (completize-grob-entry x)
2219 "Transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc.
2221 ;; (display (car x))
2223 (let* ((name-sym (car x))
2224 (grob-entry (cdr x))
2225 (meta-entry (cdr (assoc 'meta grob-entry)))
2226 (class (cdr (assoc 'class meta-entry)))
2228 (cdr (assoc 'interfaces meta-entry))))
2232 (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2233 ((eq? 'Spanner class)
2234 (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2235 ((eq? 'Paper_column class)
2236 (set! ifaces-entry (cons 'item-interface
2237 (cons 'paper-column-interface ifaces-entry))))
2238 ((eq? 'System class)
2239 (set! ifaces-entry (cons 'system-interface
2240 (cons 'spanner-interface ifaces-entry))))
2242 (ly:warning "Unknown class ~a" class)))
2244 (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2245 (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2247 (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2248 (set! meta-entry (assoc-set! meta-entry 'interfaces
2250 (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2251 (cons name-sym grob-entry)))
2253 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2255 ;; (display (map pair? all-grob-descriptions))
2257 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2260 ;; (display (car x)) (newline)
2262 (set-object-property! (car x) 'translation-type? list?)
2263 (set-object-property! (car x) 'is-grob? #t))
2264 all-grob-descriptions)
2266 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2268 (define pure-print-callbacks
2270 fret-board::calc-stencil
2271 print-circled-text-callback
2274 ly:arpeggio::brew-chord-bracket
2279 ly:text-interface::print
2280 ly:script-interface::print))
2282 ;; ly:grob::stencil-extent is safe iff the print callback is safe too
2283 (define (pure-stencil-height grob start stop)
2284 (let ((sten (ly:grob-property-data grob 'stencil)))
2287 (memq sten pure-print-callbacks))
2288 (ly:grob::stencil-height grob)
2291 (define pure-conversions-alist
2293 (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2294 (,ly:arpeggio::height . ,ly:arpeggio::pure-height)
2295 (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2296 (,ly:stem::height . ,ly:stem::pure-height)
2297 (,ly:rest::height . ,ly:rest::pure-height)
2298 (,ly:grob::stencil-height . ,pure-stencil-height)
2299 (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2300 (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2301 (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2302 (,ly:slur::height . ,ly:slur::pure-height)
2303 (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)))
2305 (define pure-functions
2307 parenthesize-elements
2308 ly:rest::y-offset-callback
2309 ly:staff-symbol-referencer::callback
2310 ly:staff-symbol::height))
2312 (define-public (pure-relevant? grob)
2313 (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2316 (pair? extent-callback)
2317 (memq extent-callback pure-functions)
2319 (pair? (assq extent-callback pure-conversions-alist))
2322 (not (eq? extent-callback ly:grob::stencil-height))
2323 (memq (ly:grob-property-data grob 'stencil) pure-print-callbacks)
2324 (ly:stencil? (ly:grob-property-data grob 'stencil))
2328 (define-public (call-pure-function unpure args start end)
2329 (if (ly:simple-closure? unpure)
2330 (ly:eval-simple-closure (car args) unpure start end)
2331 (if (not (procedure? unpure))
2333 (if (memq unpure pure-functions)
2335 (let ((pure (assq unpure pure-conversions-alist)))
2339 (list (car args) start end)