use super::Instrument;
use crate::synthesis::effects::{Delay, Reverb};
use crate::synthesis::envelope::Envelope;
use crate::synthesis::filter::Filter;
use crate::synthesis::lfo::{LFO, ModRoute, ModTarget};
use crate::synthesis::waveform::Waveform;
impl Instrument {
pub fn choir_aahs() -> Self {
let vibrato = LFO::new(Waveform::Sine, 4.8, 0.25); Self {
name: "Choir Aahs".to_string(),
waveform: Waveform::Sawtooth,
envelope: Envelope::new(0.4, 0.3, 0.9, 0.8), filter: Filter::low_pass(2500.0, 0.3), modulation: vec![ModRoute::new(vibrato, ModTarget::FilterCutoff, 0.12)],
delay: None,
reverb: Some(Reverb::new(0.75, 0.7, 0.6)), distortion: None,
volume: 1.0,
pan: 0.0,
}
}
pub fn choir_oohs() -> Self {
let vibrato = LFO::new(Waveform::Sine, 4.5, 0.22);
Self {
name: "Choir Oohs".to_string(),
waveform: Waveform::Triangle,
envelope: Envelope::new(0.45, 0.35, 0.92, 0.85), filter: Filter::low_pass(1800.0, 0.25), modulation: vec![ModRoute::new(vibrato, ModTarget::FilterCutoff, 0.1)],
delay: None,
reverb: Some(Reverb::new(0.78, 0.72, 0.62)), distortion: None,
volume: 1.0,
pan: 0.0,
}
}
pub fn synth_voice() -> Self {
let formant = LFO::new(Waveform::Sine, 0.3, 0.4); Self {
name: "Synth Voice".to_string(),
waveform: Waveform::Sawtooth,
envelope: Envelope::new(0.2, 0.25, 0.85, 0.5), filter: Filter::low_pass(2200.0, 0.45), modulation: vec![ModRoute::new(formant, ModTarget::FilterCutoff, 0.25)],
delay: Some(Delay::new(0.3, 0.3, 0.25)),
reverb: Some(Reverb::new(0.5, 0.55, 0.4)),
distortion: None,
volume: 1.0,
pan: 0.0,
}
}
}