From 0f344b0fc122cc5e0f78da74c9536ebb378c48d5 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Sun, 8 Aug 2021 14:56:54 +0200 Subject: [PATCH] removed DC offset stuff from BOsc and the all pass has a more standard implementation again now. --- src/dsp/dattorro.rs | 8 -------- src/dsp/helpers.rs | 4 ++-- src/dsp/node_bosc.rs | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/dsp/dattorro.rs b/src/dsp/dattorro.rs index d1ed52a..5a2108d 100644 --- a/src/dsp/dattorro.rs +++ b/src/dsp/dattorro.rs @@ -50,13 +50,6 @@ const DAT_LEFT_TAPS_TIME_MS : [f64; 7] = [ ]; const DAT_RIGHT_TAPS_TIME_MS : [f64; 7] = [ -// 266.0 / DAT_SAMPLES_PER_MS, -// 2974.0 / DAT_SAMPLES_PER_MS, -// 1913.0 / DAT_SAMPLES_PER_MS, -// 1996.0 / DAT_SAMPLES_PER_MS, -// 1990.0 / DAT_SAMPLES_PER_MS, -// 187.0 / DAT_SAMPLES_PER_MS, -// 1066.0 / DAT_SAMPLES_PER_MS, 353.0 / DAT_SAMPLES_PER_MS, 3627.0 / DAT_SAMPLES_PER_MS, 1228.0 / DAT_SAMPLES_PER_MS, @@ -380,7 +373,6 @@ impl DattorroReverb { let out_hpf = self.input_hpf.process(out_lpf); // HPF => Pre-Delay -// let out_pre_delay = out_hpf; let out_pre_delay = self.pre_delay.next_cubic(params.pre_delay_time_ms(), out_hpf); diff --git a/src/dsp/helpers.rs b/src/dsp/helpers.rs index b952237..c66236d 100644 --- a/src/dsp/helpers.rs +++ b/src/dsp/helpers.rs @@ -898,9 +898,9 @@ impl AllPass { #[inline] pub fn next(&mut self, time_ms: F, g: F, v: F) -> F { let s = self.delay.linear_interpolate_at(time_ms); - let input = v + g * s; + let input = v + -g * s; self.delay.feed(input); - input * -g + s + input * g + s } } diff --git a/src/dsp/node_bosc.rs b/src/dsp/node_bosc.rs index e34a7e9..c77ca86 100644 --- a/src/dsp/node_bosc.rs +++ b/src/dsp/node_bosc.rs @@ -140,7 +140,7 @@ impl DspNode for BOsc { let pw = denorm::BOsc::pw(pw, frame); out.write( frame, - self.osc.next_pulse(freq, israte, pw)); + self.osc.next_pulse_no_dc(freq, israte, pw)); } } }