Filter cutoff: range 50-20000 Hz, 0.1 step for smooth knob, default 8000 Hz

This commit is contained in:
Armin 2026-07-13 22:21:28 +02:00
commit 1a7ef69d34
3 changed files with 4 additions and 4 deletions

View file

@ -21,7 +21,7 @@ public:
}
void setCoefficients(float cutoff, float res, FilterType type) {
cutoff = std::clamp(cutoff, 20.0f, static_cast<float>(sampleRate * 0.49));
cutoff = std::clamp(cutoff, 50.0f, static_cast<float>(sampleRate * 0.49));
resonance = std::clamp(res, 0.0f, 1.0f);
filterType = type;