[][src]Struct spectrusty_core::audio::BlepAmpFilter

pub struct BlepAmpFilter<B: Blep> {
    pub filter: B::SampleDelta,
    pub blep: B,
}

A wrapper Blep implementation that filters pulses' ∆ amplitude before sending them to the underlying implementation.

BlepAmpFilter may be used to adjust generated audio volume dynamically.

NOTE: To emulate a linear volume control, filter value should be scaled logarithmically.

Fields

filter: B::SampleDelta

A normalized filter value in the range [0.0, 1.0] (floats) or [0, int::max_value()] (integers).

blep: B

A downstream Blep implementation.

Implementations

impl<B: Blep> BlepAmpFilter<B>[src]

pub fn build(filter: B::SampleDelta) -> impl FnOnce(B) -> Self[src]

pub fn new(filter: B::SampleDelta, blep: B) -> Self[src]

Trait Implementations

impl<B> Blep for BlepAmpFilter<B> where
    B: Blep,
    B::SampleDelta: MulNorm + SampleDelta
[src]

type SampleDelta = B::SampleDelta

A type for sample ∆ amplitudes (pulse height).

impl<B: Blep> Deref for BlepAmpFilter<B>[src]

type Target = B

The resulting type after dereferencing.

impl<B: Blep> DerefMut for BlepAmpFilter<B>[src]

Auto Trait Implementations

impl<B> RefUnwindSafe for BlepAmpFilter<B> where
    B: RefUnwindSafe,
    <B as Blep>::SampleDelta: RefUnwindSafe

impl<B> Send for BlepAmpFilter<B> where
    B: Send,
    <B as Blep>::SampleDelta: Send

impl<B> Sync for BlepAmpFilter<B> where
    B: Sync,
    <B as Blep>::SampleDelta: Sync

impl<B> Unpin for BlepAmpFilter<B> where
    B: Unpin,
    <B as Blep>::SampleDelta: Unpin

impl<B> UnwindSafe for BlepAmpFilter<B> where
    B: UnwindSafe,
    <B as Blep>::SampleDelta: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.