Skip to main content

Parallel

Struct Parallel 

Source
pub struct Parallel<A, B> {
    pub left: A,
    pub right: B,
}
Expand description

Parallel composition: processes two independent signals simultaneously

Fields§

§left: A§right: B

Trait Implementations§

Source§

impl<A, B> Module for Parallel<A, B>
where A: Module, B: Module,

Source§

type In = (<A as Module>::In, <B as Module>::In)

Input signal type (e.g., f64 for mono, (f64, f64) for stereo)
Source§

type Out = (<A as Module>::Out, <B as Module>::Out)

Output signal type
Source§

fn tick(&mut self, (a, b): Self::In) -> Self::Out

Process a single sample, advancing internal state by one time step. Read more
Source§

fn reset(&mut self)

Reset internal state to initial conditions. Read more
Source§

fn set_sample_rate(&mut self, sample_rate: f64)

Notify module of sample rate changes. Read more
Source§

fn process(&mut self, input: &[Self::In], output: &mut [Self::Out])
where Self::In: Clone,

Process a block of samples for efficiency. Read more

Auto Trait Implementations§

§

impl<A, B> Freeze for Parallel<A, B>
where A: Freeze, B: Freeze,

§

impl<A, B> RefUnwindSafe for Parallel<A, B>

§

impl<A, B> Send for Parallel<A, B>
where A: Send, B: Send,

§

impl<A, B> Sync for Parallel<A, B>
where A: Sync, B: Sync,

§

impl<A, B> Unpin for Parallel<A, B>
where A: Unpin, B: Unpin,

§

impl<A, B> UnsafeUnpin for Parallel<A, B>
where A: UnsafeUnpin, B: UnsafeUnpin,

§

impl<A, B> UnwindSafe for Parallel<A, B>
where A: UnwindSafe, B: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<M> ModuleExt for M
where M: Module,

Source§

fn then<M: Module<In = Self::Out>>(self, next: M) -> Chain<Self, M>

Chain this module with another (sequential composition: >>>)
Source§

fn parallel<M: Module>(self, other: M) -> Parallel<Self, M>

Run two modules in parallel (***)
Source§

fn fanout<M: Module<In = Self::In>>(self, other: M) -> Fanout<Self, M>
where Self::In: Clone,

Split input to two parallel processors (&&&)
Source§

fn map<F, U>(self, f: F) -> Map<Self, F>
where F: Fn(Self::Out) -> U,

Transform output with a pure function
Source§

fn contramap<F, U>(self, f: F) -> Contramap<Self, F, U>
where F: Fn(U) -> Self::In,

Transform input with a pure function
Source§

fn feedback<F>(self, combine: F) -> Feedback<Self, F>
where Self::Out: Default + Clone,

Create a feedback loop with a single-sample unit delay. Read more
Source§

fn first<C>(self) -> First<Self, C>

Apply this module only to the first element of a tuple
Source§

fn second<C>(self) -> Second<Self, C>

Apply this module only to the second element of a tuple
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.