if (ly_c_procedure_p (func))
{
SCM s = scm_call_2 (func, me->self_scm (), scm_int2num (get_beam_count (me)));
- return ly_scm2double (s);
+ return scm_to_double (s);
}
else
{
Real line = Staff_symbol_referencer::line_thickness (me);
Real thickness = get_thickness (me);
- Real beam_translation = ly_scm2int (beam_count) < 4
+ Real beam_translation = scm_to_int (beam_count) < 4
? (2*staff_space + line - thickness) / 2.0
: (3*staff_space + line - thickness) / 3.0;
int count =0;
for ( SCM s = ly_car (right_beaming); ly_c_pair_p (s); s = ly_cdr (s))
{
- int k = - right_dir * ly_scm2int (ly_car (s)) + i;
+ int k = - right_dir * scm_to_int (ly_car (s)) + i;
if (scm_c_memq (scm_int2num (k), left_beaming) != SCM_BOOL_F)
count ++;
}
for (; ly_c_pair_p (s); s = ly_cdr (s))
{
int new_beam_pos =
- start_point - this_dir * ly_scm2int (ly_car (s));
+ start_point - this_dir * scm_to_int (ly_car (s));
new_slice.add_point (new_beam_pos);
scm_set_car_x (s, scm_int2num (new_beam_pos));
SCM s = ly_cdr (this_beaming);
for (; ly_c_pair_p (s); s = ly_cdr (s))
{
- int np = - this_dir * ly_scm2int (ly_car (s));
+ int np = - this_dir * scm_to_int (ly_car (s));
scm_set_car_x (s, scm_int2num (np));
last_int.add_point (np);
}
for (SCM s = left;
ly_c_pair_p (s); s =ly_cdr (s))
{
- int b = ly_scm2int (ly_car (s));
+ int b = scm_to_int (ly_car (s));
if (scm_c_memq (ly_car (s), right) != SCM_BOOL_F)
{
full_beams.push (b);
for (SCM s = right;
ly_c_pair_p (s); s =ly_cdr (s))
{
- int b = ly_scm2int (ly_car (s));
+ int b = scm_to_int (ly_car (s));
if (scm_c_memq (ly_car (s), left) == SCM_BOOL_F)
{
rfliebertjes.push (b);
Stencil gapped;
int gap_count = 0;
- if (ly_c_number_p (me->get_property ("gap-count")))
+ if (scm_is_number (me->get_property ("gap-count")))
{
- gap_count = ly_scm2int (me->get_property ("gap-count"));
+ gap_count = scm_to_int (me->get_property ("gap-count"));
gapped = Lookup::beam (dydx, w - 2 * gap_length, thick, blot);
full_beams.sort (default_compare);
SCM proc = me->get_property ("flag-width-function");
SCM result = scm_call_1 (proc, scm_int2num (t));
- nw_f = ly_scm2double (result);
+ nw_f = scm_to_double (result);
}
else
nw_f = break_overshoot / 2;
#if (DEBUG_QUANTING)
SCM quant_score = me->get_property ("quant-score");
if (to_boolean (me->get_paper ()->lookup_variable (ly_symbol2scm ("debug-beam-quanting")))
- && ly_c_string_p (quant_score))
+ && scm_is_string (quant_score))
{
/*
scm_cons (scm_int2num (total[UP]),
scm_int2num (total[DOWN])));
- if (ly_c_number_p (s) && ly_scm2int (s))
+ if (scm_is_number (s) && scm_to_int (s))
return to_dir (s);
/* If dir is not determined: get default */
Beam::consider_auto_knees (Grob* me)
{
SCM scm = me->get_property ("auto-knee-gap");
- if (!ly_c_number_p (scm))
+ if (!scm_is_number (scm))
return ;
- Real threshold = ly_scm2double (scm);
+ Real threshold = scm_to_double (scm);
Int_set gaps;
SCM shorten_elt =
robust_list_ref (beam_count -1, shorten_list);
- Real shorten_f = ly_scm2double (shorten_elt) * staff_space;
+ Real shorten_f = scm_to_double (shorten_elt) * staff_space;
/* your similar cute comment here */
shorten_f *= forced_fraction;
*/
bool is_concave1 = false;
SCM gap = me->get_property ("concaveness-gap");
- if (ly_c_number_p (gap))
+ if (scm_is_number (gap))
{
- Real r1 = ly_scm2double (gap);
+ Real r1 = scm_to_double (gap);
Real dy = Stem::chord_start_y (stems.top ())
- Stem::chord_start_y (stems[0]);
Real concaveness2 = 0;
SCM thresh = me->get_property ("concaveness-threshold");
Real r2 = infinity_f;
- if (!is_concave1 && ly_c_number_p (thresh))
+ if (!is_concave1 && scm_is_number (thresh))
{
- r2 = ly_scm2double (thresh);
+ r2 = scm_to_double (thresh);
Interval iv;
iv.add_point (Stem::chord_start_y (stems[0]));
return SCM_UNSPECIFIED;
SCM s = me->get_property ("damping");
- int damping = ly_scm2int (s);
+ int damping = scm_to_int (s);
if (damping)
{
{
if (scm_c_memq (ly_car (s), ly_cdr (beaming)) != SCM_BOOL_F)
- l.add_point (ly_scm2int (ly_car (s)));
+ l.add_point (scm_to_int (ly_car (s)));
}
return l;
bool gap = false;
Real thick =0.0;
- if (ly_c_number_p (me->get_property ("gap-count"))
- &&ly_scm2int (me->get_property ("gap-count")))
+ if (scm_is_number (me->get_property ("gap-count"))
+ &&scm_to_int (me->get_property ("gap-count")))
{
gap = true;
thick = get_thickness (me);
Beam::rest_collision_callback (SCM element_smob, SCM axis)
{
Grob *rest = unsmob_grob (element_smob);
- Axis a = (Axis) ly_scm2int (axis);
+ Axis a = (Axis) scm_to_int (axis);
- if (ly_c_number_p (rest->get_property ("staff-position")))
+ if (scm_is_number (rest->get_property ("staff-position")))
return scm_int2num (0);
assert (a == Y_AXIS);
Drul_array<Real> pos (0, 0);
SCM s = beam->get_property ("positions");
- if (ly_c_pair_p (s) && ly_c_number_p (ly_car (s)))
+ if (ly_c_pair_p (s) && scm_is_number (ly_car (s)))
pos = ly_scm2interval (s);
Real staff_space = Staff_symbol_referencer::staff_space (rest);
Beam::is_knee (Grob* me)
{
SCM k = me->get_property ("knee");
- if (ly_c_boolean_p (k))
+ if (scm_is_bool (k))
return ly_scm2bool (k);
bool knee = false;