[−][src]Struct dasp::envelope::Detector
A type that can be used to detect the envelope of a signal.
Implementations
impl<F, R> Detector<F, Peak<R>> where
F: Frame,
R: Rectifier<F>,
[src]
F: Frame,
R: Rectifier<F>,
pub fn peak_from_rectifier(
rectifier: R,
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<R>>
[src]
rectifier: R,
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<R>>
Construct a new Peak Detector that uses the given rectifier.
Required Features
- When using
dasp_envelope
, this item requires the peak feature to be enabled. - When using
dasp
, this item requires the envelope-peak feature to be enabled.
impl<F> Detector<F, Peak<FullWave>> where
F: Frame,
[src]
F: Frame,
pub fn peak(
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<FullWave>>
[src]
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<FullWave>>
Construct a new full wave Peak Detector.
Required Features
- When using
dasp_envelope
, this item requires the peak feature to be enabled. - When using
dasp
, this item requires the envelope-peak feature to be enabled.
impl<F> Detector<F, Peak<PositiveHalfWave>> where
F: Frame,
[src]
F: Frame,
pub fn peak_positive_half_wave(
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<PositiveHalfWave>>
[src]
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<PositiveHalfWave>>
Construct a new positive half wave Peak Detector.
Required Features
- When using
dasp_envelope
, this item requires the peak feature to be enabled. - When using
dasp
, this item requires the envelope-peak feature to be enabled.
impl<F> Detector<F, Peak<NegativeHalfWave>> where
F: Frame,
[src]
F: Frame,
pub fn peak_negative_half_wave(
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<NegativeHalfWave>>
[src]
attack_frames: f32,
release_frames: f32
) -> Detector<F, Peak<NegativeHalfWave>>
Construct a new positive half wave Peak Detector.
Required Features
- When using
dasp_envelope
, this item requires the peak feature to be enabled. - When using
dasp
, this item requires the envelope-peak feature to be enabled.
impl<F, S> Detector<F, Rms<F, S>> where
F: Frame,
S: Slice<Element = <F as Frame>::Float> + SliceMut,
[src]
F: Frame,
S: Slice<Element = <F as Frame>::Float> + SliceMut,
pub fn rms(
buffer: Fixed<S>,
attack_frames: f32,
release_frames: f32
) -> Detector<F, Rms<F, S>>
[src]
buffer: Fixed<S>,
attack_frames: f32,
release_frames: f32
) -> Detector<F, Rms<F, S>>
Construct a new Rms Detector.
Required Features
- When using
dasp_envelope
, this item requires the rms feature to be enabled. - When using
dasp
, this item requires the envelope-rms feature to be enabled.
impl<F, D> Detector<F, D> where
D: Detect<F>,
F: Frame,
[src]
D: Detect<F>,
F: Frame,
pub fn new(detect: D, attack_frames: f32, release_frames: f32) -> Detector<F, D>
[src]
Construct a Detector with the given Detect implementation.
pub fn set_attack_frames(&mut self, frames: f32)
[src]
Set the Detector's attack time as a number of frames.
pub fn set_release_frames(&mut self, frames: f32)
[src]
Set the Detector's release time as a number of frames.
pub fn next(&mut self, frame: F) -> <D as Detect<F>>::Output
[src]
Given the next input signal frame, detect and return the next envelope frame.
Trait Implementations
impl<F, D> Clone for Detector<F, D> where
D: Clone + Detect<F>,
F: Clone + Frame,
<D as Detect<F>>::Output: Clone,
[src]
D: Clone + Detect<F>,
F: Clone + Frame,
<D as Detect<F>>::Output: Clone,
impl<F, D> Debug for Detector<F, D> where
D: Debug + Detect<F>,
F: Debug + Frame,
<D as Detect<F>>::Output: Debug,
[src]
D: Debug + Detect<F>,
F: Debug + Frame,
<D as Detect<F>>::Output: Debug,
Auto Trait Implementations
impl<F, D> RefUnwindSafe for Detector<F, D> where
D: RefUnwindSafe,
<D as Detect<F>>::Output: RefUnwindSafe,
D: RefUnwindSafe,
<D as Detect<F>>::Output: RefUnwindSafe,
impl<F, D> Send for Detector<F, D> where
D: Send,
<D as Detect<F>>::Output: Send,
D: Send,
<D as Detect<F>>::Output: Send,
impl<F, D> Sync for Detector<F, D> where
D: Sync,
<D as Detect<F>>::Output: Sync,
D: Sync,
<D as Detect<F>>::Output: Sync,
impl<F, D> Unpin for Detector<F, D> where
D: Unpin,
<D as Detect<F>>::Output: Unpin,
D: Unpin,
<D as Detect<F>>::Output: Unpin,
impl<F, D> UnwindSafe for Detector<F, D> where
D: UnwindSafe,
<D as Detect<F>>::Output: UnwindSafe,
D: UnwindSafe,
<D as Detect<F>>::Output: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<S, T> Duplex<S> for T where
T: FromSample<S> + ToSample<S>,
[src]
T: FromSample<S> + ToSample<S>,
impl<T> From<T> for T
[src]
impl<S> FromSample<S> for S
[src]
fn from_sample_(s: S) -> S
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> ToSample<U> for T where
U: FromSample<T>,
[src]
U: FromSample<T>,
fn to_sample_(self) -> U
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,