pub struct SynthPatch {Show 26 fields
pub name: String,
pub osc_waveform: OscWaveform,
pub osc_coarse: f32,
pub osc_fine: f32,
pub osc_unison: usize,
pub osc_detune: f32,
pub filter_mode: FilterMode,
pub filter_cutoff: f32,
pub filter_resonance: f32,
pub filter_env_amount: f32,
pub amp_attack_ms: f32,
pub amp_hold_ms: f32,
pub amp_decay_ms: f32,
pub amp_sustain: f32,
pub amp_release_ms: f32,
pub filter_attack_ms: f32,
pub filter_decay_ms: f32,
pub filter_sustain: f32,
pub filter_release_ms: f32,
pub lfo1_rate: f32,
pub lfo1_waveform: LfoWaveform,
pub lfo1_amount: f32,
pub lfo1_dest: ModDestination,
pub reverb_mix: f32,
pub delay_mix: f32,
pub volume: f32,
}Expand description
Serializable synth parameter snapshot.
Fields§
§name: String§osc_waveform: OscWaveform§osc_coarse: f32§osc_fine: f32§osc_unison: usize§osc_detune: f32§filter_mode: FilterMode§filter_cutoff: f32§filter_resonance: f32§filter_env_amount: f32§amp_attack_ms: f32§amp_hold_ms: f32§amp_decay_ms: f32§amp_sustain: f32§amp_release_ms: f32§filter_attack_ms: f32§filter_decay_ms: f32§filter_sustain: f32§filter_release_ms: f32§lfo1_rate: f32§lfo1_waveform: LfoWaveform§lfo1_amount: f32§lfo1_dest: ModDestination§reverb_mix: f32§delay_mix: f32§volume: f32Implementations§
Source§impl SynthPatch
impl SynthPatch
pub fn load(&self, poly: &mut Polyphony)
pub fn save(poly: &Polyphony) -> Self
Sourcepub fn factory_presets() -> Vec<SynthPatch>
pub fn factory_presets() -> Vec<SynthPatch>
8 factory presets.
Trait Implementations§
Source§impl Clone for SynthPatch
impl Clone for SynthPatch
Source§fn clone(&self) -> SynthPatch
fn clone(&self) -> SynthPatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SynthPatch
impl RefUnwindSafe for SynthPatch
impl Send for SynthPatch
impl Sync for SynthPatch
impl Unpin for SynthPatch
impl UnsafeUnpin for SynthPatch
impl UnwindSafe for SynthPatch
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.