Build with this node

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

Ask Studio

@maruaudio/dsp/oscillators/daisysp-blep holds the band-limited step helpers shared by the three DaisySP oscillator ports, kept in one place so a numeric change cannot split them. They are the polynomial BLEP residuals for the sample of a discontinuity and the sample after it, the integrated-BLEP residuals for slope changes, a sine that takes its phase in turns, and the ports' conditional clamp. Every residual is rounded to f32 at each step.

Functions

NameInputOutputDomain as coded
daisyThisBlepSamplet (fraction of a sample since the step)f32(0.5 t²)0 → 0, 1 → 0.5
daisyNextBlepSampletf32(−0.5 (1 − t)²)0 → −0.5, 1 → −0 (negative zero)
daisyNextIntegratedBlepSampletf32(0.1875 − t/2 + 1.5 (t/2)² − (t/2)⁴)0 → 0.1875, 1 → 0
daisyThisIntegratedBlepSampletdaisyNextIntegratedBlepSample(1 − t)0 → 0, 1 → 0.1875
daisySinephase in turnsf32(sin(2π × phase))No wrap; any number
daisyClampvalue, minimum, maximumconditional clampNaN passes through; reversed bounds return minimum for values below it

Lifecycle

None. Stateless helpers; the calling oscillator owns every phase and residual accumulator.

When to use it

Writing or extending a port of a DaisySP or Plaits oscillator that must keep the upstream arithmetic. @maru/oscillators-variable-shape, @maru/oscillators-z and @maru/oscillators-formant call it.

Limits

  • The residuals assume t in 0..1; nothing clamps it.
  • daisyClamp is not the @maru/math-range policy: value < minimum and value > maximum are tested in that order, so NaN is returned unchanged.

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

No plugin with a published composition uses this node yet.