From c6c53a41e57a495e126bb3de999f5ec006c6e121 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Thu, 25 Feb 2021 02:06:56 +0100 Subject: [PATCH] Adjust disto DC cutoff to account for oversampling --- src/sfizz/effects/dsp/disto_stage.dsp | 2 +- src/sfizz/effects/gen/disto_stage.hxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sfizz/effects/dsp/disto_stage.dsp b/src/sfizz/effects/dsp/disto_stage.dsp index f2494745..ec4a8383 100644 --- a/src/sfizz/effects/dsp/disto_stage.dsp +++ b/src/sfizz/effects/dsp/disto_stage.dsp @@ -1,6 +1,6 @@ import("stdfaust.lib"); -disto_stage(depth, x) = shs*hh(x)+(1.0-shs)*lh(x) : fi.dcblockerat(5.0) with { +disto_stage(depth, x) = shs*hh(x)+(1.0-shs)*lh(x) : fi.dcblockerat(40.0) with { // sigmoid parameters a = depth*0.2+2.0; b = 2.0; diff --git a/src/sfizz/effects/gen/disto_stage.hxx b/src/sfizz/effects/gen/disto_stage.hxx index 1c16e2fb..ee112e87 100644 --- a/src/sfizz/effects/gen/disto_stage.hxx +++ b/src/sfizz/effects/gen/disto_stage.hxx @@ -134,7 +134,7 @@ class faustDisto { //[Begin:instanceConstants] fSampleRate = sample_rate; fConst0 = float(fSampleRate); - fConst1 = (15.707963f / fConst0); + fConst1 = (125.663704f / fConst0); fConst2 = (1.0f / (fConst1 + 1.0f)); fConst3 = (1.0f - fConst1); fConst4 = std::exp((0.0f - (100.0f / fConst0)));