Struct JfetVariableResistor
pub struct JfetVariableResistor {
pub model: JfetModel,
/* private fields */
}Expand description
JFET operating as a voltage-controlled variable resistor.
In phaser circuits, JFETs operate in the triode region with small Vds, where they act as voltage-controlled resistors. The drain-source resistance Rds varies with the gate-source voltage Vgs:
Rds = Rds_on / (1 - Vgs/Vp)²
where:
Rds_on = 1 / (2 × β × |Vp|)— resistance at Vgs = 0Vp = VTO— pinch-off voltage (negative for N-channel)
This replaces the full Newton-Raphson JFET solver for LFO-modulated JFETs that serve as variable resistors (e.g., Phase 90 all-pass stages).
Fields§
§model: JfetModelImplementations§
§impl JfetVariableResistor
impl JfetVariableResistor
pub fn new(model: JfetModel) -> JfetVariableResistor
pub fn process_root(&self, a: f64, rp: f64) -> f64
pub fn process_root(&self, a: f64, rp: f64) -> f64
Process as a WDF root: simple resistor reflection.
Returns the reflected wave for a resistive termination with resistance Rds at the root port with tree port resistance Rp:
b = a × (Rds - Rp) / (Rds + Rp)
Trait Implementations§
§impl Clone for JfetVariableResistor
impl Clone for JfetVariableResistor
§fn clone(&self) -> JfetVariableResistor
fn clone(&self) -> JfetVariableResistor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl ControlledResistance for JfetVariableResistor
impl ControlledResistance for JfetVariableResistor
§fn set_control(&mut self, value: f64)
fn set_control(&mut self, value: f64)
Set the control value (0.0 = minimum effect, 1.0 = maximum effect). Read more
§fn effective_control(&self) -> f64
fn effective_control(&self) -> f64
Get the current effective control level (after any internal filtering).
impl Copy for JfetVariableResistor
§impl Debug for JfetVariableResistor
impl Debug for JfetVariableResistor
§impl WdfLeaf for JfetVariableResistor
impl WdfLeaf for JfetVariableResistor
§fn port_resistance(&self) -> f64
fn port_resistance(&self) -> f64
Port resistance seen looking into this element (Ω).
§fn set_incident(&mut self, _a: f64)
fn set_incident(&mut self, _a: f64)
Accept the incident wave after scatter_down phase. Read more
§fn set_sample_rate(&mut self, _sample_rate: f64)
fn set_sample_rate(&mut self, _sample_rate: f64)
Update sample rate (for reactive elements C, L).
Auto Trait Implementations§
impl Freeze for JfetVariableResistor
impl RefUnwindSafe for JfetVariableResistor
impl Send for JfetVariableResistor
impl Sync for JfetVariableResistor
impl Unpin for JfetVariableResistor
impl UnsafeUnpin for JfetVariableResistor
impl UnwindSafe for JfetVariableResistor
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