oneshotlm
Compare all models on this prompt →

Piano synth · gemini-3.1-flash-lite

Using the pre-provided tone.min.js (global Tone), build a playable piano keyboard controlled by mouse and computer keys that synthesizes notes with an ADSR envelope and visual key feedback.

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

Using the pre-provided tone.min.js (global Tone), build a playable piano keyboard controlled by mouse and computer keys that synthesizes notes with an ADSR envelope and visual key feedback.

assistant
thinking
**Building Interactive Piano**

I'm focusing on integrating `Tone.js` directly within a single HTML file. My current work involves setting up the synthesizer and ADSR envelope, aiming for immediate visual feedback tied to key presses.

**Developing Piano Keys**

I'm currently structuring the HTML for the piano keys and styling them with CSS using Flexbox. The JavaScript is being developed to handle user input, mapping keyboard and mouse events to trigger notes via `Tone.PolySynth`. My aim is to implement audio context resumption after a user gesture and define the initial set of notes.

bash {"command":"ls -l tone.min.js"}
toolResult

-rw-r--r-- 1 node node 349169 Jul 22 17:51 tone.min.js

assistant
write index.html (3629 bytes)
toolResult

Successfully wrote 3629 bytes to index.html

assistant

This self-contained `index.html` file uses the provided `tone.min.js` to create a playable piano interface. It features: * **Audio Synthesis**: Uses `Tone.PolySynth` with a triangle oscillator and defined ADSR (Attack, Decay, Sustain, Release) settings. * **Keyboard Control**: Maps computer keyboard keys (A, W, S, E, D, F, T, G, Y, H, U, J, K) to specific notes starting from C4. * **Mouse Interaction**: Click and drag on the on-screen keys to play notes. * **Visual Feedback**: Keys highlight when pressed. * **Browser Readiness**: Includes a "Start Audio" button to comply with modern browser policies regarding audio context initialization. You can now open `index.html` in your browser to play.

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

modelgemini-3.1-flash-lite
vendorGoogle
harnesspi-agent
generated2026-07-22

EVALUATION

2/5 partial

Piano keyboard renders with key labels but shows no visible key-press feedback or change after any tested input.

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 + space4.0%
on arrow keys4.0%
on w/a/s/d0.0%
frame spread43.9 / 255
console errors0
js errors none

METRICS

runtime12.1s
tokens in6.4k
tokens out2.1k
cached0
cost / run$0.0047