From 5743c10631fc6569b1eb0960ff24ee5ad2917531 Mon Sep 17 00:00:00 2001 From: Paul Fd Date: Sun, 19 Dec 2021 22:33:57 +0100 Subject: [PATCH] Retrigger a note only if the cc value changed This won't remove the need for polyphony opcodes when using high-res CC, but at least it should help with automation lanes. Note: this is not what Sforzando does. --- src/sfizz/Layer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sfizz/Layer.cpp b/src/sfizz/Layer.cpp index 5d5f03b0..f59976be 100644 --- a/src/sfizz/Layer.cpp +++ b/src/sfizz/Layer.cpp @@ -179,7 +179,8 @@ bool Layer::registerCC(int ccNumber, float ccValue, float randValue) noexcept sequenceSwitched_ = ((sequenceCounter_++ % region.sequenceLength) == region.sequencePosition - 1); - if (isSwitchedOn()) + + if (isSwitchedOn() && (ccValue != midiState_.getCCValue(ccNumber))) return true; }