Build with this node

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

Ask Studio

@maruaudio/dsp/noise/coloured is a deterministic noise source: white noise from @maru/noise-xorshift32 mapped to [−1, 1) at f32, optional pink or brown colouring, a signed tone tilt and an output level.

  • Pink: two one-pole sections (0.99765 and 0.963) plus a direct term, scaled by 0.32.
  • Brown: brown = clamp(brown × 0.995 + white × 0.045, −1, 1).
  • Tilt: a one-pole split at a fixed 1200 Hz into low and high parts, gains of ∓tone × 0.06 dB, normalized by √((low² + high²)/2). Negative tone lowers the top, positive lowers the bottom; neither part is muted.

Parameters

SetterRange the setter enforcesDefault
seedNoiseNodeseed >>> 0; 0 selects NOISE_DEFAULT_SEED (2463534242)2463534242
setNoiseNodeTypeRounded, then 0 to 2: NOISE_WHITE, NOISE_PINK, NOISE_BROWNWhite
setNoiseNodeTone−100 to 100 (±6 dB tilt)0
setNoiseNodeGain0 to 1; read by noiseNodeOutput only1

Lifecycle

initNoiseNode → seedNoiseNode → setters → noiseNodeTick or noiseNodeOutput. Seeding sets the stream and clears the pink, brown and tone accumulators, so it doubles as reset. noiseNodeTickWhite advances the stream without colour. Ticks allocate nothing and do no I/O; each tick calls pow twice and sqrt once for the tilt.

When to use it

A seeded noise source for synth voices, test signals or modulation, when the same seed must render the same samples on every target, with a coarse brightness control rather than a filter.

Limits

  • Mono sample tick, no input.
  • The tilt's one-pole coefficient is clamp(1200 / sampleRate, 0.001, 1); tone is a tilt, not a moving cutoff.
  • Colour and output samples are rounded to f32; the tilt's low-pass accumulator is a double.
  • The clamps are the kernel node's conditional clamp, not the math/range policy.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Parameters

ParameterTypeSetter
Gain gainfloatsetNoiseNodeGain
Type typefloatsetNoiseNodeType
Tone tonefloatsetNoiseNodeTone

Ports

  • Out outoutput · audio · mono

One sample per noiseNodeTick call.

Dependencies

Dependents

No other node imports this one.

Used by