SCM one (get_property ("beatLength"));
Moment end_mom;
- if (SMOB_IS_TYPE_B(Moment, one))
- end_mom = *SMOB_TO_TYPE (Moment, one);
+ if (unsmob_moment (one))
+ end_mom = *unsmob_moment (one);
/*
second guess: property generic time exception
*/
SCM begin = get_property (time_str + "beamAutoBegin");
- if (SMOB_IS_TYPE_B(Moment, begin))
- begin_mom = * SMOB_TO_TYPE(Moment, begin);
+ if (unsmob_moment (begin))
+ begin_mom = * unsmob_moment (begin);
SCM end = get_property (time_str + "beamAutoEnd");
- if (SMOB_IS_TYPE_B (Moment, end))
- end_mom = * SMOB_TO_TYPE(Moment,end);
+ if (unsmob_moment (end))
+ end_mom = * unsmob_moment (end);
/*
third guess: property time exception, specific for duration type
if (type_str.length_i ())
{
SCM end_mult = get_property ( time_str + "beamAutoEnd" + type_str);
- if (SMOB_IS_TYPE_B (Moment, end_mult))
- end_mom = * SMOB_TO_TYPE (Moment,end_mult);
+ if (unsmob_moment (end_mult))
+ end_mom = * unsmob_moment (end_mult);
SCM begin_mult = get_property (time_str + "beamAutoBegin" + type_str);
- if (SMOB_IS_TYPE_B (Moment, begin_mult))
- begin_mom = * SMOB_TO_TYPE (Moment,begin_mult);
+ if (unsmob_moment (begin_mult))
+ begin_mom = * unsmob_moment (begin_mult);
}
/*
fourth guess [user override]: property plain generic
*/
begin = get_property ("beamAutoBegin");
- if (SMOB_IS_TYPE_B(Moment, begin))
- begin_mom = * SMOB_TO_TYPE(Moment, begin);
+ if (unsmob_moment (begin))
+ begin_mom = * unsmob_moment (begin);
end = get_property ("beamAutoEnd");
- if (SMOB_IS_TYPE_B (Moment, end))
- end_mom = * SMOB_TO_TYPE (Moment,end);
+ if (unsmob_moment (end))
+ end_mom = * unsmob_moment (end);
/*
fifth guess [user override]: property plain, specific for duration type
if (type_str.length_i ())
{
SCM end_mult = get_property (String ("beamAutoEnd") + type_str);
- if (SMOB_IS_TYPE_B (Moment, end_mult))
- end_mom = * SMOB_TO_TYPE (Moment,end_mult);
+ if (unsmob_moment (end_mult))
+ end_mom = * unsmob_moment (end_mult);
SCM begin_mult = get_property (String ("beamAutoBegin") + type_str);
- if (SMOB_IS_TYPE_B (Moment, begin_mult))
- begin_mom = * SMOB_TO_TYPE (Moment,begin_mult);
+ if (unsmob_moment (begin_mult))
+ begin_mom = * unsmob_moment (begin_mult);
}
Rational r;
else
next_origin = ly_symbol2scm ("begin-of-note");
- SCM extra_space
- = scm_eval (scm_listify (ly_symbol2scm ("break-align-spacer"),
- ly_quote_scm (current_origin),
- ly_quote_scm (next_origin),
- SCM_UNDEFINED));
+ SCM e = scm_assoc (scm_listify (current_origin,
+ next_origin,
+ SCM_UNDEFINED),
+ scm_eval (ly_symbol2scm ("space-alist")));
+
+ SCM extra_space;
+ if (e != SCM_BOOL_F)
+ {
+ extra_space = gh_cdr (e);
+ }
+ else
+ {
+ warning (_f ("unknown spacing pair `%s', `%s'",
+ ly_symbol2string (current_origin),
+ ly_symbol2string (next_origin)));
+ extra_space = scm_listify (ly_symbol2scm ("minimum-space"), gh_double2scm (0.0), SCM_UNDEFINED);
+ }
+
SCM symbol = gh_car (extra_space);
- Real spc = gh_scm2double (SCM_CADR(extra_space));
+ Real spc = gh_scm2double (gh_cadr(extra_space));
spc *= interline;
dists.push(spc);