- Real slope_f = 0.25;
-
- if (st && st->beam_l ()) {
- slope_f = st->beam_l ()->slope_f_;
- // ugh, rather calc from Stem_tremolo_req
- beams_i = st->beam_count (RIGHT) >? st->beam_count (LEFT);
- }
+ Real dydx = 0.25;
+
+ if (st && st->beam_l ())
+ {
+ Real dy = 0;
+ SCM s = st->beam_l ()->get_elt_property ("height");
+ if (s != SCM_UNDEFINED)
+ dy = gh_scm2double (s);
+ Real dx = st->beam_l ()->last_visible_stem ()->hpos_f ()
+ - st->beam_l ()->first_visible_stem ()->hpos_f ();
+ dydx = dy/dx;
+
+ // ugh, rather calc from Stem_tremolo_req
+ beams_i = st->beam_count(RIGHT) >? st->beam_count (LEFT);
+ }