Struct Vca
pub struct Vca { /* private fields */ }Expand description
Exponential VCA modeled after the SSM2164/V2164.
Features exponential CV response (dB/V) with soft saturation at high levels.
Implementations§
§impl Vca
impl Vca
pub fn set_cv(&mut self, cv: f64)
pub fn set_cv(&mut self, cv: f64)
Set the CV control input.
Exponential response: 0V = unity gain, negative = attenuation. Typical range: -5V (off) to 0V (unity).
pub fn set_cv_normalized(&mut self, cv: f64)
pub fn set_cv_normalized(&mut self, cv: f64)
Set gain from a NORMALIZED control voltage, SSM2164-class dB-linear law.
Convention (SSM2164/V2164 datasheet): the control port is dB-linear at -33 mV/dB (≈ -30 dB/V), 0 V = unity gain, attenuating as the control voltage rises — full attenuation a little above +2.6 V (-80 dB, the datasheet’s specified gain range). Here that law is normalized to a unitless control 0..1 spanning that same range:
gain_db = -80 dB × cv (cv = 0 → 0 dB unity, cv = 1 → -80 dB)
This is the CV port that ModulationTarget::VcaCv drives (compiler
vca_lowering pass, audit gap G4). Unlike [set_cv] (volts in,
device-specific dB/V), this takes the engine’s normalized 0..1
modulation signal directly.
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset VCA state.