pub struct MultiPass<N, T> { /* private fields */ }Expand description
Pass through inputs unchanged.
Implementations
Trait Implementations
sourceimpl<N, T> AudioNode for MultiPass<N, T>where
N: Size<T>,
T: Float,
impl<N, T> AudioNode for MultiPass<N, T>where
N: Size<T>,
T: Float,
type Sample = T
type Sample = T
Sample type for input and output.
type Inputs = N
type Inputs = N
Input arity.
type Outputs = N
type Outputs = N
Output arity.
sourcefn tick(
&mut self,
input: &NumericArray<<MultiPass<N, T> as AudioNode>::Sample, <MultiPass<N, T> as AudioNode>::Inputs>
) -> NumericArray<<MultiPass<N, T> as AudioNode>::Sample, <MultiPass<N, T> as AudioNode>::Outputs>
fn tick(
&mut self,
input: &NumericArray<<MultiPass<N, T> as AudioNode>::Sample, <MultiPass<N, T> as AudioNode>::Inputs>
) -> NumericArray<<MultiPass<N, T> as AudioNode>::Sample, <MultiPass<N, T> as AudioNode>::Outputs>
Process one sample.
sourcefn process(
&mut self,
size: usize,
input: &[&[<MultiPass<N, T> as AudioNode>::Sample]],
output: &mut [&mut [<MultiPass<N, T> as AudioNode>::Sample]]
)
fn process(
&mut self,
size: usize,
input: &[&[<MultiPass<N, T> as AudioNode>::Sample]],
output: &mut [&mut [<MultiPass<N, T> as AudioNode>::Sample]]
)
Process up to 64 (
MAX_BUFFER_SIZE) samples.
The number of input and output buffers must match the number of inputs and outputs, respectively.
All input and output buffers must be at least as large as size.
The default implementation is a fallback that calls into tick. Read moresourcefn route(
&self,
input: &TinyVec<[Signal; 32]>,
_frequency: f64
) -> TinyVec<[Signal; 32]>
fn route(
&self,
input: &TinyVec<[Signal; 32]>,
_frequency: f64
) -> TinyVec<[Signal; 32]>
Route constants, latencies and frequency responses at
frequency Hz
from inputs to outputs. Return output signal.
Default implementation marks all outputs unknown. Read moresourcefn reset(&mut self, _sample_rate: Option<f64>)
fn reset(&mut self, _sample_rate: Option<f64>)
Reset the input state of the component to an initial state where it has
not processed any samples. In other words, reset time to zero.
The sample rate can be set optionally. The default sample rate is 44.1 kHz.
The default implementation does nothing. Read more
sourcefn set_hash(&mut self, _hash: u64)
fn set_hash(&mut self, _hash: u64)
Set node pseudorandom phase hash. Override this to use the hash.
This is called from
ping. It should not be called by users.
The default implementation does nothing. Read moresourcefn ping(&mut self, probe: bool, hash: AttoRand) -> AttoRand
fn ping(&mut self, probe: bool, hash: AttoRand) -> AttoRand
Ping contained
AudioNodes to obtain a deterministic pseudorandom hash.
The local hash includes children, too.
Leaf nodes should not need to override this.
If probe is true, then this is a probe for computing the network hash
and set_hash should not be called yet. Read moresourcefn set(&mut self, _parameter: i64, _value: f64)
fn set(&mut self, _parameter: i64, _value: f64)
Set parameter value recursively. The default implementation does nothing.
sourcefn get(&self, _parameter: i64) -> Option<f64>
fn get(&self, _parameter: i64) -> Option<f64>
Query parameter value recursively. The first matching parameter is returned.
The default implementation returns
None. Read moresourcefn response(&self, output: usize, frequency: f64) -> Option<Complex<f64>>
fn response(&self, output: usize, frequency: f64) -> Option<Complex<f64>>
Evaluate frequency response of
output at frequency Hz.
Any linear response can be composed.
Return None if there is no response or it could not be calculated. Read moresourcefn response_db(&self, output: usize, frequency: f64) -> Option<f64>
fn response_db(&self, output: usize, frequency: f64) -> Option<f64>
Evaluate frequency response of
output in dB at frequency Hz.
Any linear response can be composed.
Return None if there is no response or it could not be calculated. Read moresourcefn latency(&self) -> Option<f64>
fn latency(&self) -> Option<f64>
Causal latency in (fractional) samples.
After a reset, we can discard this many samples from the output to avoid incurring a pre-delay.
The latency can depend on the sample rate and is allowed to change after
reset. Read moresourcefn get_mono(&mut self) -> Self::Sample
fn get_mono(&mut self) -> Self::Sample
Retrieve the next mono sample from a generator.
The node must have no inputs and 1 or 2 outputs.
If there are two outputs, average the channels. Read more
sourcefn get_stereo(&mut self) -> (Self::Sample, Self::Sample)
fn get_stereo(&mut self) -> (Self::Sample, Self::Sample)
Retrieve the next stereo sample (left, right) from a generator.
The node must have no inputs and 1 or 2 outputs.
If there is just one output, duplicate it. Read more
sourcefn filter_mono(&mut self, x: Self::Sample) -> Self::Sample
fn filter_mono(&mut self, x: Self::Sample) -> Self::Sample
Filter the next mono sample
x.
The node must have exactly 1 input and 1 output. Read moreAuto Trait Implementations
impl<N, T> RefUnwindSafe for MultiPass<N, T>where
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<N, T> Send for MultiPass<N, T>where
N: Send,
T: Send,
impl<N, T> Sync for MultiPass<N, T>where
N: Sync,
T: Sync,
impl<N, T> Unpin for MultiPass<N, T>where
N: Unpin,
T: Unpin,
impl<N, T> UnwindSafe for MultiPass<N, T>where
N: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read moreimpl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self using data from the given [World]