[][src]Struct dasp::signal::window::Windower

pub struct Windower<'a, F, W> where
    F: 'a + Frame,
    W: Window<f64, Output = f64>, 
{ pub bin: usize, pub hop: usize, pub frames: &'a [F], // some fields omitted }

Takes a long slice of frames and yields Windowed chunks of size bin once every hop frames.

Required Features

  • When using dasp_signal, this item requires the window feature to be enabled.
  • When using dasp, this item requires the signal-window feature to be enabled.

Fields

bin: usize

The size of each Windowed chunk to be yielded.

hop: usize

The step size over frames for the start of each new Windowed chunk.

frames: &'a [F]

The beginning of the remaining slice to be yielded by the Windower.

Implementations

impl<'a, F> Windower<'a, F, Hanning> where
    F: 'a + Frame
[src]

pub fn hanning(
    frames: &'a [F],
    bin: usize,
    hop: usize
) -> Windower<'a, F, Hanning>
[src]

Constructor for a Windower using the Hanning window function.

Required Features

  • When using dasp_signal, this item requires the window-hanning feature to be enabled.
  • When using dasp, this item requires the signal-window-hanning feature to be enabled.

impl<'a, F> Windower<'a, F, Rectangle> where
    F: 'a + Frame
[src]

pub fn rectangle(
    frames: &'a [F],
    bin: usize,
    hop: usize
) -> Windower<'a, F, Rectangle>
[src]

Constructor for a Windower using the Rectangle window function.

Required Features

  • When using dasp_signal, this item requires the window-rectangle feature to be enabled.
  • When using dasp, this item requires the signal-window-rectangle feature to be enabled.

impl<'a, F, W> Windower<'a, F, W> where
    F: 'a + Frame,
    W: Window<f64, Output = f64>, 
[src]

pub fn new(frames: &'a [F], bin: usize, hop: usize) -> Windower<'a, F, W>[src]

Constructor for a new Windower iterator.

Required Features

  • When using dasp_signal, this item requires the window feature to be enabled.
  • When using dasp, this item requires the signal-window feature to be enabled.

Trait Implementations

impl<'a, F, W> Clone for Windower<'a, F, W> where
    F: Clone + 'a + Frame,
    W: Clone + Window<f64, Output = f64>, 
[src]

impl<'a, F, W> Iterator for Windower<'a, F, W> where
    F: 'a + Frame,
    W: Window<f64, Output = f64>, 
[src]

type Item = Windowed<FromIterator<Cloned<Iter<'a, F>>>, W>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, F, W> RefUnwindSafe for Windower<'a, F, W> where
    F: RefUnwindSafe,
    W: RefUnwindSafe

impl<'a, F, W> Send for Windower<'a, F, W> where
    F: Sync,
    W: Send

impl<'a, F, W> Sync for Windower<'a, F, W> where
    F: Sync,
    W: Sync

impl<'a, F, W> Unpin for Windower<'a, F, W> where
    W: Unpin

impl<'a, F, W> UnwindSafe for Windower<'a, F, W> where
    F: RefUnwindSafe,
    W: 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<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

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

impl<S> FromSample<S> for S[src]

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> ToSample<U> for T where
    U: FromSample<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.