oneshotlm
Compare all models on this prompt →

Drum machine · claude-opus-4.8

Build a 16-step drum machine with a clickable grid for kick, snare, hi-hat, and clap, all sounds synthesized with the Web Audio API, plus play/stop and an adjustable BPM.

⛨ sandboxed Open in new tab ↗
transcript · 6 messages
user

Build a 16-step drum machine with a clickable grid for kick, snare, hi-hat, and clap, all sounds synthesized with the Web Audio API, plus play/stop and an adjustable BPM.

assistant
thinking
I'm going to create a drum machine as a single HTML file.

I'll build a 16-step drum machine as a self-contained index.html with Web Audio synthesized sounds.

write /workspace/index.html (9133 bytes)
toolResult

Successfully wrote 9133 bytes to /workspace/index.html

assistant
bash {"command":"cd /workspace && node -e \"const fs=require('fs');const h=fs.readFileSync('index.html','utf8');console.log('script tags:',(h.mat
toolResult

script tags: 1 style tags: 1 has fetch/http: false

assistant

Done. `index.html` is a complete, self-contained 16-step drum machine. **Features:** - **4 tracks** (Kick, Snare, Hi-Hat, Clap) × 16 steps in a clickable grid — click any cell to toggle it. - **All sounds synthesized** with the Web Audio API: - Kick: pitch-swept sine oscillator - Snare: high-passed noise + tonal triangle - Hi-Hat: high-passed noise burst - Clap: bandpassed noise with multi-burst envelope - **Play/Stop** button and a **BPM slider** (50–200) with live value readout. - **Clear** button to reset the pattern. - Uses a look-ahead scheduler for tight, drift-free timing, with a moving playhead highlight synced to audio time via `requestAnimationFrame`. - Beat-emphasis coloring (every 4th step tinted) and animated cells. No external resources, CDNs, or network calls — runs fully sandboxed. Open it in any browser and start clicking.

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelclaude-opus-4.8
vendorAnthropic · Claude
harnesspi-agent
generated2026-07-08

EVALUATION

3/5 partial

Drum machine grid with play/clear/BPM renders and steps appear to cycle, but click/drag/wheel/keys show no distinct interaction change.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion0.0%
on click0.0%
on drag0.0%
on wheel0.0%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread10 / 255
console errors0
js errors none

METRICS

runtime53.6s
tokens in8.8k
tokens out4.9k
cached6.9k
cost / run$0.1707