pub struct Feedback<M: Module, F> {
pub module: M,
pub combine: F,
pub delay_buffer: M::Out,
}Expand description
Feedback loop with a mandatory single-sample delay for causality.
Each tick computes combine(external_input, previous_output) and feeds the result to
the wrapped module. previous_output is the module’s output from the previous tick
(the delay_buffer), which starts at M::Out::default() on the first tick and after
reset. See ModuleExt::feedback for the argument-order contract
and a runnable example.
Fields§
§module: M§combine: F§delay_buffer: M::OutThe previous tick’s output, delayed one sample. Default on the first tick.
Trait Implementations§
Auto Trait Implementations§
impl<M, F> Freeze for Feedback<M, F>
impl<M, F> RefUnwindSafe for Feedback<M, F>
impl<M, F> Send for Feedback<M, F>
impl<M, F> Sync for Feedback<M, F>
impl<M, F> Unpin for Feedback<M, F>
impl<M, F> UnsafeUnpin for Feedback<M, F>
impl<M, F> UnwindSafe for Feedback<M, F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<M> ModuleExt for Mwhere
M: Module,
impl<M> ModuleExt for Mwhere
M: Module,
Source§fn then<M: Module<In = Self::Out>>(self, next: M) -> Chain<Self, M>
fn then<M: Module<In = Self::Out>>(self, next: M) -> Chain<Self, M>
Chain this module with another (sequential composition:
>>>)Source§fn fanout<M: Module<In = Self::In>>(self, other: M) -> Fanout<Self, M>
fn fanout<M: Module<In = Self::In>>(self, other: M) -> Fanout<Self, M>
Split input to two parallel processors (
&&&)