1
0
Fork 0

Move the main threshold up in the list

This commit is contained in:
Robbert van der Helm 2022-07-24 16:27:35 +02:00
parent 455ab0364a
commit 8ca66cf9bb

View file

@ -77,6 +77,11 @@ pub struct CompressorBank {
#[derive(Params)]
pub struct ThresholdParams {
// TODO: Sidechaining
/// The compressor threshold at the center frequency. When sidechaining is enabled, the input
/// signal is gained by the inverse of this value. This replaces the input gain in the original
/// Spectral Compressor. In the polynomial below, this is the intercept.
#[id = "tresh_global"]
threshold_db: FloatParam,
/// The center frqeuency for the target curve when sidechaining is not enabled. The curve is a
/// polynomial `threshold_db + curve_slope*x + curve_curve*(x^2)` that evaluates to a decibel
/// value, where `x = log2(center_frequency) - log2(bin_frequency)`. In other words, this is
@ -92,11 +97,6 @@ pub struct ThresholdParams {
/// frequency. See the polynomial above.
#[id = "thresh_curve_curve"]
curve_curve: FloatParam,
/// The compressor threshold at the center frequency. When sidechaining is enabled, the input
/// signal is gained by the inverse of this value. This replaces the input gain in the original
/// Spectral Compressor. In the polynomial above, this is the intercept.
#[id = "input_db"]
threshold_db: FloatParam,
}
/// Contains the compressor parameters for both the upwards and downwards compressor banks.
@ -169,6 +169,17 @@ impl ThresholdParams {
});
ThresholdParams {
threshold_db: FloatParam::new(
"Global Threshold",
0.0,
FloatRange::Linear {
min: -50.0,
max: 50.0,
},
)
.with_callback(set_update_both_thresholds.clone())
.with_unit(" dB")
.with_step_size(0.1),
center_frequency: FloatParam::new(
"Threshold Center",
500.0,
@ -205,19 +216,8 @@ impl ThresholdParams {
center: 0.0,
},
)
.with_callback(set_update_both_thresholds.clone())
.with_unit(" dB/oct²")
.with_step_size(0.1),
threshold_db: FloatParam::new(
"Global Threshold",
0.0,
FloatRange::Linear {
min: -50.0,
max: 50.0,
},
)
.with_callback(set_update_both_thresholds)
.with_unit(" dB")
.with_unit(" dB/oct²")
.with_step_size(0.1),
}
}