From a068971e25ae747eeac0e8c87a57c7bf0dc99567 Mon Sep 17 00:00:00 2001 From: Matthew Wang Date: Fri, 29 Jan 2021 12:31:54 -0500 Subject: [PATCH] set prep mod time in modify() --- bk_JUCE/bitKlavier/Source/Moddable.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bk_JUCE/bitKlavier/Source/Moddable.h b/bk_JUCE/bitKlavier/Source/Moddable.h index d38de155..759d668a 100644 --- a/bk_JUCE/bitKlavier/Source/Moddable.h +++ b/bk_JUCE/bitKlavier/Source/Moddable.h @@ -104,6 +104,7 @@ class Moddable : public ModdableBase bool modify(Moddable& m, bool reverse) { mod = reverse ? base : m.base; + time = m.time; return modTo(tag{}, m, !reverse); } @@ -113,10 +114,10 @@ class Moddable : public ModdableBase template bool modTo(tag, Moddable& m, bool shouldInc) { + timeElapsed = 0; if (time > 0) { active = true; - timeElapsed = 0; return false; } value = mod; @@ -132,11 +133,11 @@ class Moddable : public ModdableBase if (m.n < m.maxN || m.maxN == 0) m.n++; } + timeElapsed = 0; if (time > 0 && (mod - value) != 0) { calcDV(tag{}); active = true; //active = m.active; - timeElapsed = 0; return false; } value = mod;