pub struct OverdriveBlock<S: Sample> {
pub drive: Parameter<S>,
pub level: Parameter<S>,
/* private fields */
}Expand description
An overdrive distortion effect with asymmetric soft clipping.
Uses hyperbolic tangent saturation with different curves for positive and negative signal halves, creating a warm, tube-like distortion character. Includes a one-pole lowpass filter for tone control.
Fields§
§drive: Parameter<S>Drive amount (gain before clipping, typically 1.0-10.0).
level: Parameter<S>Output level (0.0-1.0).
Implementations§
Trait Implementations§
Source§impl<S: Sample> Block<S> for OverdriveBlock<S>
impl<S: Sample> Block<S> for OverdriveBlock<S>
Source§fn process(
&mut self,
inputs: &[&[S]],
outputs: &mut [&mut [S]],
modulation_values: &[S],
context: &DspContext,
)
fn process( &mut self, inputs: &[&[S]], outputs: &mut [&mut [S]], modulation_values: &[S], context: &DspContext, )
Process audio through this block. Read more
Source§fn input_count(&self) -> usize
fn input_count(&self) -> usize
Returns the number of input ports this block accepts.
Source§fn output_count(&self) -> usize
fn output_count(&self) -> usize
Returns the number of output ports this block produces.
Source§fn modulation_outputs(&self) -> &[ModulationOutput]
fn modulation_outputs(&self) -> &[ModulationOutput]
Returns the modulation outputs this block provides. Read more
Source§fn set_smoothing(&mut self, sample_rate: f64, ramp_time_ms: f64)
fn set_smoothing(&mut self, sample_rate: f64, ramp_time_ms: f64)
Configure smoothing time for parameter changes. Read more
Source§fn channel_config(&self) -> ChannelConfig
fn channel_config(&self) -> ChannelConfig
Returns how this block handles multi-channel audio. Read more
Source§impl<S: Sample> From<OverdriveBlock<S>> for BlockType<S>
impl<S: Sample> From<OverdriveBlock<S>> for BlockType<S>
Source§fn from(block: OverdriveBlock<S>) -> Self
fn from(block: OverdriveBlock<S>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<S> Freeze for OverdriveBlock<S>where
S: Freeze,
impl<S> RefUnwindSafe for OverdriveBlock<S>where
S: RefUnwindSafe,
impl<S> Send for OverdriveBlock<S>
impl<S> Sync for OverdriveBlock<S>
impl<S> Unpin for OverdriveBlock<S>where
S: Unpin,
impl<S> UnwindSafe for OverdriveBlock<S>where
S: UnwindSafe,
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