Move the frequency center parameter down
Somehow this is always where I'm looking for it.
This commit is contained in:
parent
7db5da7930
commit
06694683d3
|
@ -70,17 +70,17 @@ 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 above, this is the intercept.
|
||||||
|
#[id = "input_db"]
|
||||||
|
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
|
||||||
/// evaluated in the log/log domain for decibels and octaves.
|
/// evaluated in the log/log domain for decibels and octaves.
|
||||||
#[id = "thresh_center_freq"]
|
#[id = "thresh_center_freq"]
|
||||||
center_frequency: FloatParam,
|
center_frequency: 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,
|
|
||||||
/// The slope for the curve, in the log/log domain. See the polynomial above.
|
/// The slope for the curve, in the log/log domain. See the polynomial above.
|
||||||
#[id = "thresh_curve_slope"]
|
#[id = "thresh_curve_slope"]
|
||||||
curve_slope: FloatParam,
|
curve_slope: FloatParam,
|
||||||
|
@ -149,19 +149,6 @@ impl ThresholdParams {
|
||||||
});
|
});
|
||||||
|
|
||||||
ThresholdParams {
|
ThresholdParams {
|
||||||
center_frequency: FloatParam::new(
|
|
||||||
"Threshold Center",
|
|
||||||
500.0,
|
|
||||||
FloatRange::Skewed {
|
|
||||||
min: 20.0,
|
|
||||||
max: 20_000.0,
|
|
||||||
factor: FloatRange::skew_factor(-2.0),
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.with_callback(set_update_both_thresholds.clone())
|
|
||||||
// This includes the unit
|
|
||||||
.with_value_to_string(formatters::v2s_f32_hz_then_khz(0))
|
|
||||||
.with_string_to_value(formatters::s2v_f32_hz_then_khz()),
|
|
||||||
// These are polynomial coefficients that are evaluated in the log/log domain
|
// These are polynomial coefficients that are evaluated in the log/log domain
|
||||||
// (octaves/decibels). The threshold is the intercept.
|
// (octaves/decibels). The threshold is the intercept.
|
||||||
threshold_db: FloatParam::new(
|
threshold_db: FloatParam::new(
|
||||||
|
@ -175,6 +162,19 @@ impl ThresholdParams {
|
||||||
.with_callback(set_update_both_thresholds.clone())
|
.with_callback(set_update_both_thresholds.clone())
|
||||||
.with_unit(" dB")
|
.with_unit(" dB")
|
||||||
.with_step_size(0.1),
|
.with_step_size(0.1),
|
||||||
|
center_frequency: FloatParam::new(
|
||||||
|
"Threshold Center",
|
||||||
|
500.0,
|
||||||
|
FloatRange::Skewed {
|
||||||
|
min: 20.0,
|
||||||
|
max: 20_000.0,
|
||||||
|
factor: FloatRange::skew_factor(-2.0),
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.with_callback(set_update_both_thresholds.clone())
|
||||||
|
// This includes the unit
|
||||||
|
.with_value_to_string(formatters::v2s_f32_hz_then_khz(0))
|
||||||
|
.with_string_to_value(formatters::s2v_f32_hz_then_khz()),
|
||||||
curve_slope: FloatParam::new(
|
curve_slope: FloatParam::new(
|
||||||
"Threshold Slope",
|
"Threshold Slope",
|
||||||
0.0,
|
0.0,
|
||||||
|
|
Loading…
Reference in a new issue