oneshotlm
Compare all models on this prompt →

Piano synth · glm-5.3

Output generated Cost / run $0.0232 Runtime 56.0s

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

modelglm-5.3
vendorZ.ai · GLM
harnesspi-agent
generated2026-08-27

METRICS

runtime56.0s
tokens in13k
tokens out3.5k
cached9.0k
cost / run$0.0232
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 -la /tmp/job-e7hV4W"}
toolResult

total 356 drwx------ 2 node node 4096 Aug 27 00:50 . drwxrwxrwt 4 root root 4096 Aug 27 00:50 .. -rw-r--r-- 1 node node 1089 Aug 27 00:50 events.jsonl -rw-r--r-- 1 node node 349169 Aug 27 00:50 tone.min.js

assistant
→ write index.html (9872 bytes)
toolResult

Successfully wrote 9872 bytes to index.html

assistant
→ bash {"command":"ls /tmp/job-e7hV4W && node -e \"\nconst fs=require('fs');const h=fs.readFileSync('/tmp/job-e7hV4W/index.html','utf8');\nconsole.
toolResult

events.jsonl index.html tone.min.js tone ref: true no CDN: true

assistant

Done — `index.html` is ready. Features: - **Keyboard**: C4–E5 with properly positioned white/black keys and labels showing both note names and computer keys (Z S X D C V G B H N J M , / and Q..P for the upper octave). - **Sound**: Tone.js `PolySynth` (triangle default) with adjustable **ADSR envelope** sliders (attack, decay, sustain, release), waveform selector, volume, plus a touch of reverb. - **Input**: Click/drag across keys (glissando via pointer capture), computer keyboard with key-repeat handling, and a "Start Audio" button to satisfy browser autoplay policies. - **Feedback**: Keys highlight (blue glow) while active, and stuck notes are cleaned up on window blur. Just open `index.html` in a browser — it loads the local `tone.min.js` and needs no network.