Struct sample::envelope::detect::Detector [−][src]
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]
impl<F, S> Detector<F, Rms<F, S>> where
F: Frame,
S: Slice<Element = F::Float> + SliceMut,
pub fn rms(buffer: Fixed<S>, attack_frames: f32, release_frames: f32) -> Self
[src]
pub fn rms(buffer: Fixed<S>, attack_frames: f32, release_frames: f32) -> Self
Construct a new Rms Detector.
impl<F, R> Detector<F, Peak<R>> where
F: Frame,
R: Rectifier<F>,
[src]
impl<F, R> Detector<F, Peak<R>> where
F: Frame,
R: Rectifier<F>,
pub fn peak_from_rectifier(
rectifier: R,
attack_frames: f32,
release_frames: f32
) -> Self
[src]
pub fn peak_from_rectifier(
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]
impl<F> Detector<F, Peak<FullWave>> where
F: Frame,
pub fn peak(attack_frames: f32, release_frames: f32) -> Self
[src]
pub fn peak(attack_frames: f32, release_frames: f32) -> Self
Construct a new full wave Peak Detector.
impl<F> Detector<F, Peak<PositiveHalfWave>> where
F: Frame,
[src]
impl<F> Detector<F, Peak<PositiveHalfWave>> where
F: Frame,
pub fn peak_positive_half_wave(attack_frames: f32, release_frames: f32) -> Self
[src]
pub fn peak_positive_half_wave(attack_frames: f32, release_frames: f32) -> Self
Construct a new positive half wave Peak Detector.
impl<F> Detector<F, Peak<NegativeHalfWave>> where
F: Frame,
[src]
impl<F> Detector<F, Peak<NegativeHalfWave>> where
F: Frame,
pub fn peak_negative_half_wave(attack_frames: f32, release_frames: f32) -> Self
[src]
pub fn peak_negative_half_wave(attack_frames: f32, release_frames: f32) -> Self
Construct a new positive half wave Peak Detector.
impl<F, D> Detector<F, D> where
F: Frame,
D: Detect<F>,
[src]
impl<F, D> Detector<F, D> where
F: Frame,
D: Detect<F>,
pub fn set_attack_frames(&mut self, frames: f32)
[src]
pub fn set_attack_frames(&mut self, frames: f32)
Set the Detector's attack time as a number of frames.
pub fn set_release_frames(&mut self, frames: f32)
[src]
pub fn set_release_frames(&mut self, frames: f32)
Set the Detector's release time as a number of frames.
pub fn next(&mut self, frame: F) -> D::Output
[src]
pub fn next(&mut self, frame: F) -> D::Output
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]
impl<F: Clone, D: Clone> Clone for Detector<F, D> where
F: Frame,
D: Detect<F>,
D::Output: Clone,
fn clone(&self) -> Detector<F, D>
[src]
fn clone(&self) -> Detector<F, D>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
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]
impl<F: Debug, D: Debug> Debug for Detector<F, D> where
F: Frame,
D: Detect<F>,
D::Output: Debug,