The DAW — Multi-Track Audio Workstation, Real WAV Export
8 tracks. Drag MIDI clips. Per-track FX rack (reverb, delay, lowpass, compressor). Press play. Export your song to WAV. Real Web Audio production stack in a browser tab.
What this is
A real digital audio workstation in 2086 lines of JavaScript. Top transport (play/stop/record, BPM, position counter as bar.beat.tick, master volume). 8 tracks with synthesized instruments: saw lead, sub bass, FM drum kit, FM piano, pad, pluck, filter-swept noise, FM bell. Timeline: click + drag to drop clips, drag center to move, drag edges to resize, right-click to delete. Piano roll editor at bottom: 88-key vertical, click to add notes, drag to resize, velocity drives note color alpha. Per-track FX rack: reverb (convolver IR), delay, lowpass filter, compressor — each togglable, drag to reorder, live param updates rebuild the chain. Master mixer with volumes/mute/solo. Press play. "Export to WAV" runs OfflineAudioContext, writes 16-bit PCM with RIFF header, downloads via Blob.
Why this is mind-blowing
Ableton Live is a $750 program that took 25 years to refine. The core architecture — multi-track timeline, piano roll, FX chain, mixer, WAV export — is here in 2086 lines from one paragraph. Drag a clip, hit play, hear music.
Single-file in-browser DAW. 8 tracks each with synthesized instrument
(saw lead, sub bass, drum kit, FM piano, pad, pluck, noise, FM bell).
Click timeline to drop MIDI clips. Piano roll for note editing. FX rack
per track (reverb, delay, lowpass, compressor). Master mixer. Export
to WAV via OfflineAudioContext.
Paste this into Claude, Cursor, or Copilot. Change one thing that matters to you.
What I learned shipping it
- Web Audio's lookahead scheduler pattern (setTimeout 25ms tick + 150ms scheduling horizon + dedupe via playEpoch ID) is THE canonical architecture. The model knows it from training.
- OfflineAudioContext + manual 16-bit PCM WAV writer (RIFF header + interleaved samples → Blob → download) is the entire export pipeline. ~50 lines.
- Drag-to-reorder FX with full chain rebuild on each change is more honest than parameter automation. You SEE the signal flow.