#include "spanner.hh"
#include "warn.hh"
-bool debug_beam_quanting_flag;
-
#if DEBUG_QUANTING
#include "text-item.hh" // debug output.
#if (DEBUG_QUANTING)
SCM quant_score = me->get_property ("quant-score");
- if (debug_beam_quanting_flag
+ if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
&& ly_c_string_p (quant_score))
{
String str;
SCM properties = Font_interface::text_font_alist_chain (me);
+ Direction stem_dir = stems.size() ? to_dir (stems[0]->get_property ("direction")) : UP;
+
Stencil tm = *unsmob_stencil (Text_item::interpret_markup
(me->get_paper ()->self_scm (), properties, quant_score));
- the_beam.add_at_edge (Y_AXIS, UP, tm, 5.0, 0);
+ the_beam.add_at_edge (Y_AXIS, stem_dir, tm, 1.0, 0);
}
#endif
-
-
return the_beam.smobbed_copy ();
}
/*
For broken beams this doesn't work well. In this case, the
- slope esp. of the first part of a broken beam should predict
- where the second part goes.
- */
+ slope esp. of the first part of a broken beam should predict
+ where the second part goes.
+ */
me->set_property ("least-squares-dy",
- scm_make_real (pos[RIGHT] - pos[LEFT]));
+ scm_make_real (pos[RIGHT] - pos[LEFT]));
}
else
{
if (is_concave1 || concaveness2 > r2)
{
Drul_array<Real> pos = ly_scm2interval (me->get_property ("positions"));
- Real r = linear_combination (pos, 0);
+ Real r = linear_combination (pos, 0.0);
r /= Staff_symbol_referencer::staff_space (me);
me->set_property ("positions", ly_interval2scm (Drul_array<Real> (r, r)));