BogaudioModules

BogaudioModules for VCV Rack
Log | Files | Refs | README | LICENSE

commit 1694e86f0cc564ecdea81ad65ec9c3bffca132fd
parent 4c198d6f5fe958cff759994a11e69d7fb89789a8
Author: Matt Demanett <matt@demanett.net>
Date:   Mon, 27 Apr 2020 19:24:49 -0400

(L)VCF: fix ringing at very low cutoff, again; chaning the filter to float from double recently caused the problem. #115

Diffstat:
MREADME.md | 1+
Msrc/dsp/filters/multimode.cpp | 2+-
Msrc/dsp/filters/multimode.hpp | 2+-
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md @@ -194,6 +194,7 @@ The context menu option "Bandwidth mode" controls how the bandwidth is calculate Note: due to limitations in the filter's implementation, it has a couple workarounds in place to avoid problems: - The cutoff frequency uses a slew limiter (it has limit on how fast it can change), such that it takes approximately 100ms to move the cutoff from fully closed to fully open (or the opposite). - There is a fixed two-pole highpass filter on the filter output, at a cutoff of 80hz. + - While the module's frequency knob goes to zero, the filter's cutoff won't actually go below 3hz. _Polyphony:_ <a href="#polyphony">Polyphonic</a>, with channels defined by the IN input. diff --git a/src/dsp/filters/multimode.cpp b/src/dsp/filters/multimode.cpp @@ -158,7 +158,7 @@ template<int N> void MultimodeDesigner<N>::setParams( assert(N >= minPoles && N <= maxPoles); assert(poles >= minPoles && poles <= N); assert(poles % modPoles == 0); - assert(frequency >= minFrequency && frequency <= maxFrequency); + assert(frequency >= minFrequency - 0.00001f && frequency <= maxFrequency); assert(qbw >= minQbw && qbw <= maxQbw); bool repole = _type != type || _mode != mode || _nPoles != poles || (type == CHEBYSHEV_TYPE && (mode == LOWPASS_MODE || mode == HIGHPASS_MODE) && _qbw != qbw); diff --git a/src/dsp/filters/multimode.hpp b/src/dsp/filters/multimode.hpp @@ -73,7 +73,7 @@ struct MultimodeTypes { static constexpr int minPoles = 1; static constexpr int maxPoles = 16; static constexpr int modPoles = 1; - static constexpr float minFrequency = 1.0f; + static constexpr float minFrequency = 3.0f; // FIXME: this can go down to at least 1.0f if T is double. static constexpr float maxFrequency = 21000.0f; static constexpr float minQbw = 0.0f; static constexpr float maxQbw = 1.0f;