]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scripts/musicxml2ly.py (convert): add \version
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Dec 2005 11:54:58 +0000 (11:54 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 14 Dec 2005 11:54:58 +0000 (11:54 +0000)
* lily/tie.cc: remove get_default_attachments()

* lily/tie-configuration.cc: new file.

* lily/tie.cc: junk Tie::get_configuration()

ChangeLog
lily/include/tie.hh
lily/tie-configuration.cc
lily/tie.cc
scripts/musicxml2ly.py

index fcc37807b781309cde780cde8ea840d4f3da6bee..6694bbfdc4fedd898a14c3df3866bd661e1b2768 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 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
index dc69e9c6a30e42b97124b1077fa43bcbdf33ffb6..bd38bc58d67223e779a874741e873bf040f6f181 100644 (file)
@@ -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 &);
 };
 
 
index 39483b90f40a13172f133dd7ec1ae30ffd8344ad..d5a238f9f1066ac77c27c832f6f7febad70690f3 100644 (file)
@@ -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;
index 188e1df3bea6b751361ced8aade35df5ea6cda29..05da06fb8271ce1d6bb3ea73417b882aa6fc2ee9 100644 (file)
@@ -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<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)
index 2e911eafcce565f219d7de81d958a4ef36db24a7..f5cbc8e20e63fa5958f2c63840d7fa9962f7bd28 100644 (file)
@@ -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()