pub struct DeltaMonitor { /* private fields */ }Expand description
Monitors the delta (difference) between input and output of a processor.
When enabled, replaces the output with output - input, letting the user
hear only what the processor changed.
Implementations§
Source§impl DeltaMonitor
impl DeltaMonitor
pub fn new() -> Self
pub fn set_enabled(&mut self, enabled: bool)
pub fn enabled(&self) -> bool
Sourcepub fn apply_if_enabled(&self, input: &[f32], output: &mut [f32])
pub fn apply_if_enabled(&self, input: &[f32], output: &mut [f32])
If enabled, replaces output[i] with output[i] - input[i] (the delta).
If disabled, does nothing (zero cost — branch predicted away).
Both slices must have the same length (total samples = frames * channels).
Sourcepub fn apply_from_copy(&self, dry_copy: &[f32], wet_buffer: &mut [f32])
pub fn apply_from_copy(&self, dry_copy: &[f32], wet_buffer: &mut [f32])
Convenience: capture the dry signal before processing, then call
apply_after on the wet signal. This is for in-place processors
that overwrite the input buffer.
dry_copy must be filled by the caller before processing.
Trait Implementations§
Source§impl Clone for DeltaMonitor
impl Clone for DeltaMonitor
Source§fn clone(&self) -> DeltaMonitor
fn clone(&self) -> DeltaMonitor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeltaMonitor
impl Debug for DeltaMonitor
Source§impl Default for DeltaMonitor
impl Default for DeltaMonitor
impl Copy for DeltaMonitor
Auto Trait Implementations§
impl Freeze for DeltaMonitor
impl RefUnwindSafe for DeltaMonitor
impl Send for DeltaMonitor
impl Sync for DeltaMonitor
impl Unpin for DeltaMonitor
impl UnsafeUnpin for DeltaMonitor
impl UnwindSafe for DeltaMonitor
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.