pub struct CorruptionAudioProcessor {
pub corruption_level: f32,
pub tier: CorruptionTier,
pub pitch_wobble: PitchWobble,
pub rhythm_drift: RhythmDrift,
pub filter_mod: FilterModulationEffect,
pub granular: GranularArtifacts,
}Expand description
Master corruption audio processor — owns all degradation effects.
Fields§
§corruption_level: f32§tier: CorruptionTier§pitch_wobble: PitchWobble§rhythm_drift: RhythmDrift§filter_mod: FilterModulationEffect§granular: GranularArtifactsImplementations§
Source§impl CorruptionAudioProcessor
impl CorruptionAudioProcessor
pub fn new() -> Self
Sourcepub fn process_corruption(&mut self, corruption: u32)
pub fn process_corruption(&mut self, corruption: u32)
Update all degradation parameters from a corruption value (0-500+).
Sourcepub fn apply(&mut self, sample: f32) -> f32
pub fn apply(&mut self, sample: f32) -> f32
Apply all active corruption effects to a single audio sample.
Sourcepub fn beat_offset(&mut self, beat_index: u32) -> f32
pub fn beat_offset(&mut self, beat_index: u32) -> f32
Return a beat offset to apply to the next note (rhythm drift).
Trait Implementations§
Source§impl Clone for CorruptionAudioProcessor
impl Clone for CorruptionAudioProcessor
Source§fn clone(&self) -> CorruptionAudioProcessor
fn clone(&self) -> CorruptionAudioProcessor
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 moreSource§impl Debug for CorruptionAudioProcessor
impl Debug for CorruptionAudioProcessor
Auto Trait Implementations§
impl Freeze for CorruptionAudioProcessor
impl RefUnwindSafe for CorruptionAudioProcessor
impl Send for CorruptionAudioProcessor
impl Sync for CorruptionAudioProcessor
impl Unpin for CorruptionAudioProcessor
impl UnsafeUnpin for CorruptionAudioProcessor
impl UnwindSafe for CorruptionAudioProcessor
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.