From 8921ed9dc21e3d1cb6540f2978e583562268b43e Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Tue, 17 Nov 2009 17:35:27 +0100 Subject: [PATCH] extend Audio_note::tie_to to contain an optional skip before the tied note --- lily/audio-item.cc | 6 ++++-- lily/include/audio-item.hh | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) 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_; -- 2.39.5