Demos / Web Audio synth

A keyboard you can play.

A monophonic oscillator with an envelope and a low-pass filter, all built from AudioContext nodes. iPad has a real speaker; plug in headphones for the full effect.

Tap a key to start the audio context Waveform Cutoff

The graph

For every key press we spawn a fresh oscillator, route it through a biquad low-pass filter, then a per-note gain that does the attack/decay/sustain/release envelope, then the master gain into ctx.destination.

Mobile Safari won't let an AudioContext start without a user gesture; the first tap on a key is what unsuspends it.