Audio Nodes

I started looking into Audio Worklets to see if I can prototype some extra functionality for the Web Audio API. These include: Extensions to the oscillator node (phase offset and duty), a new noise node and a hardsync node.

Surprisingly this webpage makes noise - fair warning.

Noise node

A node which returns a couple of different types of noise. Seed is not implemented in the code on this page, but suggested as per below.


// extending AudioScheduleSourceNode
const opts = {
  type: 'white', // 'white' or 'gaussian'
  seed: 'string' // could also easily be int/float

let noise = new NoiseNode(opts);

// connect node as per

// play

Select noise type & play:

Extensions to oscillator

Adds phase shift and duty to pulse wave. Based upon this better oscillator code.

Configure your oscillator: