Browse Source

Make VCF more accurate and stable by using a linear interpolation of the previous and current input values in `LadderFilter::process()`. Thanks Andy Simpler!

tags/v2.0.1
Andrew Belt 3 years ago
parent
commit
3bb3d4ef1d
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/VCF.cpp

+ 2
- 1
src/VCF.cpp View File

@@ -37,7 +37,8 @@ struct LadderFilter {

void process(T input, T dt) {
dsp::stepRK4(T(0), dt, state, 4, [&](T t, const T x[], T dxdt[]) {
T inputc = clip(input - resonance * x[3]);
T inputt = crossfade(this->input, input, t / dt);
T inputc = clip(inputt - resonance * x[3]);
T yc0 = clip(x[0]);
T yc1 = clip(x[1]);
T yc2 = clip(x[2]);


Loading…
Cancel
Save