Struct Phaser32
pub struct Phaser32 { /* private fields */ }Expand description
Fixed six native TPT allpasses per independent channel, shared f64 base LFO phase with explicit offsets, one-sample signed wet feedback. Whole admissible sweep near normalized1e-6..0.49 is CONTROL validated. F64 sine/exp2/tan/phase are explicit per frame/channel; coefficient and recurrence/audio arithmetic are native. No deadline/cheap-LFO claim. Construction/control/process/reset use fixed storage, no heap/lock/I/O.
Cascade input is x+beta*previous_wet (beta0 bypasses multiplication), then six allpass updates and retained wet. Mix0/1 returns exact dry/wet branches; dry still advances all wet histories and phase. Each frame advances the base phase once regardless of channel count. Controls replace atomically retaining phase/histories; reset clears all.
At fixed actual coefficients A=(-p+z^-1)/(1-pz^-1),p=1-2G; W=A^6/(1-betaz^-1*A^6). Static ideal |beta|<1 small-gain stability is distinct from arbitrary modulation/floating overflow/inaudibility. Recursive tail/denormals/NaN/Inf poison, aliasing/abrupt retunes and feedback headroom are caller policy; no limiter/normalization repair, implicit EOF/constant latency/host report/SIMD/hardware qualification.
Implementations§
§impl Phaser32
impl Phaser32
pub fn new( config: PhaserConfig, controls: PhaserControls, ) -> Result<Self, PhaserError>
pub fn config(&self) -> PhaserConfig
pub fn controls(&self) -> PhaserControls
pub fn phase_cycles(&self) -> f64
pub fn native_feedback(&self) -> f32
pub fn native_wet_mix(&self) -> f32
pub fn sweep_endpoints_hz(&self) -> [f64; 2]
pub fn next_cutoff_hz(&self, ch: usize) -> Result<f64, PhaserError>
pub fn next_cutoff_hz(&self, ch: usize) -> Result<f64, PhaserError>
CONTROL observation at the phase of the next frame, no history edit.
pub fn next_gain(&self, ch: usize) -> Result<f32, PhaserError>
pub fn set_controls( &mut self, controls: PhaserControls, ) -> Result<(), PhaserError>
pub fn reset(&mut self)
pub fn reset_to_phase(&mut self, phase: f64) -> Result<(), PhaserError>
pub fn reset_to_phase(&mut self, phase: f64) -> Result<(), PhaserError>
Validate before clearing any history; phase is sampled before step.