From 505662414a84f8888bd75d214d481764806a6509 Mon Sep 17 00:00:00 2001 From: Dimas Leenman Date: Wed, 20 Jul 2022 14:06:14 +0200 Subject: [PATCH] sample rate --- src/dsp/node_formant.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dsp/node_formant.rs b/src/dsp/node_formant.rs index dadf4e1..50d5086 100644 --- a/src/dsp/node_formant.rs +++ b/src/dsp/node_formant.rs @@ -105,7 +105,8 @@ impl DspNode for Formant { let wave = carrier * modulator; // increment phase (very imporant) - self.phase += self.inv_sample_rate; + self.phase += base_freq * self.inv_sample_rate; + self.phase = self.phase.fract(); out.write(frame, wave); }