2005-12-14 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * scripts/musicxml2ly.py (convert): add \version
+
+ * lily/tie.cc: remove get_default_attachments()
+
* VERSION (PACKAGE_NAME): release 2.7.23
* lily/chord-tremolo-engraver.cc (acknowledge_stem): use
DECLARE_SCHEME_CALLBACK (calc_control_points, (SCM));
static int compare (Grob *const &s1,
Grob *const &s2);
-
- static Interval get_default_attachments (Spanner *me, Grob *common, Real gap,
- int *staff_position, bool *in_between,
- Tie_details const &);
};
}
-/*
- Get bezier with left control at (0,0)
- */
Bezier
Tie_configuration::get_transformed_bezier (Tie_details const &details) const
{
Tie_configuration::get_untransformed_bezier (Tie_details const &details) const
{
Real l = attachment_x_.length();
- if (isnan (l) || isnan (l))
+ if (isinf (l) || isnan (l))
{
programming_error ("Inf or NaN encountered");
l = 1.0;
return SCM_UNSPECIFIED;
}
-Interval
-Tie::get_default_attachments (Spanner *me, Grob *common, Real gap,
- int *staff_position,
- bool *in_between,
- Tie_details const &details
- )
-{
- Real staff_space = Staff_symbol_referencer::staff_space (me);
- Direction dir = get_grob_direction (me);
- Interval attachments;
- Direction d = LEFT;
- do
- {
- attachments[d]
- = robust_relative_extent (me->get_bound (d),
- common,
- X_AXIS)[-d]
- - gap * d;
- }
- while (flip (&d) != LEFT);
-
- if (attachments.length () < details.between_length_limit_ * staff_space)
- {
- /*
- Let short ties start over note heads, instead of between.
- */
- Drul_array<bool> allow (true, true);
-
- Direction d = LEFT;
- do {
- if (Note_head::has_interface (me->get_bound (d)))
- {
- Grob *stem = unsmob_grob (me->get_bound (d)->get_object ("stem"));
- if (get_grob_direction (stem) == dir
- && -d == dir)
- allow[d] = false;
- }
- } while (flip (&d) != LEFT);
-
- if (allow[LEFT] && allow[RIGHT])
- {
- *staff_position += dir;
- do
- {
- if (Note_head::has_interface (me->get_bound (d)))
- {
- Interval extent
- = robust_relative_extent (me->get_bound (d),
- common, X_AXIS);
-
- attachments[d] = extent.linear_combination (- 0.5 * d);
- *in_between = false;
- }
- }
- while (flip (&d) != LEFT);
- }
- }
-
- return attachments;
-}
void
Tie::set_default_control_points (Grob *me_grob)
progress ("Printing as .ly...")
for (k,v) in voices.items():
+ printer.print_verbatim ('%% converted from %s\n' % filename)
+ printer.dump_version ()
printer.dump ('%s = ' % k)
v.print_ly (printer)
printer.newline()