Rename the modes in Crisp to be more fitting
This commit is contained in:
parent
d35276437d
commit
f1f2a8a06e
|
@ -106,13 +106,12 @@ struct CrispParams {
|
||||||
#[derive(Enum, Debug, PartialEq)]
|
#[derive(Enum, Debug, PartialEq)]
|
||||||
enum Mode {
|
enum Mode {
|
||||||
/// RM the entire waveform.
|
/// RM the entire waveform.
|
||||||
Crispy,
|
Soggy,
|
||||||
/// RM only the positive part of the waveform.
|
/// RM only the positive part of the waveform.
|
||||||
#[name = "Even Crispier"]
|
Crispy,
|
||||||
EvenCrispier,
|
|
||||||
/// RM only the negative part of the waveform.
|
/// RM only the negative part of the waveform.
|
||||||
#[name = "Even Crispier (alt)"]
|
#[name = "Crispy (alt)"]
|
||||||
EvenCrispierNegated,
|
CrispyNegated,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Controls how to handle stereo input.
|
/// Controls how to handle stereo input.
|
||||||
|
@ -153,7 +152,7 @@ impl Default for CrispParams {
|
||||||
.with_value_to_string(formatters::f32_percentage(0))
|
.with_value_to_string(formatters::f32_percentage(0))
|
||||||
.with_string_to_value(formatters::from_f32_percentage()),
|
.with_string_to_value(formatters::from_f32_percentage()),
|
||||||
|
|
||||||
mode: EnumParam::new("Mode", Mode::EvenCrispier),
|
mode: EnumParam::new("Mode", Mode::Crispy),
|
||||||
stereo_mode: EnumParam::new("Stereo Mode", StereoMode::Stereo),
|
stereo_mode: EnumParam::new("Stereo Mode", StereoMode::Stereo),
|
||||||
|
|
||||||
rm_input_lpf_freq: FloatParam::new(
|
rm_input_lpf_freq: FloatParam::new(
|
||||||
|
@ -429,9 +428,9 @@ impl Crisp {
|
||||||
|
|
||||||
// TODO: Avoid branching in the main loop, this just makes it a bit easier to prototype
|
// TODO: Avoid branching in the main loop, this just makes it a bit easier to prototype
|
||||||
match self.params.mode.value() {
|
match self.params.mode.value() {
|
||||||
Mode::Crispy => sample * noise,
|
Mode::Soggy => sample * noise,
|
||||||
Mode::EvenCrispier => sample.max(0.0) * noise,
|
Mode::Crispy => sample.max(0.0) * noise,
|
||||||
Mode::EvenCrispierNegated => sample.max(0.0) * noise,
|
Mode::CrispyNegated => sample.max(0.0) * noise,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue