Real beam_thickness = get_beam_thickness (me);
Real fract = robust_scm2double (me->get_property ("length-fraction"), 1.0);
- Real beam_translation = beam_count < 4
- ? (2 * staff_space + line - beam_thickness) / 2.0
- : (3 * staff_space + line - beam_thickness) / 3.0;
-
- return fract * beam_translation;
+ /*
+ if fract != 1.0, as is the case for grace notes, we want the gap
+ to decrease too. To achieve this, we divide the thickness by
+ fract */
+ return (beam_count < 4
+ ? (2 * staff_space * fract + line * fract - beam_thickness) / 2.0
+ : (3 * staff_space * fract + line * fract - beam_thickness) / 3.0);
}
/* Maximum beam_count. */
for (SCM s = scm_car (right_beaming); scm_is_pair (s); s = scm_cdr (s))
{
int k = -right_dir * scm_to_int (scm_car (s)) + i;
- if (scm_is_true (scm_c_memq (scm_from_int (k), left_beaming)))
+ if (scm_is_true (ly_memv (scm_from_int (k), left_beaming)))
count++;
}
for (SCM s = scm_car (beaming); scm_is_pair (s); s = scm_cdr (s))
{
- if (scm_is_true (scm_c_memq (scm_car (s), scm_cdr (beaming))))
+ if (scm_is_true (ly_memv (scm_car (s), scm_cdr (beaming))))
l.add_point (scm_to_int (scm_car (s)));
}
return scm_from_double (0.0);
Grob *beam = unsmob<Grob> (stem->get_object ("beam"));
if (!beam
- || !Beam::has_interface (beam)
+ || !has_interface<Beam> (beam)
|| !Beam::normal_stem_count (beam))
return scm_from_double (0.0);