Struct envelope_detector::EnvelopeDetector
[−]
[src]
pub struct EnvelopeDetector<F, M> where
F: Frame,
M: Mode<F>, { /* fields omitted */ }
Iteratively extracts the amplitude envelope from an audio signal based on three parameters:
- Attack time.
- Release time.
- Detection mode (Either Peak or RMS).
Supports processing any sample::Frame
Methods
impl<F> EnvelopeDetector<F, Rms<F>> where
F: Frame,
[src]
F: Frame,
fn rms(
rms_window_frames: usize,
attack_frames: f32,
release_frames: f32
) -> Self
rms_window_frames: usize,
attack_frames: f32,
release_frames: f32
) -> Self
Construct a new Rms EnvelopeDetector.
fn set_window_frames(&mut self, n_window_frames: usize)
Set the duration of the Rms window in frames.
impl<F> EnvelopeDetector<F, Peak<FullWave>> where
F: Frame,
[src]
F: Frame,
fn peak(attack_frames: f32, release_frames: f32) -> Self
Construct a new Mono Peak EnvelopeDetector.
impl<F, M> EnvelopeDetector<F, M> where
F: Frame,
M: Mode<F>,
[src]
F: Frame,
M: Mode<F>,
fn set_attack_frames(&mut self, frames: f32)
Set the EnvelopeDetector's attack time as a number of frames.
fn set_release_frames(&mut self, frames: f32)
Set the EnvelopeDetector's release time as a number of frames.
fn next(&mut self, frame: F) -> F
Given the next input signal frame, detect and return the next envelope frame.
fn next_avg(&mut self, frame: F) -> <F::Sample as Sample>::Float
Given the next input signal frame, detect and return the next envelope average across each channel for the frame.
The returned value will take the form of the signal's equivalent floating point sample format.
Trait Implementations
impl<F: Copy, M: Copy> Copy for EnvelopeDetector<F, M> where
F: Frame,
M: Mode<F>,
[src]
F: Frame,
M: Mode<F>,
impl<F: Clone, M: Clone> Clone for EnvelopeDetector<F, M> where
F: Frame,
M: Mode<F>,
[src]
F: Frame,
M: Mode<F>,
fn clone(&self) -> EnvelopeDetector<F, M>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<F: Debug, M: Debug> Debug for EnvelopeDetector<F, M> where
F: Frame,
M: Mode<F>,
[src]
F: Frame,
M: Mode<F>,