From 1fbcd583a400d20f195df60fe6e1774ef84f3b77 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Mon, 25 Jul 2022 14:24:00 +0200 Subject: [PATCH] Don't apply pink noise curve in sidechain mode --- plugins/spectral_compressor/src/compressor_bank.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/spectral_compressor/src/compressor_bank.rs b/plugins/spectral_compressor/src/compressor_bank.rs index 403b6e39..461685ea 100644 --- a/plugins/spectral_compressor/src/compressor_bank.rs +++ b/plugins/spectral_compressor/src/compressor_bank.rs @@ -675,8 +675,12 @@ impl CompressorBank { // evaluating this needs to be converted to linear gain for the compressors. let intercept = params.threshold.threshold_db.value; // The cheeky 3 additional dB/octave attenuation is to match pink noise with the default - // settings - let slope = params.threshold.curve_slope.value - 3.0; + // settings. When using sidechaining we explicitly don't want this because the curve should + // be a flat offset to the sidechain input at the default settings. + let slope = match params.threshold.mode.value() { + ThresholdMode::Internal => params.threshold.curve_slope.value - 3.0, + ThresholdMode::Sidechain => params.threshold.curve_slope.value, + }; let curve = params.threshold.curve_curve.value; let log2_center_freq = params.threshold.center_frequency.value.log2();