Build with this node

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

Ask Studio

@maruaudio/dsp/distortion/chebyshev shapes a signal with a first-kind Chebyshev polynomial Tₙ(x) over the fixed-4× oversampling stage of @maru/distortion-oversampled-waveshaper. The polynomial uses the recurrence

T₀ = 1, T₁ = x, Tₖ = 2x·Tₖ₋₁ − Tₖ₋₂, x clamped to ±1

so a full-scale sine of the input maps to its n-th harmonic. Each input is interpolated to four points, each shaped and stored at f32, filtered by the shared 31-tap FIR and clamped to ±1.

Parameters

SetterRange the setter enforcesDefault
setChebyshevOrderfloor(order + 0.5), then 1 to 10050

initChebyshevNode() takes no sample rate.

Lifecycle

initChebyshevNode allocates the 32-value history → setChebyshevOrder → chebyshevNodeTick → resetChebyshevNode, which zeroes the history and marks the state uninitialized. The recurrence runs a fixed 100-step loop whatever the order. Ticks allocate nothing and do no I/O.

When to use it

Generating a chosen harmonic from a sine, or adding harmonics to a synth voice. Order 1 is the identity before the FIR.

Limits

  • Mono sample tick, wet only, with the FIR's 15 oversampled frames (3.75 samples) of delay.
  • The FIR reduces products above the oversampled band but does not remove them; high orders still alias.
  • The input is clamped to ±1 before shaping and the output to ±1 after.
  • Order changes apply at once.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Order orderfloatsetChebyshevOrder

Ports

  • In ininput · audio · mono
  • Out outoutput · audio · mono

One sample per chebyshevNodeTick call.

Dependencies

Dependents

No other node imports this one.

Used by