+MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_slope, 1)
+SCM
+Stem_tremolo::calc_slope (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Grob *stem = unsmob_grob (me->get_object ("stem"));
+ Spanner *beam = Stem::get_beam (stem);
+
+ if (beam)
+ {
+ Real dy = 0;
+ SCM s = beam->get_property ("quantized-positions");
+ if (is_number_pair (s))
+ dy = - scm_to_double (scm_car (s)) + scm_to_double (scm_cdr (s));
+
+ Grob *s2 = Beam::last_visible_stem (beam);
+ Grob *s1 = Beam::first_visible_stem (beam);
+
+ Grob *common = s1->common_refpoint (s2, X_AXIS);
+ Real dx = s2->relative_coordinate (common, X_AXIS) -
+ s1->relative_coordinate (common, X_AXIS);