AUDIO
Source snapshot · 12 October 2026

API reference / ravet_signal::Phaser32

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

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>

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>

Validate before clearing any history; phase is sampled before step.

pub fn process_frame( &mut self, input: &[f32], output: &mut [f32], ) -> Result<(), PhaserError>

pub fn process_planar( &mut self, input: &[&[f32]], output: &mut [&mut [f32]], frames: usize, ) -> Result<(), PhaserError>

pub fn process_planar_in_place( &mut self, channels: &mut [&mut [f32]], frames: usize, ) -> Result<(), PhaserError>

Trait Implementations§

§

impl Clone for Phaser32

§

fn clone(&self) -> Phaser32

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for Phaser32

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.