]> git.donarmstrong.com Git - lilypond.git/commitdiff
extend Audio_note::tie_to to contain an optional skip before the tied note
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 17 Nov 2009 16:35:27 +0000 (17:35 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Fri, 20 Nov 2009 15:49:36 +0000 (16:49 +0100)
lily/audio-item.cc
lily/include/audio-item.hh

index 33e54d713a869b7bdfc1225fc2a9774b1ebdbe08..5104067fb6b78692d34e446e2ce0e62576877d53 100644 (file)
@@ -42,13 +42,15 @@ Audio_note::Audio_note (Pitch p, Moment m, bool tie_event, Pitch transposing)
 }
 
 void
-Audio_note::tie_to (Audio_note *t)
+Audio_note::tie_to (Audio_note *t, Moment skip)
 {
   tied_ = t;
   Audio_note *first = t;
   while (first->tied_)
     first = first->tied_;
-  first->length_mom_ += length_mom_;
+  // Add the skip to the tied note and the length of the appended note
+  // to the full duration of the tie...
+  first->length_mom_ += skip + length_mom_;
   length_mom_ = 0;
 }
 
index 0fc59fd960bb456535010eb55072b84be359753b..3e73609ff065c4c10a13268c014158420641d5c5 100644 (file)
@@ -68,7 +68,8 @@ class Audio_note : public Audio_item
 public:
   Audio_note (Pitch p, Moment m, bool tie_event, Pitch transposition);
 
-  void tie_to (Audio_note *);
+  // with tieWaitForNote, there might be a skip between the tied notes!
+  void tie_to (Audio_note *, Moment skip = 0);
 
   Pitch pitch_;
   Moment length_mom_;