Signal Processing

with Web Audio

Jordan Santell / @jsantell

Web Audio

Web Audio API

Node Types

  • Source
  • Transformation
  • Analyzation
  • Destination

Simple Route

var ctx = new AudioContext();
var osc = ctx.createOscillator();
var gain = ctx.createGain();
osc.connect(gain);
gain.connect(ctx.destination);
osc.start(0);
					

Amplitude Modulation

var ctx = new AudioContext();
var carrier = ctx.createOscillator();
var modulator = ctx.createOscillator();
var gain = ctx.createGain();
carrier.connect(gain);
gain.connect(ctx.destination);
carrier.start(0);

modulator.connect(gain.gain);
modulator.start(0);
					

Frequency Modulation

var ctx = new AudioContext();
var carrier = ctx.createOscillator();
var modulator = ctx.createOscillator();
var gain = ctx.createGain();
carrier.connect(gain);
gain.connect(ctx.destination);
carrier.start(0);

modulator.connect(carrier.frequency);
modulator.start(0);
					

Modulating all AudioParams

DUBSTEP

Thanks