oneshotlm
Compare all models on this prompt →

Piano synth · mercury-2

Output generated Cost / run $0.0032 Runtime 5.1s

Prompt for this run

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 ↗

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

modelmercury-2
vendorInception
harnesspi-agent
generated2026-08-01

METRICS

runtime5.1s
tokens in9.9k
tokens out2.0k
cached3.5k
cost / run$0.0032
Transcript · 8 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
→ bash {"command":"ls -1"}
toolResult

tone.min.js

assistant
→ write index.html (4079 bytes)
toolResult

Successfully wrote 4079 bytes to index.html

assistant
→ bash {"command":"ls -l"}
toolResult

total 348 -rw-r--r--. 1 node node 4079 Aug 1 20:28 index.html -rw-r--r--. 1 node node 349169 Aug 1 20:28 tone.min.js

assistant

The **index.html** file has been created, loading the provided **tone.min.js** and implementing a playable piano keyboard: - White and black keys are rendered with CSS. - Mouse clicks and computer keyboard keys trigger notes. - Uses a **Tone.PolySynth** with an ADSR envelope for sound synthesis. - Visual feedback highlights pressed keys. You can open `index.html` in a browser (offline) and play the piano.