diff --git a/plugins/spectral_compressor/CHANGELOG.md b/plugins/spectral_compressor/CHANGELOG.md index dd9e49f0..84c8cf3f 100644 --- a/plugins/spectral_compressor/CHANGELOG.md +++ b/plugins/spectral_compressor/CHANGELOG.md @@ -14,6 +14,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). tradeoff between faster timings and more spectral precision. Existing instances are not affected. +### Fixed + +- The sidechain matching mode now caps the relative thresholds to behave more + consistently with quiet inputs. + ## [0.4.2] - 2023-03-22 ### Changed diff --git a/plugins/spectral_compressor/src/compressor_bank.rs b/plugins/spectral_compressor/src/compressor_bank.rs index 574c421b..d23219a1 100644 --- a/plugins/spectral_compressor/src/compressor_bank.rs +++ b/plugins/spectral_compressor/src/compressor_bank.rs @@ -988,7 +988,8 @@ impl CompressorBank { // Notice how the threshold and knee values are scaled here let downwards_threshold_db = - unsafe { self.downwards_thresholds_db.get_unchecked(bin_idx) + sidechain_scale_db }; + unsafe { self.downwards_thresholds_db.get_unchecked(bin_idx) + sidechain_scale_db } + .max(util::MINUS_INFINITY_DB); let downwards_ratio = unsafe { self.downwards_ratios.get_unchecked(bin_idx) }; let downwards_knee_parabola_scale = unsafe { self.downwards_knee_parabola_scale.get_unchecked(bin_idx) }; @@ -1006,7 +1007,8 @@ impl CompressorBank { ); let upwards_threshold_db = - unsafe { self.upwards_thresholds_db.get_unchecked(bin_idx) + sidechain_scale_db }; + unsafe { self.upwards_thresholds_db.get_unchecked(bin_idx) + sidechain_scale_db } + .max(util::MINUS_INFINITY_DB); let upwards_ratio = unsafe { self.upwards_ratios.get_unchecked(bin_idx) }; let upwards_knee_parabola_scale = unsafe { self.upwards_knee_parabola_scale.get_unchecked(bin_idx) };