NoiseZ

The open engine

How a noise color is made

Every color in NoiseZ is made live, one sample at a time, by a small piece of code. It is the same code in the app and on this page, and anyone may use it.

Try it

Move the levels and listen. The chart is worked out by the very code that makes the sound.

The seven colors

Tone, waves and the soft clip

The tone knob is a one-pole low-pass that glides from 400 Hz (dark) to fully open. Waves slowly swell and ease the level over ten seconds, up to 70 percent deep. A soft clip bends anything above 0.8 so that nothing ever clips hard, and the master level glides rather than jumps.

Use it

The engine is a single file with no dependencies, offered under the Apache-2.0 license as the @noisez/noise package: the code only, with none of the app’s sounds or artwork. It runs as an AudioWorklet, directly in Node, or through a ScriptProcessor where worklets are missing.

const NoiseDSP = require('@noisez/noise');
const dsp = new NoiseDSP(48000);
// gains: [white, pink, brown, grey, green, blue, violet]
dsp.setParameters({ gains: [0, 0, 0.3, 0, 0, 0, 0], toneCoefficient: 1, waves: 0 });
dsp.setMaster(0.5);
const left = new Float32Array(128), right = new Float32Array(128);
dsp.render(128, left, right);   // false when it rendered silence

// In a browser, as an AudioWorklet:
await audioContext.audioWorklet.addModule('/node_modules/@noisez/noise/noise-dsp.js');
const node = new AudioWorkletNode(audioContext, 'noisez-noise', { outputChannelCount: [2] });
node.port.postMessage({ master: 0.5, params: { gains: [0, 0, 0.3, 0, 0, 0, 0], toneCoefficient: 1, waves: 0 } });

To put the player on a page without writing any code, make an embed.

How is it made?

Every noise color is generated live, from a few lines of open code. Move the sliders and hear what each one does.