Build with this node

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

Ask Studio

@maruaudio/dsp/modulation/f32-slew reproduces two firmware control slews with every subtraction, product and sum rounded to f32, so a long run tracks the firmware bit for bit.

FunctionLawUpstream
f32OnePoleStep(c, target, k)c += k × (target − c)DaisySP fonepole
f32AsymmetricSlewStep(c, target, rise, fall)The same with rise when the error is positive, fall otherwisestmlib SLOPE

Parameters

There are no setters or state. The coefficient is a per-sample fraction, not a time; the target and coefficients are rounded to f32 before use.

Lifecycle

Stateless step functions, one call per sample; the caller owns the current value, the target and reset. Nothing allocates or does I/O.

When to use it

Ported firmware whose control smoothing must match the device exactly, as the CHOMPI firmware smooths its controls at audio rate. For new code that only needs a smooth control, @maru/modulation-slew rounds once per step.

Limits

  • A small coefficient stalls short of the target once f32 cannot move: fonepole(0.0002) never reaches 1 from 0.
  • The fall coefficient applies when the error is zero or NaN; a NaN target gives NaN.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

None: this node imports no other node.

Dependents

Used by