- (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)
+ Beam::calc_least_squares_positions
+ Beam::slope_damping
+ Beam::shift_region_to_valid
+ Beam::quanting
+ ))))
+
+ ;; this is a hack to set stem lengths, if positions is set.
+ (quantized-positions . ,Beam::set_stem_lengths)
+ (concaveness . ,Beam::calc_concaveness)
+ (direction . ,Beam::calc_direction)
+ (shorten . ,Beam::calc_stem_shorten)
+ (beaming . ,Beam::calc_beaming)
+ (stencil . ,Beam::print)