From: Han-Wen Nienhuys Date: Wed, 14 Dec 2005 11:54:58 +0000 (+0000) Subject: * scripts/musicxml2ly.py (convert): add \version X-Git-Tag: release/2.7.24~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=498009ebeb0f902eb18a9e21db8e0a2b7e694fa0;p=lilypond.git * scripts/musicxml2ly.py (convert): add \version * lily/tie.cc: remove get_default_attachments() * lily/tie-configuration.cc: new file. * lily/tie.cc: junk Tie::get_configuration() --- diff --git a/ChangeLog b/ChangeLog index fcc37807b7..6694bbfdc4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-12-14 Han-Wen Nienhuys + * 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 diff --git a/lily/include/tie.hh b/lily/include/tie.hh index dc69e9c6a3..bd38bc58d6 100644 --- a/lily/include/tie.hh +++ b/lily/include/tie.hh @@ -41,10 +41,6 @@ public: 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 &); }; diff --git a/lily/tie-configuration.cc b/lily/tie-configuration.cc index 39483b90f4..d5a238f9f1 100644 --- a/lily/tie-configuration.cc +++ b/lily/tie-configuration.cc @@ -42,9 +42,6 @@ Tie_configuration::center_tie_vertically (Tie_details const &details) } -/* - Get bezier with left control at (0,0) - */ Bezier Tie_configuration::get_transformed_bezier (Tie_details const &details) const { @@ -64,7 +61,7 @@ Bezier 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; diff --git a/lily/tie.cc b/lily/tie.cc index 188e1df3be..05da06fb82 100644 --- a/lily/tie.cc +++ b/lily/tie.cc @@ -133,66 +133,6 @@ Tie::calc_direction (SCM smob) 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 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) diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 2e911eafcc..f5cbc8e20e 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -440,6 +440,8 @@ def convert (filename, output_name): 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()