+ (beaming . ,ly:beam::calc-beaming)
+ (clip-edges . #t)
+ (concaveness . ,ly:beam::calc-concaveness)
+ (cross-staff . ,ly:beam::calc-cross-staff)
+ (damping . 1)
+ (details
+ .(
+ (secondary-beam-demerit . 10)
+ (stem-length-demerit-factor . 5)
+ (region-size . 2)
+ (beam-eps . 0.001)
+ (stem-length-limit-penalty . 5000)
+ (damping-direction-penalty . 800)
+ (hint-direction-penalty . 20)
+ (musical-direction-factor . 400)
+ (ideal-slope-factor . 10)
+ (round-to-zero-slope . 0.02)))
+ (direction . ,ly:beam::calc-direction)
+
+ ;; only for debugging.
+ (font-family . roman)
+
+ (gap . 0.8)
+ (neutral-direction . ,DOWN)
+ (positions . ,(ly:make-simple-closure
+ (ly:make-simple-closure
+ (list chain-grob-member-functions
+ `(,cons 0 0)
+ ly:beam::calc-least-squares-positions
+ ly:beam::slope-damping
+ ly:beam::shift-region-to-valid
+ ly:beam::quanting
+ ))))
+
+ ;; this is a hack to set stem lengths, if positions is set.
+ (quantized-positions . ,ly:beam::set-stem-lengths)
+
+ (shorten . ,ly:beam::calc-stem-shorten)
+ (stencil . ,ly:beam::print)
+
+ ;; TODO: should be in SLT.
+ (thickness . 0.48) ; in staff-space
+
+ (meta . ((class . Spanner)
+ (object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems)))
+ (interfaces . (beam-interface
+ font-interface
+ staff-symbol-referencer-interface
+ unbreakable-spanner-interface))))))