commit 5fd7115af03f69997d4f51ebc51df5b2363e3d4b
parent f1f14122d5cb0e587095db49fa94613d837bb6f0
Author: Matt Demanett <matt@demanett.net>
Date: Fri, 28 Feb 2020 14:52:40 -0500
MM filter: increase min cutoff to 10hz; fix BP/BR band frequencies to respect the minimum.
Diffstat:
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/dsp/filter.cpp b/src/dsp/filter.cpp
@@ -335,14 +335,14 @@ void MultimodeFilter::setParams(
switch (_bandwidthMode) {
case LINEAR_BANDWIDTH_MODE: {
float bandwidth = std::max(minBWLinear, maxBWLinear * _qbw);
- wdl = std::max(1.0f, _frequency - 0.5f * bandwidth);
- wdh = std::min(maxFrequency, _frequency + 0.5f * bandwidth);
+ wdl = std::max(minFrequency, _frequency - 0.5f * bandwidth);
+ wdh = std::min(maxFrequency, std::max((float)wdl + 10.0f, _frequency + 0.5f * bandwidth));
break;
}
case PITCH_BANDWIDTH_MODE: {
float bandwidth = std::max(minBWPitch, maxBWPitch * _qbw);
- wdl = std::max(1.0f, powf(2.0f, -bandwidth) * _frequency);
- wdh = std::min(maxFrequency, powf(2.0f, bandwidth) * _frequency);
+ wdl = std::max(minFrequency, powf(2.0f, -bandwidth) * _frequency);
+ wdh = std::min(maxFrequency, std::max((float)wdl + 10.0f, powf(2.0f, bandwidth) * _frequency));
break;
}
default: {
diff --git a/src/dsp/filter.hpp b/src/dsp/filter.hpp
@@ -179,7 +179,7 @@ struct MultimodeFilter : Filter {
static constexpr int minPoles = 1;
static constexpr int maxPoles = 16;
static constexpr int modPoles = 1;
- static constexpr float minFrequency = 2.0f;
+ static constexpr float minFrequency = 10.0f;
static constexpr float maxFrequency = 21000.0f;
static constexpr float minQbw = 0.0f;
static constexpr float maxQbw = 1.0f;