- (position-callbacks . (,Beam::least_squares
- ,Beam::check_concave
- ,Beam::slope_damping
- ,Beam::shift_region_to_valid
- ,Beam::quanting))
- (callbacks . ((positions . ,Beam::calc_positions)
- (direction . ,Beam::calc_direction)
- (stencil . ,Beam::print)
- ))
+ (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)
+ (concaveness . ,ly:beam::calc-concaveness)
+ (direction . ,ly:beam::calc-direction)
+ (shorten . ,ly:beam::calc-stem-shorten)
+ (beaming . ,ly:beam::calc-beaming)
+ (stencil . ,ly:beam::print)