Move the main threshold up in the list
This commit is contained in:
parent
455ab0364a
commit
8ca66cf9bb
|
@ -77,6 +77,11 @@ pub struct CompressorBank {
|
||||||
#[derive(Params)]
|
#[derive(Params)]
|
||||||
pub struct ThresholdParams {
|
pub struct ThresholdParams {
|
||||||
// TODO: Sidechaining
|
// 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
|
/// 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
|
/// 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
|
/// 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.
|
/// frequency. See the polynomial above.
|
||||||
#[id = "thresh_curve_curve"]
|
#[id = "thresh_curve_curve"]
|
||||||
curve_curve: FloatParam,
|
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.
|
/// Contains the compressor parameters for both the upwards and downwards compressor banks.
|
||||||
|
@ -169,6 +169,17 @@ impl ThresholdParams {
|
||||||
});
|
});
|
||||||
|
|
||||||
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(
|
center_frequency: FloatParam::new(
|
||||||
"Threshold Center",
|
"Threshold Center",
|
||||||
500.0,
|
500.0,
|
||||||
|
@ -205,19 +216,8 @@ impl ThresholdParams {
|
||||||
center: 0.0,
|
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_callback(set_update_both_thresholds)
|
||||||
.with_unit(" dB")
|
.with_unit(" dB/oct²")
|
||||||
.with_step_size(0.1),
|
.with_step_size(0.1),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue