An AI That Edits the Beat Instead of Describing It

DJ AI: a browser beat studio where the copilot works through typed actions and never hears your audio.

In this case study↓

DJ AI is a browser beat studio where a prompt can edit the sequencer. Ask for fewer hi-hats and you can hear the result immediately, inspect the edited lane, and keep working with the same grid.

At a glance

Timeframe
2026
My role
Design and full-stack engineering
Stack
React 19 · TypeScript · Tone.js · Web Audio · Web Workers · Web MIDI · Claude API
8 × 16drum lanes × steps
6typed actions the AI can take
0 bytesof your audio sent anywhere

The product

The Create tab is a 16-step drum studio. It has eight lanes (kick, snare, clap, hats, open hat, perc, tom and 808), a four-bar chord track, groove controls and a copilot chat. Genre presets (trap, boom bap, house, techno, R&B, drill) give you a starting point, and the density, swing, pocket and energy sliders rewrite the pattern.

DJ AI Create view with drum grid, chord track and copilot
The studio: transport, BPM, swing and key, the fine-tune sliders, the drum grid and the copilot on the right.

The Analyze tab lets you upload a song you own. It measures tempo, key, chords and the energy of each section, and draws a waveform coloured by frequency band, with bass in red, mids in green and highs in blue. Then "Generate beat" writes an original loop in that tempo and key.

DJ AI Analyze view showing BPM 120, A minor and chords
Analysis of a test track I generated at 120 BPM in A minor with an Am–F–C–G progression. DJ AI recovered all three, in the browser, from the audio alone.

Giving the model six editing actions

The copilot returns a short explanation and a list of structured edits. A change to the drum pattern can target a single lane while keeping the rest of the beat intact.

You"make this more trap"
→
Claudeproject state + music knowledge base
→
ActionssetBpm · setSwing · setKey · setPattern · setProgression · setFx
→
Normalizebound knob values, check step indices, fit four chords
→
Gridchanges you can hear straight away

Every change the AI makes goes through the same typed actions you could make by hand.

The client clamps tempo and swing, ignores out-of-range step indices, and pads or trims progressions to four chords. Its runtime type guard checks action names. A full payload schema would make malformed model responses easier to reject explicitly.

Audio never leaves the browser

Audio analysis runs in a Web Worker. It tries Essentia.js for tempo and key, with a local analysis routine supplying features such as chords and section energy and serving as the fallback. The AI request sends project state and derived track measurements. The audio samples go to the worker in the browser.

It never hears your track. It only reads the measurements.

The prompt also sets firm rules: original patterns only, never a recreation of a copyrighted recording, and never claim to have heard the audio.

From browser to DAW

A beat that stays in a browser tab isn't much use to a producer. DJ AI can send its patterns over Web MIDI, so the grid can drive drums in a real DAW.

What I’d test next

The test track in the screenshot is a useful smoke test with a known answer. To understand reliability, I’d separately test half- and double-tempo errors, tracks with changing keys, and whether natural-language edits modify the requested lane without changing unrelated controls.

Keep reading

View all