]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 676: unterminated ties should not be rendered in MIDI
authorReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 16 Nov 2009 17:58:19 +0000 (18:58 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 20 Nov 2009 15:49:36 +0000 (16:49 +0100)
If we have unterminated ties, clear them, unless tieWaitForNote is set.

lily/tie-performer.cc

index 58bc879ec13bb3619ee7007fdf89f697e376c817..fd3c0bbb65587265dbf1feab57e52de5db36e192 100644 (file)
@@ -90,7 +90,10 @@ Tie_performer::start_translation_timestep ()
 void
 Tie_performer::stop_translation_timestep ()
 {
-  if (ties_created_)
+  // Clear tie information if we created ties. If we didn't create ties,
+  // We might have dangling open ties like c~ d. Close them, unless we have
+  // tieWaitForNote set...
+  if (ties_created_ || !to_boolean (get_property ("tieWaitForNote")))
     {
       heads_to_tie_.clear ();
       ties_created_ = false;
@@ -117,8 +120,8 @@ ADD_TRANSLATOR (Tie_performer,
                "",
 
                /* read */
-               "tieMelismaBusy",
+               "tieWaitForNote",
 
                /* write */
-               ""
+               "tieMelismaBusy"
                );