Struct sample::envelope::detect::Detector
[−]
[src]
pub struct Detector<F, D> where
F: Frame,
D: Detect<F>, { /* fields omitted */ }
A type that can be used to detect the envelope of a signal.
Methods
impl<F, S> Detector<F, Rms<F, S>> where
F: Frame,
S: Slice<Element = F::Float> + SliceMut,
[src]
F: Frame,
S: Slice<Element = F::Float> + SliceMut,
fn rms(buffer: Fixed<S>, attack_frames: f32, release_frames: f32) -> Self
[src]
Construct a new Rms Detector.
impl<F, R> Detector<F, Peak<R>> where
F: Frame,
R: Rectifier<F>,
[src]
F: Frame,
R: Rectifier<F>,
fn peak_from_rectifier(
rectifier: R,
attack_frames: f32,
release_frames: f32
) -> Self
[src]
rectifier: R,
attack_frames: f32,
release_frames: f32
) -> Self
Construct a new Peak Detector that uses the given rectifier.
impl<F> Detector<F, Peak<FullWave>> where
F: Frame,
[src]
F: Frame,
fn peak(attack_frames: f32, release_frames: f32) -> Self
[src]
Construct a new full wave Peak Detector.
impl<F> Detector<F, Peak<PositiveHalfWave>> where
F: Frame,
[src]
F: Frame,
fn peak_positive_half_wave(attack_frames: f32, release_frames: f32) -> Self
[src]
Construct a new positive half wave Peak Detector.
impl<F> Detector<F, Peak<NegativeHalfWave>> where
F: Frame,
[src]
F: Frame,
fn peak_negative_half_wave(attack_frames: f32, release_frames: f32) -> Self
[src]
Construct a new positive half wave Peak Detector.
impl<F, D> Detector<F, D> where
F: Frame,
D: Detect<F>,
[src]
F: Frame,
D: Detect<F>,
fn set_attack_frames(&mut self, frames: f32)
[src]
Set the Detector's attack time as a number of frames.
fn set_release_frames(&mut self, frames: f32)
[src]
Set the Detector's release time as a number of frames.
fn next(&mut self, frame: F) -> D::Output
[src]
Given the next input signal frame, detect and return the next envelope frame.
Trait Implementations
impl<F: Clone, D: Clone> Clone for Detector<F, D> where
F: Frame,
D: Detect<F>,
D::Output: Clone,
[src]
F: Frame,
D: Detect<F>,
D::Output: Clone,
fn clone(&self) -> Detector<F, D>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<F: Debug, D: Debug> Debug for Detector<F, D> where
F: Frame,
D: Detect<F>,
D::Output: Debug,
[src]
F: Frame,
D: Detect<F>,
D::Output: Debug,