From fb82750bfb1af6757234162fef7cb63320b2fd6c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 31 Dec 2021 12:53:25 -0700 Subject: [PATCH] triggerbox: fix retrigger of MIDItrigger to start at next repeat of clip --- libs/ardour/triggerbox.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index a025d2777d..037f6408f5 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -1793,7 +1793,11 @@ MIDITrigger::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sam * effect. Time to get played again. */ - DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 was stopping, now waiting to retrigger, loop cnt %2 fc %3\n", index(), _loop_cnt, _follow_count)); + DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 was stopping, now waiting to retrigger, loop cnt %2 fc %3 , reset TS to %4 + %5\n", index(), _loop_cnt, _follow_count, transition_beats, data_length)); + /* we will "restart" at the beginning of the + next iteration of the trigger. + */ + transition_beats = transition_beats + data_length; _state = WaitingToStart; retrigger (); PropertyChanged (ARDOUR::Properties::running);