1 ;;;; define-grobs.scm --
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2007 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
364 (stencil . ,bend::print)
366 (meta . ((class . Spanner)
367 (interfaces . (spanner-interface
368 bend-after-interface))))))
374 (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
375 (X-extent . ,ly:axis-group-interface::width)
376 (break-align-orders . ;; end of line
398 time-signature custos)
412 (meta . ((class . Item)
413 (interfaces . (break-alignment-interface
414 axis-group-interface))))))
419 (X-extent . ,ly:axis-group-interface::width)
420 (break-align-anchor . ,ly:break-aligned-interface::calc-average-anchor)
421 (break-visibility . ,ly:break-aligned-interface::calc-break-visibility)
422 (meta . ((class . Item)
423 (interfaces . (break-aligned-interface
424 axis-group-interface))))))
428 (break-align-symbol . breathing-sign)
431 (ambitus . (extra-space . 2.0))
432 (custos . (minimum-space . 1.0))
433 (key-signature . (minimum-space . 1.5))
434 (time-signature . (minimum-space . 1.5))
435 (staff-bar . (minimum-space . 1.5))
436 (clef . (minimum-space . 2.0))
437 (first-note . (fixed-space . 1.0)) ;huh?
438 (right-edge . (extra-space . 0.1))))
439 (stencil . ,ly:text-interface::print)
440 (text . ,(make-musicglyph-markup "scripts.rcomma"))
441 (Y-offset . ,ly:breathing-sign::offset-callback)
442 (break-visibility . ,begin-of-line-invisible)
443 (meta . ((class . Item)
444 (interfaces . (break-aligned-interface
445 breathing-sign-interface
451 (stencil . ,ly:clef::print)
452 (glyph-name . ,ly:clef::calc-glyph-name)
454 (avoid-slur . inside)
455 (font-family . music)
456 (break-align-symbol . clef)
457 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
458 (break-visibility . ,begin-of-line-visible)
459 (space-alist . ((ambitus . (extra-space . 2.0))
460 (staff-bar . (extra-space . 0.7))
461 (key-cancellation . (minimum-space . 3.5))
462 (key-signature . (minimum-space . 3.5))
463 (time-signature . (minimum-space . 4.2))
464 (first-note . (minimum-fixed-space . 5.0))
465 (next-note . (extra-space . 0.5))
466 (right-edge . (extra-space . 0.5))))
467 (Y-offset . ,ly:staff-symbol-referencer::callback)
468 (meta . ((class . Item)
469 (interfaces . (clef-interface
470 staff-symbol-referencer-interface
472 break-aligned-interface))))))
474 (ClusterSpannerBeacon
476 (Y-extent . ,ly:cluster-beacon::height)
477 (meta . ((class . Item)
478 (interfaces . (rhythmic-grob-interface
479 cluster-beacon-interface))))))
483 (springs-and-rods . ,ly:spanner::set-spacing-rods)
484 (stencil . ,ly:cluster::print)
485 (minimum-length . 0.0)
487 (cross-staff . ,ly:cluster::calc-cross-staff)
489 (meta . ((class . Spanner)
490 (interfaces . (cluster-interface))))))
494 (stencil . ,ly:text-interface::print)
495 (after-line-breaking . ,ly:chord-name::after-line-breaking)
499 (meta . ((class . Item)
500 (interfaces . (font-interface
501 rhythmic-grob-interface
503 chord-name-interface))))))
507 (stencil . ,ly:text-interface::print)
508 (extra-spacing-width . (+inf.0 . -inf.0))
509 (Y-offset . ,ly:side-position-interface::y-aligned-side)
510 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
513 (staff-padding . 0.5)
514 (script-priority . 200)
515 ;; todo: add X self alignment?
518 (avoid-slur . outside )
520 (meta . ((class . Item)
521 (interfaces . (text-script-interface
523 side-position-interface
528 (break-align-symbol . custos)
530 (stencil . ,ly:custos::print)
531 (break-visibility . ,end-of-line-visible)
533 (neutral-direction . ,DOWN)
534 (Y-offset . ,ly:staff-symbol-referencer::callback)
536 (first-note . (minimum-fixed-space . 0.0))
537 (right-edge . (extra-space . 0.1))))
538 (meta . ((class . Item)
539 (interfaces . (custos-interface
540 staff-symbol-referencer-interface
542 break-aligned-interface))))))
548 (positioning-done . ,ly:dot-column::calc-positioning-done)
549 (X-extent . ,ly:axis-group-interface::width)
550 (meta . ((class . Item)
551 (interfaces . (dot-column-interface
552 axis-group-interface))))))
556 (stencil . ,ly:dots::print)
557 (dot-count . ,dots::calc-dot-count)
558 (staff-position . ,dots::calc-staff-position)
559 (meta . ((class . Item)
560 (interfaces . (font-interface
561 staff-symbol-referencer-interface
566 (stencil . ,ly:percent-repeat-item-interface::double-percent)
569 (dot-negative-kern . 0.75)
570 (slash-negative-kern . 1.6)
571 (font-encoding . fetaMusic)
574 (break-align-symbol . staff-bar)
575 (break-visibility . ,begin-of-line-invisible)
576 (meta . ((class . Item)
577 (interfaces . (font-interface
578 break-aligned-interface
579 percent-repeat-interface
580 percent-repeat-item-interface))))))
582 (DoublePercentRepeatCounter
584 (stencil . ,ly:text-interface::print)
585 (X-offset . ,(ly:make-simple-closure
587 ,(ly:make-simple-closure
588 (list ly:self-alignment-interface::centered-on-y-parent))
589 ,(ly:make-simple-closure
590 (list ly:self-alignment-interface::x-aligned-on-self)))))
591 (Y-offset . ,ly:side-position-interface::y-aligned-side)
592 (font-encoding . fetaNumber)
593 (self-alignment-X . ,CENTER)
597 (staff-padding . 0.25)
599 (meta . ((class . Item)
600 (interfaces . (side-position-interface
601 self-alignment-interface
602 percent-repeat-item-interface
603 percent-repeat-interface
610 (Y-offset . ,ly:side-position-interface::y-aligned-side)
611 (staff-padding . 0.1)
614 (minimum-space . 1.2)
617 (outside-staff-priority . 250)
618 (Y-extent . ,ly:axis-group-interface::height)
619 (X-extent . ,ly:axis-group-interface::width)
620 (cross-staff . ,ly:side-position-interface::calc-cross-staff)
621 (meta . ((class . Spanner)
622 (interfaces . (axis-group-interface
624 dynamic-line-spanner-interface
625 side-position-interface))))))
632 (stencil . ,ly:text-interface::print)
633 (direction . ,ly:script-interface::calc-direction)
634 (positioning-done . ,ly:script-interface::calc-positioning-done)
636 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
637 (self-alignment-X . ,CENTER)
638 (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
639 (self-alignment-Y . ,CENTER)
641 (font-encoding . fetaDynamic)
642 (font-shape . italic)
643 (extra-spacing-width . (+inf.0 . -inf.0))
644 (outside-staff-priority . 250)
645 (meta . ((class . Item)
646 (interfaces . (font-interface
648 self-alignment-interface
650 script-interface))))))
654 ;; rather ugh with NCSB
655 ;; (font-series . bold)
656 (font-shape . italic)
657 (style . dashed-line)
659 ;; make sure the spanner doesn't get too close to notes
660 (minimum-Y-extent . (-1 . 1))
661 (bound-details . ((right . ((attach-dir . ,LEFT)
665 (right-broken . ((attach-dir . ,RIGHT)
669 (left . ((attach-dir . ,LEFT)
671 (stencil-offset . (0 . -0.5))
674 (left-broken . ((attach-dir . ,RIGHT)
677 (stencil . ,ly:line-spanner::print)
678 (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
679 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
681 ;; need to blend with dynamic texts.
683 (dash-fraction . 0.2)
685 (meta . ((class . Spanner)
686 (interfaces . (font-interface
688 line-spanner-interface
691 dynamic-text-spanner-interface
692 spanner-interface))))))
698 ;; sync with TextScript (?)
701 (avoid-slur . around)
703 (staff-padding . 0.5)
704 (self-alignment-X . ,CENTER)
705 (self-alignment-Y . ,CENTER)
706 (script-priority . 100)
707 (stencil . ,ly:text-interface::print)
708 (direction . ,ly:script-interface::calc-direction)
709 (positioning-done . ,ly:script-interface::calc-positioning-done)
710 (cross-staff . ,ly:side-position-interface::calc-cross-staff)
712 (text . ,fingering::calc-text)
713 (font-encoding . fetaNumber)
714 (font-size . -5) ; don't overlap when next to heads.
715 (meta . ((class . Item)
716 (interfaces . (finger-interface
718 text-script-interface
720 side-position-interface
721 self-alignment-interface))))))
724 . ((stencil . ,fret-board::calc-stencil)
725 (fret-diagram-details . ((finger-code . below-string)))
726 (meta . ((class . Item)
727 (interfaces . (fret-diagram-interface
735 (zigzag-width . 0.75)
738 (bound-details . ((right . ((attach-dir . ,CENTER)
741 (left . ((attach-dir . ,CENTER)
745 (stencil . ,ly:line-spanner::print)
746 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
747 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
748 (meta . ((class . Spanner)
749 (interfaces . (line-interface
750 unbreakable-spanner-interface
751 line-spanner-interface))))))
755 (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
756 (spacing-increment . 0.8)
757 (shortest-duration-space . 1.6)
758 (meta . ((class . Spanner)
759 (interfaces . (grace-spacing-interface
760 spacing-options-interface
761 spanner-interface))))))
767 (meta . ((class . Item)
768 (interfaces . (grid-point-interface))))))
772 (X-extent . ,ly:grid-line-interface::width)
773 (stencil . ,ly:grid-line-interface::print)
774 (self-alignment-X . ,CENTER)
775 (X-offset . ,(ly:make-simple-closure
777 ,(ly:make-simple-closure
778 (list ly:self-alignment-interface::centered-on-x-parent))
779 ,(ly:make-simple-closure
780 (list ly:self-alignment-interface::x-aligned-on-self)))))
782 (meta . ((class . Item)
783 (interfaces . (self-alignment-interface
784 grid-line-interface))))))
789 (stencil . ,ly:hairpin::print)
790 (springs-and-rods . ,ly:spanner::set-spacing-rods)
791 (after-line-breaking . ,ly:hairpin::after-line-breaking)
792 (grow-direction . ,hairpin::calc-grow-direction)
797 (minimum-length . 2.0)
798 (bound-padding . 1.0)
799 (self-alignment-Y . ,CENTER)
800 (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
801 (meta . ((class . Spanner)
802 (interfaces . (hairpin-interface
804 self-alignment-interface
806 spanner-interface))))))
811 (stencil . ,ly:horizontal-bracket::print)
812 (Y-offset . ,ly:side-position-interface::y-aligned-side)
813 (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
816 (staff-padding . 0.2)
819 (bracket-flare . (0.5 . 0.5))
820 (meta . ((class . Spanner)
821 (interfaces . (horizontal-bracket-interface
822 side-position-interface
824 spanner-interface))))))
830 (stencil . ,ly:system-start-text::print)
831 (X-offset . ,ly:side-position-interface::x-aligned-side)
833 (self-alignment-Y . ,CENTER)
834 (self-alignment-X . ,CENTER)
835 (meta . ((class . Spanner)
836 (interfaces . (system-start-text-interface
837 side-position-interface
838 self-alignment-interface
844 (stencil . ,ly:text-interface::print)
845 (Y-offset . ,ly:side-position-interface::y-aligned-side)
846 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
847 (staff-padding . 0.5)
850 (self-alignment-X . ,LEFT)
851 (outside-staff-priority . 500)
852 (extra-spacing-width . (+inf.0 . -inf.0))
853 (meta . ((class . Item)
854 (interfaces . (side-position-interface
855 self-alignment-interface
862 (stencil . ,ly:key-signature-interface::print)
863 (glyph-name-alist . ,cancellation-glyph-name-alist)
865 (time-signature . (extra-space . 1.25))
866 (staff-bar . (extra-space . 0.6))
867 (key-signature . (extra-space . 0.5))
868 (right-edge . (extra-space . 0.5))
869 (first-note . (fixed-space . 2.5))))
870 (Y-offset . ,ly:staff-symbol-referencer::callback)
871 (break-align-symbol . key-cancellation)
872 (break-visibility . ,begin-of-line-invisible)
874 (meta . ((class . Item)
875 (interfaces . (key-cancellation-interface
876 key-signature-interface
877 staff-symbol-referencer-interface
879 break-aligned-interface))))))
883 (stencil . ,ly:key-signature-interface::print)
884 (avoid-slur . inside)
885 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
887 (time-signature . (extra-space . 1.15))
888 (staff-bar . (extra-space . 1.1))
889 (right-edge . (extra-space . 0.5))
890 (first-note . (fixed-space . 2.5))))
891 (Y-offset . ,ly:staff-symbol-referencer::callback)
892 (break-align-symbol . key-signature)
893 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
894 (break-visibility . ,begin-of-line-visible)
896 (meta . ((class . Item)
897 (interfaces . (key-signature-interface
898 staff-symbol-referencer-interface
900 break-aligned-interface))))))
905 (stencil . ,ly:tie::print)
906 (control-points . ,ly:semi-tie::calc-control-points)
907 (direction . ,ly:tie::calc-direction)
908 (details . ((ratio . 0.333)
909 (height-limit . 1.0)))
910 (head-direction . ,LEFT)
912 (meta . ((class . Item)
913 (interfaces . (semi-tie-interface))))))
915 (LaissezVibrerTieColumn
919 (head-direction . ,LEFT)
920 (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
921 (meta . ((class . Item)
922 (interfaces . (semi-tie-column-interface))))))
926 (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
927 (stencil . ,ly:ledger-line-spanner::print)
930 (minimum-length-fraction . 0.25)
931 (length-fraction . 0.25)
933 (meta . ((class . Spanner)
934 (interfaces . (ledger-line-spanner-interface))))))
938 (break-align-symbol . left-edge)
939 (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
942 (break-visibility . ,center-invisible)
944 (custos . (extra-space . 0.0))
945 (ambitus . (extra-space . 2.0))
946 (time-signature . (extra-space . 1.0))
947 (staff-bar . (extra-space . 0.0))
948 (breathing-sign . (minimum-space . 0.0))
949 (clef . (extra-space . 0.8))
950 (first-note . (fixed-space . 2.0))
951 (right-edge . (extra-space . 0.0))
952 (key-signature . (extra-space . 0.0))
953 (key-cancellation . (extra-space . 0.0))
955 (meta . ((class . Item)
956 (interfaces . (break-aligned-interface))))))
960 ;; ugh. A ligature bracket is totally different from
965 (edge-height . (0.7 . 0.7))
966 (shorten-pair . (-0.2 . -0.2))
968 (positions . ,ly:tuplet-bracket::calc-positions)
969 (stencil . ,ly:tuplet-bracket::print)
970 (staff-padding . 0.25)
971 (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
972 (control-points . ,ly:tuplet-bracket::calc-control-points)
973 (meta . ((class . Spanner)
974 (interfaces . (line-interface
975 tuplet-bracket-interface))))))
979 (stencil . ,ly:lyric-extender::print)
980 (thickness . 0.8) ; line-thickness
981 (minimum-length . 1.5)
983 (meta . ((class . Spanner)
984 (interfaces . (lyric-interface
985 lyric-extender-interface))))))
993 (minimum-length . 0.3)
994 (minimum-distance . 0.1)
996 (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
997 (stencil . ,ly:lyric-hyphen::print)
999 (meta . ((class . Spanner)
1000 (interfaces . (lyric-interface
1002 lyric-hyphen-interface
1003 spanner-interface))))))
1006 . ((minimum-distance . 0.45)
1007 (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1011 (meta . ((class . Spanner)
1012 (interfaces . (spanner-interface
1013 lyric-hyphen-interface))))))
1017 (stencil . ,lyric-text::print)
1018 (text . ,(grob::calc-property-by-copy 'text))
1019 (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1020 (self-alignment-X . ,CENTER)
1022 (font-series . bold-narrow)
1024 (extra-spacing-width . (0.0 . 0.0))
1025 (meta . ((class . Item)
1026 (interfaces . (rhythmic-grob-interface
1027 lyric-syllable-interface
1028 self-alignment-interface
1030 font-interface))))))
1035 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1037 (stencil . ,ly:measure-grouping::print)
1043 (meta . ((class . Spanner)
1044 (interfaces . (side-position-interface
1045 measure-grouping-interface))))))
1049 (neutral-direction . ,DOWN)
1050 (meta . ((class . Item)
1051 (interfaces . (melody-spanner-interface))))))
1057 (stencil . ,ly:mensural-ligature::print)
1058 (meta . ((class . Spanner)
1059 (interfaces . (mensural-ligature-interface
1060 font-interface))))))
1064 (stencil . ,ly:text-interface::print)
1065 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1069 (extra-spacing-width . (+inf.0 . -inf.0))
1070 (outside-staff-priority . 1000)
1071 (meta . ((class . Item)
1072 (interfaces . (text-interface
1073 side-position-interface
1075 metronome-mark-interface))))))
1079 (stencil . ,ly:multi-measure-rest::print)
1080 (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1081 (Y-offset . ,ly:staff-symbol-referencer::callback)
1082 (staff-position . 0)
1084 (thick-thickness . 6.6)
1085 (hair-thickness . 2.0)
1087 (meta . ((class . Spanner)
1088 (interfaces . (multi-measure-rest-interface
1089 multi-measure-interface
1092 staff-symbol-referencer-interface))))))
1094 (MultiMeasureRestNumber
1096 (bound-padding . 2.0)
1097 (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1098 (stencil . ,ly:text-interface::print)
1099 (X-offset . ,(ly:make-simple-closure
1101 ,(ly:make-simple-closure
1102 (list ly:self-alignment-interface::x-aligned-on-self))
1103 ,(ly:make-simple-closure
1104 (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1105 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1107 (self-alignment-X . ,CENTER)
1110 (staff-padding . 0.4)
1111 (font-encoding . fetaNumber)
1112 (meta . ((class . Spanner)
1113 (interfaces . (side-position-interface
1114 multi-measure-interface
1115 self-alignment-interface
1117 text-interface))))))
1119 (MultiMeasureRestText
1121 (stencil . ,ly:text-interface::print)
1122 (X-offset . ,(ly:make-simple-closure
1124 ,(ly:make-simple-closure
1125 (list ly:self-alignment-interface::x-centered-on-y-parent))
1126 ,(ly:make-simple-closure
1127 (list ly:self-alignment-interface::x-aligned-on-self)))))
1128 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1129 (self-alignment-X . ,CENTER)
1132 (staff-padding . 0.25)
1133 (outside-staff-priority . 450)
1134 (meta . ((class . Spanner)
1135 (interfaces . (side-position-interface
1136 multi-measure-interface
1137 self-alignment-interface
1139 text-interface))))))
1142 (NonMusicalPaperColumn
1144 (allow-loose-spacing . #t)
1146 (before-line-breaking . ,ly:paper-column::before-line-breaking)
1147 (X-extent . ,ly:axis-group-interface::width)
1148 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1149 ;; (stencil . ,ly:paper-column::print)
1152 (line-break-permission . allow)
1153 (page-break-permission . allow)
1155 ;; debugging stuff: print column number.
1156 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1158 (meta . ((class . Paper_column)
1159 (interfaces . (paper-column-interface
1160 axis-group-interface
1161 separation-item-interface
1162 spaceable-grob-interface))))))
1167 (X-extent . ,ly:axis-group-interface::width)
1168 (Y-extent . ,ly:axis-group-interface::height)
1169 (prefer-dotted-right . #t)
1170 (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1171 (meta . ((class . Item)
1172 (interfaces . (note-collision-interface
1173 axis-group-interface))))))
1178 (X-extent . ,ly:axis-group-interface::width)
1179 (Y-extent . ,ly:axis-group-interface::height)
1180 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1181 (meta . ((class . Item)
1182 (interfaces . (axis-group-interface
1183 separation-item-interface
1184 note-column-interface))))))
1188 (stencil . ,ly:note-head::print)
1189 (duration-log . ,note-head::calc-duration-log)
1190 (stem-attachment . ,ly:note-head::calc-stem-attachment)
1191 (glyph-name . ,note-head::calc-glyph-name)
1192 (Y-offset . ,ly:staff-symbol-referencer::callback)
1193 (X-offset . ,ly:note-head::stem-x-shift)
1194 (meta . ((class . Item)
1195 (interfaces . (rhythmic-grob-interface
1196 rhythmic-head-interface
1200 staff-symbol-referencer-interface))))))
1204 (stem-spacing-correction . 0.5)
1205 (same-direction-correction . 0.25)
1206 (space-to-barline . #t)
1207 ;; Changed this from 0.75.
1208 ;; If you ever change this back, please document! --hwn
1209 (knee-spacing-correction . 1.0)
1210 (meta . ((class . Item)
1211 (interfaces . (spacing-interface
1212 note-spacing-interface))))))
1216 (stencil . ,ly:text-interface::print)
1217 (meta . ((class . Item)
1218 (interfaces . (note-name-interface
1220 font-interface))))))
1225 (self-alignment-X . ,CENTER)
1226 (break-visibility . ,begin-of-line-visible)
1227 (X-offset . ,(ly:make-simple-closure
1229 ,(ly:make-simple-closure
1230 (list ly:self-alignment-interface::x-aligned-on-self))
1231 ,(ly:make-simple-closure
1232 (list ly:self-alignment-interface::centered-on-x-parent)))))
1233 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1234 (stencil . ,ly:text-interface::print)
1235 (font-shape . italic)
1236 (staff-padding . 0.2)
1238 (meta . ((class . Item)
1239 (interfaces . (text-interface
1240 self-alignment-interface
1241 side-position-interface
1242 font-interface))))))
1246 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1247 (stencil . ,ly:ottava-bracket::print)
1248 (font-shape . italic)
1249 (shorten-pair . (0.0 . -0.6))
1250 (staff-padding . 1.0)
1252 (minimum-length . 1.0)
1253 (style . dashed-line)
1254 (dash-fraction . 0.3)
1255 (edge-height . (0 . 1.2))
1257 (outside-staff-priority . 400)
1258 (meta . ((class . Spanner)
1259 (interfaces . (ottava-bracket-interface
1260 horizontal-bracket-interface
1262 side-position-interface
1264 text-interface))))))
1270 (allow-loose-spacing . #t)
1271 (before-line-breaking . ,ly:paper-column::before-line-breaking)
1272 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1273 ;; (stencil . ,ly:paper-column::print)
1274 (X-extent . ,ly:axis-group-interface::width)
1277 ;; (font-size . -6) (font-name . "sans") (Y-extent . #f)
1278 (meta . ((class . Paper_column)
1279 (interfaces . (paper-column-interface
1280 separation-item-interface
1281 axis-group-interface
1282 spaceable-grob-interface))))))
1285 . ((stencil . ,parentheses-item::print)
1286 (stencils . ,parentheses-item::calc-parenthesis-stencils)
1289 (meta . ((class . Item)
1290 (interfaces . (parentheses-interface font-interface))))))
1292 (HarmonicParenthesesItem
1293 . ((stencil . ,parentheses-item::print)
1295 (stencils . ,parentheses-item::calc-angled-bracket-stencils)
1296 (meta . ((class . Item)
1297 (interfaces . (parentheses-interface font-interface))))))
1300 . ((details . ,default-slur-details)
1301 (control-points . ,ly:slur::calc-control-points)
1302 (direction . ,ly:slur::calc-direction)
1303 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1304 (Y-extent . ,ly:slur::height)
1305 (stencil . ,ly:slur::print)
1307 (minimum-length . 1.5)
1308 (height-limit . 2.0)
1310 (cross-staff . ,ly:slur::calc-cross-staff)
1311 (meta . ((class . Spanner)
1312 (interfaces . (slur-interface))))))
1316 (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1317 (stencil . ,ly:multi-measure-rest::percent)
1320 (dot-negative-kern . 0.75)
1321 (font-encoding . fetaMusic)
1322 (meta . ((class . Spanner)
1323 (interfaces . (multi-measure-rest-interface
1325 percent-repeat-interface))))))
1327 (PercentRepeatCounter
1329 (stencil . ,ly:text-interface::print)
1330 (X-offset . ,(ly:make-simple-closure
1332 ,(ly:make-simple-closure
1333 (list ly:self-alignment-interface::x-centered-on-y-parent))
1334 ,(ly:make-simple-closure
1335 (list ly:self-alignment-interface::x-aligned-on-self)))))
1336 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1337 (self-alignment-X . ,CENTER)
1340 (staff-padding . 0.25)
1342 (font-encoding . fetaNumber)
1343 (meta . ((class . Spanner)
1344 (interfaces . (side-position-interface
1345 self-alignment-interface
1346 percent-repeat-interface
1348 text-interface))))))
1350 ;; an example of a text spanner
1353 (stencil . ,ly:piano-pedal-bracket::print)
1355 (bound-padding . 1.0)
1357 (bracket-flare . (0.5 . 0.5))
1358 (edge-height . (1.0 . 1.0))
1359 (shorten-pair . (0.0 . 0.0))
1361 (meta . ((class . Spanner)
1362 (interfaces . (line-interface
1363 piano-pedal-interface
1364 piano-pedal-bracket-interface))))))
1369 (stencil . ,ly:text-interface::print)
1370 (X-offset . ,(ly:make-simple-closure
1372 ,(ly:make-simple-closure
1373 (list ly:break-alignable-interface::self-align-callback))
1374 ,(ly:make-simple-closure
1375 (list ly:self-alignment-interface::x-aligned-on-self)))))
1376 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1377 (extra-spacing-width . (+inf.0 . -inf.0))
1378 (self-alignment-X . ,CENTER)
1383 (break-visibility . ,end-of-line-invisible)
1384 (break-align-symbols . (staff-bar clef))
1386 (outside-staff-priority . 1500)
1387 (meta . ((class . Item)
1388 (interfaces . (text-interface
1389 side-position-interface
1390 break-alignable-interface
1393 self-alignment-interface))))))
1397 (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1400 (meta . ((class . Item)
1401 (interfaces . (rhythmic-grob-interface
1402 percent-repeat-interface
1403 percent-repeat-item-interface))))))
1407 (stencil . ,ly:tie::print)
1408 (control-points . ,ly:semi-tie::calc-control-points)
1409 (direction . ,ly:tie::calc-direction)
1410 (details . ((ratio . 0.333)
1411 (height-limit . 1.0)))
1413 (head-direction . ,RIGHT)
1414 (meta . ((class . Item)
1415 (interfaces . (semi-tie-interface))))))
1421 (direction . ,ly:tie::calc-direction)
1422 (head-direction . ,ly:semi-tie-column::calc-head-direction)
1424 (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1425 (meta . ((class . Item)
1426 (interfaces . (semi-tie-column-interface))))))
1430 (stencil . ,ly:rest::print)
1431 (duration-log . ,stem::calc-duration-log)
1432 (X-extent . ,ly:rest::width)
1433 (Y-extent . ,ly:rest::height)
1434 (Y-offset . ,ly:rest::y-offset-callback)
1435 (minimum-distance . 0.25)
1436 (cross-staff . ,ly:rest::calc-cross-staff)
1437 (meta . ((class . Item)
1438 (interfaces . (font-interface
1439 rhythmic-head-interface
1440 rhythmic-grob-interface
1441 staff-symbol-referencer-interface
1442 rest-interface))))))
1446 (minimum-distance . 0.75)
1447 (positioning-done . ,ly:rest-collision::calc-positioning-done)
1448 (meta . ((class . Item)
1449 (interfaces . (rest-collision-interface))))))
1454 ;; don't set direction here: it breaks staccato.
1456 ;; padding set in script definitions.
1457 (staff-padding . 0.25)
1458 (X-offset . ,script-interface::calc-x-offset)
1459 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1462 (stencil . ,ly:script-interface::print)
1463 (direction . ,ly:script-interface::calc-direction)
1464 (positioning-done . ,ly:script-interface::calc-positioning-done)
1465 (font-encoding . fetaMusic)
1466 (cross-staff . ,ly:script-interface::calc-cross-staff)
1467 (meta . ((class . Item)
1468 (interfaces . (script-interface
1469 side-position-interface
1470 font-interface))))))
1474 (before-line-breaking . ,ly:script-column::before-line-breaking)
1475 (meta . ((class . Item)
1476 (interfaces . (script-column-interface))))))
1480 (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1481 (meta . ((class . Item)
1482 (interfaces . (script-column-interface))))))
1486 (avoid-slur . inside)
1487 (X-extent . ,ly:axis-group-interface::width)
1488 (Y-extent . ,ly:axis-group-interface::height)
1489 (horizontal-skylines . ,ly:separation-item::calc-skylines)
1490 (stencil . ,ly:separation-item::print)
1491 (meta . ((class . Item)
1492 (interfaces . (separation-item-interface))))))
1496 (details . ,default-slur-details)
1497 (control-points . ,ly:slur::calc-control-points)
1498 (direction . ,ly:slur::calc-direction)
1499 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1500 (Y-extent . ,ly:slur::height)
1501 (stencil . ,ly:slur::print)
1503 (line-thickness . 0.8)
1504 (minimum-length . 1.5)
1505 (height-limit . 2.0)
1507 (avoid-slur . inside)
1508 (cross-staff . ,ly:slur::calc-cross-staff)
1509 (meta . ((class . Spanner)
1510 (interfaces . (slur-interface))))))
1514 (stencil . ,ly:text-interface::print)
1515 (direction . ,RIGHT)
1516 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1517 (extra-spacing-width . (+inf.0 . -inf.0))
1518 (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1519 (font-shape . italic)
1520 (self-alignment-X . ,CENTER)
1521 (meta . ((class . Item)
1522 (interfaces . (text-interface
1523 self-alignment-interface
1524 piano-pedal-script-interface
1525 font-interface))))))
1527 (SostenutoPedalLineSpanner
1530 (Y-extent . ,ly:axis-group-interface::height)
1531 (X-extent . ,ly:axis-group-interface::width)
1532 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1533 (outside-staff-priority . 1000)
1535 (staff-padding . 1.0)
1537 (minimum-space . 1.0)
1539 (meta . ((class . Spanner)
1540 (interfaces . (piano-pedal-interface
1541 axis-group-interface
1542 side-position-interface))))))
1546 (springs-and-rods . ,ly:spacing-spanner::set-springs)
1547 (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1548 (average-spacing-wishes . #t)
1549 (shortest-duration-space . 2.0)
1550 (spacing-increment . 1.2)
1552 (base-shortest-duration . ,(ly:make-moment 3 16))
1553 (meta . ((class . Spanner)
1554 (interfaces . (spacing-options-interface
1555 spacing-spanner-interface))))))
1559 (break-align-symbol . staff-bar)
1560 (Y-extent . ,ly:axis-group-interface::height)
1564 (stencil . ,ly:span-bar::print)
1565 (bar-size . ,ly:span-bar::calc-bar-size)
1566 (bar-extent . ,ly:axis-group-interface::height)
1567 (X-extent . ,ly:span-bar::width)
1568 (glyph-name . ,ly:span-bar::calc-glyph-name)
1569 (before-line-breaking . ,ly:span-bar::before-line-breaking)
1570 (allow-span-bar . #t)
1575 ;; Ross. page 151 lists other values, we opt for a leaner look
1579 (hair-thickness . 1.6)
1580 (thick-thickness . 6.0)
1581 (meta . ((class . Item)
1582 (interfaces . (span-bar-interface
1584 bar-line-interface))))))
1588 (stencil . ,ly:text-interface::print)
1589 (font-series . bold)
1591 (X-offset . ,ly:side-position-interface::x-aligned-side)
1594 (meta . ((class . Item)
1595 (interfaces . (side-position-interface
1596 stanza-number-interface
1598 font-interface))))))
1603 (stem-spacing-correction . 0.4)
1604 (meta . ((class . Item)
1605 (interfaces . (spacing-interface
1606 staff-spacing-interface))))))
1610 (Y-extent . ,ly:staff-symbol::height)
1611 (stencil . ,ly:staff-symbol::print)
1613 (ledger-line-thickness . (1.0 . 0.1))
1615 (meta . ((class . Spanner)
1616 (interfaces . (staff-symbol-interface))))))
1620 (direction . ,ly:stem::calc-direction)
1621 (duration-log . ,stem::calc-duration-log)
1622 (default-direction . ,ly:stem::calc-default-direction)
1623 (stem-end-position . ,ly:stem::calc-stem-end-position)
1625 (neutral-direction . ,DOWN)
1626 (stem-info . ,ly:stem::calc-stem-info)
1627 (positioning-done . ,ly:stem::calc-positioning-done)
1628 (stencil . ,ly:stem::print)
1629 (X-extent . ,ly:stem::width)
1630 (Y-extent . ,ly:stem::height)
1631 (length . ,ly:stem::calc-length)
1633 (cross-staff . ,ly:stem::calc-cross-staff)
1634 (flag . ,ly:stem::calc-flag)
1637 ;; 3.5 (or 3 measured from note head) is standard length
1638 ;; 32nd, 64th flagged stems should be longer
1639 (lengths . (3.5 3.5 3.5 4.5 5.0))
1641 ;; FIXME. 3.5 yields too long beams (according to Ross and
1642 ;; looking at Baerenreiter examples) for a number of common
1643 ;; boundary cases. Subtracting half a beam thickness fixes
1644 ;; this, but the bug may well be somewhere else.
1646 ;; FIXME this should come from 'lengths
1647 (beamed-lengths . (3.26 3.5 3.6))
1649 ;; The 'normal' minima
1650 (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1651 ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1653 ;; The 'extreme case' minima
1654 (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1656 ;; Stems in unnatural (forced) direction should be shortened by
1657 ;; one staff space, according to [Roush & Gourlay].
1658 ;; Flagged stems we shorten only half a staff space.
1659 (stem-shorten . (1.0 0.5))
1663 ;; We use the normal minima as minimum for the ideal lengths,
1664 ;; and the extreme minima as abolute minimum length.
1666 (X-offset . ,ly:stem::offset-callback)
1667 (Y-offset . ,ly:staff-symbol-referencer::callback)
1668 (meta . ((class . Item)
1669 (interfaces . (stem-interface
1670 font-interface))))))
1674 (Y-extent . ,ly:stem-tremolo::height)
1675 (X-extent . ,ly:stem-tremolo::width)
1676 (stencil . ,ly:stem-tremolo::print)
1677 (slope . ,ly:stem-tremolo::calc-slope)
1678 (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1679 (style . ,ly:stem-tremolo::calc-style)
1680 (beam-thickness . 0.48) ; staff-space
1681 (meta . ((class . Item)
1682 (interfaces . (stem-tremolo-interface))))))
1686 (stencil . ,print-circled-text-callback)
1687 (text . ,string-number::calc-text)
1689 (staff-padding . 0.5)
1690 (self-alignment-X . ,CENTER)
1691 (self-alignment-Y . ,CENTER)
1692 (script-priority . 100)
1693 (avoid-slur . around)
1694 (font-encoding . fetaNumber)
1695 (font-size . -5) ; don't overlap when next to heads.
1696 (meta . ((class . Item)
1697 (interfaces . (string-number-interface
1699 text-script-interface
1701 side-position-interface
1702 self-alignment-interface))))))
1706 (stencil . ,ly:text-interface::print)
1707 (text . ,stroke-finger::calc-text)
1708 (digit-names . #("p" "i" "m" "a" "x"))
1710 (staff-padding . 0.5)
1711 (self-alignment-X . ,CENTER)
1712 (self-alignment-Y . ,CENTER)
1713 (script-priority . 100)
1714 (font-shape . italic)
1715 (font-size . -4) ; don't overlap when next to heads.
1716 (meta . ((class . Item)
1717 (interfaces . (stroke-finger-interface
1719 text-script-interface
1721 side-position-interface
1722 self-alignment-interface))))))
1726 (extra-spacing-width . (+inf.0 . -inf.0))
1727 (stencil . ,ly:sustain-pedal::print)
1728 (self-alignment-X . ,CENTER)
1729 (direction . ,RIGHT)
1730 (padding . 0.0) ;; padding relative to SustainPedalLineSpanner
1731 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1732 (meta . ((class . Item)
1733 (interfaces . (piano-pedal-interface
1735 self-alignment-interface
1736 piano-pedal-script-interface
1737 font-interface))))))
1739 (SustainPedalLineSpanner
1742 (Y-extent . ,ly:axis-group-interface::height)
1743 (X-extent . ,ly:axis-group-interface::width)
1744 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1745 (outside-staff-priority . 1000)
1748 (staff-padding . 1.2)
1749 (minimum-space . 1.0)
1751 (meta . ((class . Spanner)
1752 (interfaces . (piano-pedal-interface
1753 axis-group-interface
1754 side-position-interface))))))
1759 (X-extent . ,ly:axis-group-interface::width)
1760 (Y-extent . ,ly:axis-group-interface::height)
1761 (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
1762 (max-stretch . ,ly:axis-group-interface::calc-max-stretch)
1763 (meta . ((class . System)
1764 (interfaces . (system-interface
1765 axis-group-interface))))))
1771 (stencil . ,ly:system-start-delimiter::print)
1772 (collapse-height . 5.0)
1773 (X-offset . ,ly:side-position-interface::x-aligned-side)
1775 (font-encoding . fetaBraces)
1777 (meta . ((class . Spanner)
1778 (interfaces . (system-start-delimiter-interface
1779 side-position-interface
1780 font-interface))))))
1785 (X-offset . ,ly:side-position-interface::x-aligned-side)
1787 (stencil . ,ly:system-start-delimiter::print)
1788 (style . line-bracket)
1790 (meta . ((class . Spanner)
1791 (interfaces . (font-interface
1792 side-position-interface
1793 system-start-delimiter-interface))))))
1799 (X-offset . ,ly:side-position-interface::x-aligned-side)
1801 (stencil . ,ly:system-start-delimiter::print)
1803 (collapse-height . 5.0)
1805 (meta . ((class . Spanner)
1806 (interfaces . (font-interface
1807 side-position-interface
1808 system-start-delimiter-interface))))))
1815 (padding . -0.1) ;; bar must cover rounded ending of staff line.
1816 (X-offset . ,ly:side-position-interface::x-aligned-side)
1819 (collapse-height . 5.0)
1821 (stencil . ,ly:system-start-delimiter::print)
1822 (meta . ((class . Spanner)
1823 (interfaces . (side-position-interface
1824 system-start-delimiter-interface))))))
1829 (stencil . ,ly:text-interface::print)
1830 (duration-log . ,note-head::calc-duration-log)
1831 (Y-offset . ,ly:staff-symbol-referencer::callback)
1832 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1833 (direction . ,CENTER)
1835 (stem-attachment . (0.0 . 1.35))
1836 (font-series . bold)
1837 (meta . ((class . Item)
1838 (interfaces . (rhythmic-head-interface
1840 rhythmic-grob-interface
1842 staff-symbol-referencer-interface
1843 text-interface))))))
1847 (extra-spacing-width . (+inf.0 . -inf.0))
1848 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1849 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1853 ;; sync with Fingering ?
1855 (staff-padding . 0.5)
1857 (stencil . ,ly:text-interface::print)
1858 (direction . ,ly:script-interface::calc-direction)
1859 (positioning-done . ,ly:script-interface::calc-positioning-done)
1861 (outside-staff-priority . 450)
1862 (avoid-slur . around)
1863 (slur-padding . 0.5)
1864 (script-priority . 200)
1865 (cross-staff . ,ly:script-interface::calc-cross-staff)
1866 ;; todo: add X self alignment?
1867 (meta . ((class . Item)
1868 (interfaces . (text-script-interface
1870 instrument-specific-markup-interface
1871 side-position-interface
1872 font-interface))))))
1876 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1877 (font-shape . italic)
1878 (style . dashed-line)
1879 (staff-padding . 0.8)
1880 (dash-fraction . 0.2)
1884 (outside-staff-priority . 350)
1886 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1887 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1888 (bound-details . ((left . ((Y . 0)
1890 (attach-dir . ,LEFT)
1896 (stencil . ,ly:line-spanner::print)
1898 (meta . ((class . Spanner)
1899 (interfaces . (line-spanner-interface
1901 side-position-interface
1902 font-interface))))))
1906 (control-points . ,ly:tie::calc-control-points)
1907 (springs-and-rods . ,ly:spanner::set-spacing-rods)
1908 (avoid-slur . inside)
1909 (direction . ,ly:tie::calc-direction)
1910 (neutral-direction . ,UP)
1911 (stencil . ,ly:tie::print)
1914 ;; for a full list, see tie-details.cc
1916 (center-staff-line-clearance . 0.6)
1917 (tip-staff-line-clearance . 0.45)
1918 (note-head-gap . 0.2)
1920 (height-limit . 1.0)
1921 (horizontal-distance-penalty-factor . 10)
1922 (same-dir-as-stem-penalty . 8)
1923 (min-length-penalty-factor . 26)
1924 (tie-tie-collision-distance . 0.45)
1925 (tie-tie-collision-penalty . 25.0)
1926 (intra-space-threshold . 1.25)
1927 (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
1928 (outer-tie-length-symmetry-penalty-factor . 10)
1929 (vertical-distance-penalty-factor . 7)
1930 (outer-tie-vertical-gap . 0.25)
1931 (multi-tie-region-size . 3)
1932 (single-tie-region-size . 4)
1933 (between-length-limit . 1.0)))
1936 (line-thickness . 0.8)
1937 (meta . ((class . Spanner)
1938 (interfaces . (tie-interface))))))
1942 (positioning-done . ,ly:tie-column::calc-positioning-done)
1943 (before-line-breaking . ,ly:tie-column::before-line-breaking)
1946 (meta . ((class . Spanner)
1947 (interfaces . (tie-column-interface))))))
1951 (stencil . ,ly:time-signature::print)
1952 (break-align-symbol . time-signature)
1954 . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1955 (break-visibility . ,all-visible)
1956 (avoid-slur . inside)
1957 (extra-spacing-height . (-1.0 . 1.0))
1959 (first-note . (fixed-space . 2.0))
1960 (right-edge . (extra-space . 0.5))
1961 (staff-bar . (minimum-space . 2.0))))
1964 (meta . ((class . Item)
1965 (interfaces . (time-signature-interface
1966 break-aligned-interface
1967 font-interface))))))
1971 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
1972 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
1974 (bound-details . ((left . ((text . ,(make-translate-scaled-markup
1976 (make-musicglyph-markup "scripts.trill")))
1978 (stencil-offset . (-0.5 . 0))
1980 (attach-dir . ,CENTER)
1981 ;; this isn't CENTER because the trill glyph's origin
1982 ;; is not centered in its extent; to have the trill
1983 ;; spanner aligned the same as a trill, we need a slight offset
1984 (anchor-alignment . 0.15)
1986 (left-broken . ((end-on-note . #t)))
1990 (stencil . ,ly:line-spanner::print)
1993 (staff-padding . 1.0)
1996 (Y-offset . ,ly:side-position-interface::y-aligned-side)
1998 (outside-staff-priority . 50)
1999 (meta . ((class . Spanner)
2000 (interfaces . (line-spanner-interface
2002 trill-spanner-interface
2003 side-position-interface
2004 font-interface))))))
2006 (TrillPitchAccidental
2007 . ((X-offset . ,ly:side-position-interface::x-aligned-side)
2012 (stencil . ,ly:accidental-interface::print)
2013 (Y-extent . ,ly:accidental-interface::height)
2014 (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2015 (meta . ((class . Item)
2016 (interfaces . (trill-pitch-accidental-interface
2017 accidental-interface
2018 side-position-interface
2019 font-interface))))))
2022 . ((X-offset . ,ly:side-position-interface::x-aligned-side)
2025 (stencil . ,parenthesize-elements)
2026 (stencils . ,parentheses-item::calc-parenthesis-stencils)
2027 (direction . ,RIGHT)
2030 (meta . ((class . Item)
2031 (interfaces . (side-position-interface
2032 parentheses-interface
2035 axis-group-interface))))))
2039 (stencil . ,ly:note-head::print)
2041 (Y-offset . ,ly:staff-symbol-referencer::callback)
2043 (meta . ((class . Item)
2044 (interfaces . (rhythmic-head-interface
2046 pitched-trill-interface
2048 staff-symbol-referencer-interface))))))
2054 (edge-height . (0.7 . 0.7))
2055 (shorten-pair . (-0.2 . -0.2))
2056 (staff-padding . 0.25)
2057 (full-length-to-extent . #t)
2058 (direction . ,ly:tuplet-bracket::calc-direction)
2059 (positions . ,ly:tuplet-bracket::calc-positions)
2060 (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2061 (control-points . ,ly:tuplet-bracket::calc-control-points)
2062 (stencil . ,ly:tuplet-bracket::print)
2063 (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2065 (meta . ((class . Spanner)
2066 (interfaces . (line-interface
2067 tuplet-bracket-interface))))))
2071 (stencil . ,ly:tuplet-number::print)
2072 (text . ,tuplet-number::calc-denominator-text)
2073 (font-shape . italic)
2075 (avoid-slur . inside)
2076 (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2077 (meta . ((class . Spanner)
2078 (interfaces . (text-interface tuplet-number-interface
2079 font-interface))))))
2084 (stencil . ,ly:text-interface::print)
2085 (font-shape . italic)
2086 (extra-spacing-width . (+inf.0 . -inf.0))
2087 (self-alignment-X . ,CENTER)
2088 (direction . ,RIGHT)
2089 (padding . 0.0) ;; padding relative to UnaCordaPedalLineSpanner
2090 (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2091 (meta . ((class . Item)
2092 (interfaces . (text-interface
2093 piano-pedal-script-interface
2094 self-alignment-interface
2095 font-interface))))))
2097 (UnaCordaPedalLineSpanner
2100 (Y-extent . ,ly:axis-group-interface::height)
2101 (X-extent . ,ly:axis-group-interface::width)
2102 (Y-offset . ,ly:side-position-interface::y-aligned-side)
2103 (outside-staff-priority . 1000)
2106 (staff-padding . 1.2)
2107 (minimum-space . 1.0)
2109 (meta . ((class . Spanner)
2110 (interfaces . (piano-pedal-interface
2111 axis-group-interface
2112 side-position-interface))))))
2119 (stencil . ,ly:vaticana-ligature::print)
2120 (meta . ((class . Spanner)
2121 (interfaces . (vaticana-ligature-interface
2122 font-interface))))))
2127 (positioning-done . ,ly:align-interface::calc-positioning-done)
2128 (after-line-breaking . ,ly:align-interface::stretch-after-break)
2129 (Y-extent . ,ly:axis-group-interface::height)
2130 (X-extent . ,ly:axis-group-interface::width)
2133 (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2135 (meta . ((class . Spanner)
2136 (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)))
2137 (interfaces . (align-interface
2138 axis-group-interface))))))
2143 (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2144 (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2145 (X-extent . ,ly:axis-group-interface::width)
2146 (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2147 (max-stretch . ,ly:axis-group-interface::calc-max-stretch)
2148 (stencil . ,ly:axis-group-interface::print)
2149 (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2150 (meta . ((class . Spanner)
2151 (object-callbacks . ((X-common . ,ly:axis-group-interface::calc-x-common)))
2152 (interfaces . (axis-group-interface
2153 hara-kiri-group-spanner-interface
2154 vertically-spaceable-interface))))))
2158 (stencil . ,ly:volta-bracket-interface::print)
2159 (font-encoding . fetaNumber)
2160 (thickness . 1.6) ;; line-thickness
2161 (edge-height . (2.0 . 2.0)) ;; staff-space;
2165 (meta . ((class . Spanner)
2166 (interfaces . (volta-bracket-interface
2167 horizontal-bracket-interface
2170 side-position-interface
2171 font-interface))))))
2173 (VoltaBracketSpanner
2179 (Y-offset . ,ly:side-position-interface::y-aligned-side)
2180 (outside-staff-priority . 100)
2181 (Y-extent . ,ly:axis-group-interface::height)
2182 (X-extent . ,ly:axis-group-interface::width)
2183 (no-alignment . ,#t)
2184 (meta . ((class . Spanner)
2185 (interfaces . (side-position-interface
2186 axis-group-interface))))))
2195 (bound-details . ((right . ((attach-dir . ,CENTER)
2198 (left . ((attach-dir . ,CENTER)
2202 (stencil . ,ly:line-spanner::print)
2203 (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2204 (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2205 (meta . ((class . Spanner)
2206 (interfaces . (line-spanner-interface
2207 line-interface))))))
2211 (define (completize-grob-entry x)
2212 "Transplant assoc key into 'name entry of 'meta of X. Set interfaces for Item, Spanner etc.
2214 ;; (display (car x))
2216 (let* ((name-sym (car x))
2217 (grob-entry (cdr x))
2218 (meta-entry (cdr (assoc 'meta grob-entry)))
2219 (class (cdr (assoc 'class meta-entry)))
2221 (cdr (assoc 'interfaces meta-entry))))
2225 (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2226 ((eq? 'Spanner class)
2227 (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2228 ((eq? 'Paper_column class)
2229 (set! ifaces-entry (cons 'item-interface
2230 (cons 'paper-column-interface ifaces-entry))))
2231 ((eq? 'System class)
2232 (set! ifaces-entry (cons 'system-interface
2233 (cons 'spanner-interface ifaces-entry))))
2235 (ly:warning "Unknown class ~a" class)))
2237 (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2238 (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2240 (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2241 (set! meta-entry (assoc-set! meta-entry 'interfaces
2243 (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2244 (cons name-sym grob-entry)))
2246 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2248 ;; (display (map pair? all-grob-descriptions))
2250 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2253 ;; (display (car x)) (newline)
2255 (set-object-property! (car x) 'translation-type? list?)
2256 (set-object-property! (car x) 'is-grob? #t))
2257 all-grob-descriptions)
2259 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2261 (define pure-print-callbacks
2263 fret-board::calc-stencil
2264 print-circled-text-callback
2267 ly:arpeggio::brew-chord-bracket
2272 ly:text-interface::print
2273 ly:script-interface::print))
2275 ;; ly:grob::stencil-extent is safe iff the print callback is safe too
2276 (define (pure-stencil-height grob start stop)
2277 (let ((sten (ly:grob-property-data grob 'stencil)))
2280 (memq sten pure-print-callbacks))
2281 (ly:grob::stencil-height grob)
2284 (define pure-conversions-alist
2286 (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2287 (,ly:arpeggio::height . ,ly:arpeggio::pure-height)
2288 (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2289 (,ly:stem::height . ,ly:stem::pure-height)
2290 (,ly:rest::height . ,ly:rest::pure-height)
2291 (,ly:grob::stencil-height . ,pure-stencil-height)
2292 (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2293 (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2294 (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2295 (,ly:slur::height . ,ly:slur::pure-height)
2296 (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)))
2298 (define pure-functions
2300 parenthesize-elements
2301 ly:rest::y-offset-callback
2302 ly:staff-symbol-referencer::callback
2303 ly:staff-symbol::height))
2305 (define-public (pure-relevant? grob)
2306 (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2309 (pair? extent-callback)
2310 (memq extent-callback pure-functions)
2312 (pair? (assq extent-callback pure-conversions-alist))
2315 (not (eq? extent-callback ly:grob::stencil-height))
2316 (memq (ly:grob-property-data grob 'stencil) pure-print-callbacks)
2317 (ly:stencil? (ly:grob-property-data grob 'stencil))
2321 (define-public (call-pure-function unpure args start end)
2322 (if (ly:simple-closure? unpure)
2323 (ly:eval-simple-closure (car args) unpure start end)
2324 (if (not (procedure? unpure))
2326 (if (memq unpure pure-functions)
2328 (let ((pure (assq unpure pure-conversions-alist)))
2332 (list (car args) start end)