Struct VariMuTriodeRoot
pub struct VariMuTriodeRoot {
pub model: VariMuModel,
/* private fields */
}Expand description
Variable-mu triode nonlinear root for WDF trees.
Models the plate-cathode path as a nonlinear element controlled by an external grid-cathode voltage Vgk. Uses Newton-Raphson to solve the implicit WDF constraint equation.
Unlike the standard Koren-based TriodeRoot, this uses the Raffensperger equation which captures the variable-mu characteristic: transconductance decreases smoothly as Vgk becomes more negative, providing the gradual gain reduction that defines variable-mu compressor behavior.
Fields§
§model: VariMuModelImplementations§
§impl VariMuTriodeRoot
impl VariMuTriodeRoot
pub fn new(model: VariMuModel) -> VariMuTriodeRoot
pub fn new_with_v_max(model: VariMuModel, v_max: f64) -> VariMuTriodeRoot
pub fn new_with_v_max(model: VariMuModel, v_max: f64) -> VariMuTriodeRoot
Create a variable-mu triode root with a specific supply voltage (B+).
pub fn with_parallel_count(self, count: usize) -> VariMuTriodeRoot
pub fn with_parallel_count(self, count: usize) -> VariMuTriodeRoot
Set the number of parallel tubes for current scaling.
pub fn parallel_count(&self) -> usize
pub fn set_vgk(&mut self, vgk: f64)
pub fn set_vgk(&mut self, vgk: f64)
Set the grid-cathode voltage (external control from bias, signal, LFO).
pub fn plate_current(&self, vak: f64) -> f64
pub fn plate_current(&self, vak: f64) -> f64
Compute plate current using the Raffensperger equation.
Ia = p1 × Vak^p2 / ((p3 - p4×Vgk)^p5 × (p6 + exp(p7×Vak - p8×Vgk)))Guards:
- Vak ≤ 0: no reverse current
- p3 - p4*Vgk ≤ 0: past cutoff (only at Vgk > +5V for 6386 params)
- Exp argument clamped to ±500 for overflow safety
Trait Implementations§
§impl Clone for VariMuTriodeRoot
impl Clone for VariMuTriodeRoot
§fn clone(&self) -> VariMuTriodeRoot
fn clone(&self) -> VariMuTriodeRoot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more