pub struct Effect {Show 19 fields
pub waveform: Waveform,
pub frequency: f64,
pub slide: f64,
pub slide_change: f64,
pub vibrato_depth: f64,
pub vibrato_speed: f64,
pub attack: f64,
pub sustain: f64,
pub punch: f64,
pub decay: f64,
pub duty_sweep: f64,
pub low_pass: f64,
pub low_pass_sweep: f64,
pub high_pass: f64,
pub high_pass_sweep: f64,
pub arpeggio: f64,
pub arpeggio_time: f64,
pub repeat: f64,
pub volume: f64,
}Expand description
The parameters of a sound effect. See the module documentation for their units, ranges and meaning.
Fields§
§waveform: Waveform§frequency: f64§slide: f64§slide_change: f64§vibrato_depth: f64§vibrato_speed: f64§attack: f64§sustain: f64§punch: f64§decay: f64§duty_sweep: f64§low_pass: f64§low_pass_sweep: f64§high_pass: f64§high_pass_sweep: f64§arpeggio: f64§arpeggio_time: f64§repeat: f64§volume: f64Implementations§
Source§impl Effect
impl Effect
Sourcepub fn preset(kind: Preset, seed: u64) -> Self
pub fn preset(kind: Preset, seed: u64) -> Self
Draws an effect of the given kind from a seed. The same kind and seed always give the same parameters, rounded to three decimals so the text stays short.
Sourcepub fn parse(text: &str) -> Result<Self, ParseError>
pub fn parse(text: &str) -> Result<Self, ParseError>
Parses the text form described in the module documentation.
Trait Implementations§
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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