From 0ccac2ce9cf072f0fd3c02794c5f01308ab42af8 Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Thu, 29 Jan 2015 18:02:38 +0100 Subject: [PATCH] Envelope Filter: Response curve --- gui/gui-envelopefilter.xml | 10 +++++----- src/calf/modules_filter.h | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gui/gui-envelopefilter.xml b/gui/gui-envelopefilter.xml index f491624..140ecdc 100644 --- a/gui/gui-envelopefilter.xml +++ b/gui/gui-envelopefilter.xml @@ -43,6 +43,11 @@ + + - - diff --git a/src/calf/modules_filter.h b/src/calf/modules_filter.h index 3389424..0458b09 100644 --- a/src/calf/modules_filter.h +++ b/src/calf/modules_filter.h @@ -575,7 +575,8 @@ public: float get_freq(float envelope) const { float diff = upper - lower; - float freq = pow(10, coefa * envelope + coefb); + float env = pow(envelope, pow(2, *params[param_response] * -2)); + float freq = pow(10, coefa * env + coefb); if (diff < 0) return std::max(upper, std::min(lower, freq)); return std::min(upper, std::max(lower, freq)); -- 2.11.4.GIT