1.1.0 - TOML

This commit is contained in:
2025-06-23 23:54:23 -06:00
parent 8d86d1cbfb
commit 944a33eb95
10 changed files with 550 additions and 1720 deletions

View File

@ -87,12 +87,12 @@ impl TrackState {
let cutoff = effect_config
.params
.get("cutoff")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(1000.0) as f32;
let resonance = effect_config
.params
.get("resonance")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(1.0) as f32;
Box::new(LowPassFilter::new(cutoff, resonance))
}
@ -100,12 +100,12 @@ impl TrackState {
let cutoff = effect_config
.params
.get("cutoff")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(1000.0) as f32;
let resonance = effect_config
.params
.get("resonance")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(1.0) as f32;
Box::new(HighPassFilter::new(cutoff, resonance))
}
@ -113,17 +113,17 @@ impl TrackState {
let time = effect_config
.params
.get("time")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.3) as f32;
let feedback = effect_config
.params
.get("feedback")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.3) as f32;
let mix = effect_config
.params
.get("mix")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.3) as f32;
Box::new(Delay::new(time, feedback, mix))
}
@ -131,17 +131,17 @@ impl TrackState {
let room_size = effect_config
.params
.get("room_size")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
let damping = effect_config
.params
.get("damping")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
let mix = effect_config
.params
.get("mix")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.3) as f32;
Box::new(Reverb::new(room_size, damping, mix))
}
@ -149,12 +149,12 @@ impl TrackState {
let drive = effect_config
.params
.get("drive")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(2.0) as f32;
let tone = effect_config
.params
.get("tone")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
Box::new(Distortion::new(drive, tone))
}
@ -162,22 +162,22 @@ impl TrackState {
let rate = effect_config
.params
.get("rate")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(1.0) as f32;
let depth = effect_config
.params
.get("depth")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
let mix = effect_config
.params
.get("mix")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.3) as f32;
let layers = effect_config
.params
.get("layers")
.and_then(|v| v.as_u64())
.and_then(|v| v.as_integer())
.unwrap_or(3) as usize;
Box::new(Chorus::new(rate, depth, mix, layers))
}
@ -185,17 +185,17 @@ impl TrackState {
let intensity = effect_config
.params
.get("intensity")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
let frequency = effect_config
.params
.get("frequency")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
let mix = effect_config
.params
.get("mix")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.3) as f32;
Box::new(VinylCrackle::new(intensity, frequency, mix))
}
@ -203,17 +203,17 @@ impl TrackState {
let drive = effect_config
.params
.get("drive")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(2.0) as f32;
let warmth = effect_config
.params
.get("warmth")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.7) as f32;
let mix = effect_config
.params
.get("mix")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
Box::new(TapeSaturation::new(drive, warmth, mix))
}
@ -221,17 +221,17 @@ impl TrackState {
let bit_depth = effect_config
.params
.get("bit_depth")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(8.0) as f32;
let sample_rate_reduction = effect_config
.params
.get("sample_rate_reduction")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(2.0) as f32;
let mix = effect_config
.params
.get("mix")
.and_then(|v| v.as_f64())
.and_then(|v| v.as_float())
.unwrap_or(0.5) as f32;
Box::new(BitCrusher::new(bit_depth, sample_rate_reduction, mix))
}