oneshotlm
Compare all models on this prompt →

Drum machine · hy3-preview

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 · 4 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

I'll build a fully self-contained drum machine with synthesized sounds using Web Audio API. Let me create this step by step.

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

Successfully wrote 15588 bytes to /workspace/index.html

assistant

The drum machine is complete! Here's what I built in `/workspace/index.html`: **Features:** - **16-step grid** with 4 tracks: Kick, Snare, Hi-Hat, and Clap - **All sounds synthesized** with Web Audio API (no samples needed): - Kick: Sine oscillator with pitch envelope - Snare: Filtered noise + tonal oscillator - Hi-Hat: High-passed noise through bandpass filter - Clap: Multiple layered noise bursts - **Play/Stop** button (also toggles with Spacebar) - **BPM slider** (60-180 BPM) with real-time display - **Clear button** to reset the pattern - **Volume sliders** for each sound - **Visual feedback**: active steps highlighted by track color, current step indicator with glowing dots and playing step highlight - **Beat markers** on step numbers (1, 5, 9, 13) to show measure boundaries - **Clickable grid** to toggle steps on/off **Design:** - Dark gradient theme with cyan accents - Color-coded tracks (red, teal, yellow, green) - Fully responsive and self-contained in one HTML file - No external resources - works offline Open `index.html` in a browser to start making beats!

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

modelhy3-preview
vendorTencent · Hunyuan
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

16-step drum machine with kick/snare/hi-hat/clap grid, play/stop, BPM slider, and step highlighting responds to clicks and keys.

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.1%
on drag0.2%
on wheel0.0%
on enter + space1.8%
on arrow keys0.0%
on w/a/s/d0.6%
frame spread15.1 / 255
console errors0
js errors none

METRICS

runtime45.0s
tokens in4.9k
tokens out5.3k
cached3.1k
cost / run$0.0015