From: Reinhold Kainhofer Date: Tue, 17 Nov 2009 16:35:27 +0000 (+0100) Subject: extend Audio_note::tie_to to contain an optional skip before the tied note X-Git-Tag: release/2.13.8-1~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8921ed9dc21e3d1cb6540f2978e583562268b43e;p=lilypond.git extend Audio_note::tie_to to contain an optional skip before the tied note --- diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 33e54d713a..5104067fb6 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -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; } diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index 0fc59fd960..3e73609ff0 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -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_;