Build with this node

Start with a prompt in Studio, or copy it into your own coding agent.

Ask Studio

@maruaudio/dsp/modulation/phaser sums four swept first-order allpass sections against the dry signal. Each section is H(z) = (a + z⁻¹)/(1 + a·z⁻¹) with one f32 history value, and the coefficient is prewarped so the swept frequency is the section's −90° point:

f = base × 2^(octaves × depth × (0.5 + 0.5 sin 2π·phase))
a = (tan(π·f/rate) − 1)/(tan(π·f/rate) + 1), f clamped to 1 Hz … 0.45 × rate
y = fround(x × (1 − mix) + allpass⁴(x + feedback × previous) × mix)

Parameters

SetterRange the setter enforcesDefault
setPhaserRate0.01 to 10 Hz0.5 Hz
setPhaserDepth0 to 11
setPhaserBaseFrequency20 to 2000 Hz350 Hz
setPhaserOctaves0.5 to 6 octaves of sweep3
setPhaserMix0 to 10.5
setPhaserFeedback−0.75 to 0.75; NaN → 00
setPhaserPhaseOffset−180 to 180 degrees, NaN → 0, stored as 0 to 1 cycles0°

A phase-offset change moves the running phase by the difference from the previous offset; repeating the same offset changes nothing.

Lifecycle

initPhaserNode allocates the four-value history once → setters → phaserNodeTick → resetPhaserNode, which clears the histories and the feedback value and restores the phase to the offset, keeping parameters. phaserAllpassCoefficient and phaserAllpassStageTick are exported for other allpass banks. Each tick calls pow and tan once.

When to use it

Swept phase movement on keys, guitar or pads. Paired states with a phase offset give two stereo lanes from one rate.

Limits

  • Mono sample tick; one state per channel.
  • At zero feedback the arithmetic is the original four-stage path, byte for byte.
  • The sweep is recomputed every sample with no smoothing of the controls.
  • The clamps are the kernel node's conditional clamp, except feedback and phase offset, which map NaN to 0.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Rate ratefloatsetPhaserRate
Depth depthfloatsetPhaserDepth
Degrees degrees

Set a static phase offset for a stereo pair without restarting an unchanged running LFO. The offset moves the current phase relative to the previous offset; reset starts at the configured offset.

floatsetPhaserPhaseOffset
Frequency frequencyfloatsetPhaserBaseFrequency
Octaves octavesfloatsetPhaserOctaves
Mix mixfloatsetPhaserMix
Feedback feedback

Set signed allpass-bank regeneration. NaN fails soft to the neutral legacy path.

floatsetPhaserFeedback

Dependencies

None: this node imports no other node.

Dependents

Used by