From 50ac2cb2b6ecec2cf6804ad496d2a90060d46fca Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 20 Aug 2022 19:54:15 +0200 Subject: [PATCH] Lower the init value even further --- plugins/spectral_compressor/src/compressor_bank.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/spectral_compressor/src/compressor_bank.rs b/plugins/spectral_compressor/src/compressor_bank.rs index 876460a3..e1733a81 100644 --- a/plugins/spectral_compressor/src/compressor_bank.rs +++ b/plugins/spectral_compressor/src/compressor_bank.rs @@ -25,10 +25,10 @@ use crate::SpectralCompressorParams; const DOWNWARDS_NAME_PREFIX: &str = "downwards_"; const UPWARDS_NAME_PREFIX: &str = "upwards_"; -/// The envelopes are initialized to the RMS value of a -12 dB sine wave to make sure extreme upwards +/// The envelopes are initialized to the RMS value of a -24 dB sine wave to make sure extreme upwards /// compression doesn't cause pops when switching between window sizes and when deactivating and /// reactivating the plugin. -const ENVELOPE_INIT_VALUE: f32 = std::f32::consts::FRAC_1_SQRT_2 / 4.0; +const ENVELOPE_INIT_VALUE: f32 = std::f32::consts::FRAC_1_SQRT_2 / 8.0; /// A bank of compressors so each FFT bin can be compressed individually. The vectors in this struct /// will have a capacity of `MAX_WINDOW_SIZE / 2 + 1` and a size that matches the current complex