Struct PhotocouplerModel
pub struct PhotocouplerModel {
pub r_dark: f64,
pub r_light: f64,
pub gamma: f64,
pub tau_fast_rise: f64,
pub tau_fast_fall: f64,
pub tau_slow_rise: f64,
pub tau_slow_fall: f64,
pub slow_weight: f64,
}Expand description
Photocoupler (Vactrol) model parameters.
Models the LED + CdS photoresistor combination found in optical tremolos and Uni-Vibe circuits. Uses a Persyn-style two-rate model for accurate CdS carrier dynamics.
Fields§
§r_dark: f64Resistance when fully dark (Ω). Typical: 500kΩ - 5MΩ.
r_light: f64Minimum resistance at full illumination (Ω). Typical: 100Ω - 5kΩ.
gamma: f64Nonlinearity exponent. Typical: 0.7 - 0.9.
tau_fast_rise: f64Fast time constant - rise (s). Typical: 1-3ms.
tau_fast_fall: f64Fast time constant - fall (s). Typical: 3-10ms.
tau_slow_rise: f64Slow time constant - rise (s). Typical: 10-30ms.
tau_slow_fall: f64Slow time constant - fall (s). Typical: 30-100ms.
slow_weight: f64Weight of slow component (0-1). Typical: 0.2 - 0.4.
Implementations§
§impl PhotocouplerModel
impl PhotocouplerModel
pub fn vtl5c3() -> PhotocouplerModel
pub fn vtl5c3() -> PhotocouplerModel
VTL5C3 - Classic Vactrol used in Uni-Vibe and optical tremolos.
pub fn vtl5c1() -> PhotocouplerModel
pub fn vtl5c1() -> PhotocouplerModel
VTL5C1 - Faster response, used in some compressors.
pub fn nsl32() -> PhotocouplerModel
pub fn nsl32() -> PhotocouplerModel
NSL-32 - Common optocoupler, moderate response.
pub fn t4b() -> PhotocouplerModel
pub fn t4b() -> PhotocouplerModel
T4B - Electroluminescent panel + CdS LDR used in LA-2A. Very slow response gives the characteristic “program-dependent” compression feel. The EL panel has inherent lag compared to LEDs.
Trait Implementations§
§impl Clone for PhotocouplerModel
impl Clone for PhotocouplerModel
§fn clone(&self) -> PhotocouplerModel
fn clone(&self) -> PhotocouplerModel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more