1
0
Fork 0

Cap Spectral Compressor sidechain match thresholds

This commit is contained in:
Robbert van der Helm 2023-03-27 16:46:00 +02:00
parent 9db31b34dc
commit 20d165052a
2 changed files with 9 additions and 2 deletions

View file

@ -14,6 +14,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).
tradeoff between faster timings and more spectral precision. Existing tradeoff between faster timings and more spectral precision. Existing
instances are not affected. 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 ## [0.4.2] - 2023-03-22
### Changed ### Changed

View file

@ -988,7 +988,8 @@ impl CompressorBank {
// Notice how the threshold and knee values are scaled here // Notice how the threshold and knee values are scaled here
let downwards_threshold_db = 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_ratio = unsafe { self.downwards_ratios.get_unchecked(bin_idx) };
let downwards_knee_parabola_scale = let downwards_knee_parabola_scale =
unsafe { self.downwards_knee_parabola_scale.get_unchecked(bin_idx) }; unsafe { self.downwards_knee_parabola_scale.get_unchecked(bin_idx) };
@ -1006,7 +1007,8 @@ impl CompressorBank {
); );
let upwards_threshold_db = 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_ratio = unsafe { self.upwards_ratios.get_unchecked(bin_idx) };
let upwards_knee_parabola_scale = let upwards_knee_parabola_scale =
unsafe { self.upwards_knee_parabola_scale.get_unchecked(bin_idx) }; unsafe { self.upwards_knee_parabola_scale.get_unchecked(bin_idx) };