Build with this node

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

Ask Studio

@maruaudio/dsp/noise/record-texture, authored in Maru, generates stereo vinyl and cassette textures in three modes: noise only, to be added to audio, sounding on silent input when enabled.

ModeConstantLaw
CrackleRECORD_TEXTURE_CRACKLE (0)Seeded bipolar impulses at a Poisson rate, each feeding a 2 ms exponential tail, through a one-pole tone filter per channel
DustRECORD_TEXTURE_DUST (1)The same with a 0.2 ms tail
HumRECORD_TEXTURE_HUM (2)(sin 2πφ + h·sin 4πφ)/(1 + h) × level, the right channel offset by a phase

Impulse timing, level and pan come from @maru/noise-xorshift32; the pan is scaled by Spread and split with gains (1 ∓ pan)/2.

Parameters

configureRecordTexture(state, mode, first, second, third, fourth) sets everything through clampFiniteWithFallback (@maru/math-range); the arguments change meaning with the mode.

ArgumentCrackle and dustHum
modeRounded, 0 to 2; non-finite → 0
firstRate 0 to 200 events/s; non-finite → 060 Hz when ≥ 55, otherwise 50 Hz
secondImpulse amplitude 0 to 1Level 0 to 0.1
thirdTone 500 Hz to min(16 kHz, 0.45 × rate); non-finite → 16 kHzHarmonic 0 to 1
fourthSpread 0 to 1Right-channel phase 0 to 180°

Other non-finite values give 0. Init configures silent crackle (rate 0).

Lifecycle

initRecordTexture(sampleRate, seed) (8 to 384 kHz, fallback 48 kHz; seed 0 → 2463534242) outside the callback → configure → recordTextureTick, reading outLeft and outRight → resetRecordTexture, which restores the seed, zeroes phase, tails and outputs and resets both tone filters.

When to use it

Surface noise or mains hum under a track, from a repeatable seed.

Limits

  • Stereo out, no input; no typed-array storage. Spread 0 gives identical channels and rate 0 exact silence.
  • Two states with the same seed give the same stream and reinforce when summed.

Algorithm properties and proofs

No Lean 4 proof is mapped to this node.

Explore proofs alongside performance

Dependencies

Dependents

Used by