pub struct Vca { /* private fields */ }Expand description
Voltage-Controlled Amplifier (VCA)
An amplifier with CV control, useful for amplitude modulation.
§Control voltage
cv in [0, 10]V maps to a base control amount in [0, 1] (values outside
the range are clamped). With the default cv of 10V the base amount is
unity.
§Response curve
The response input selects how the control amount maps to gain: 0V
(default) is linear (gain = cv/10); a high level (> GATE_THRESHOLD_V,
e.g. 5V) selects an exponential (square-law) taper gain = (cv/10)². The
exponential curve is monotonic with matched endpoints (0→0, 1→1) and a
documented midpoint of 0.25 at cv = 5V.
§Boost
The gain input is a post-response scale in [0, 2] (default 1.0),
allowing up to +6 dB of boost/overdrive headroom. With all inputs at their
defaults the VCA is bit-for-bit identical to a plain out = in · cv/10.
Implementations§
Trait Implementations§
Source§impl GraphModule for Vca
impl GraphModule for Vca
Source§fn tick(&mut self, inputs: &PortValues, outputs: &mut PortValues)
fn tick(&mut self, inputs: &PortValues, outputs: &mut PortValues)
Source§fn set_sample_rate(&mut self, _: f64)
fn set_sample_rate(&mut self, _: f64)
Source§fn process_block(
&mut self,
inputs: &BlockPortValues,
outputs: &mut BlockPortValues,
frames: usize,
)
fn process_block( &mut self, inputs: &BlockPortValues, outputs: &mut BlockPortValues, frames: usize, )
Source§fn breaks_feedback_cycle(&self) -> bool
fn breaks_feedback_cycle(&self) -> bool
Source§fn serialize_state(&self) -> Option<Value>
fn serialize_state(&self) -> Option<Value>
alloc only.Source§fn deserialize_state(&mut self, _state: &Value) -> Result<(), String>
fn deserialize_state(&mut self, _state: &Value) -> Result<(), String>
alloc only.Source§fn introspect(&self) -> Option<&dyn ModuleIntrospection>
fn introspect(&self) -> Option<&dyn ModuleIntrospection>
alloc only.ModuleIntrospection view, if it exposes one. Read moreSource§fn introspect_mut(&mut self) -> Option<&mut dyn ModuleIntrospection>
fn introspect_mut(&mut self) -> Option<&mut dyn ModuleIntrospection>
alloc only.introspect, used to set internal parameters.Source§impl ModuleIntrospection for Vca
Available on crate feature alloc only.
impl ModuleIntrospection for Vca
alloc only.