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.
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
METRICS
Transcript · 8 messages
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.
{"command":"ls -1"}tone.min.js
index.html (4079 bytes)Successfully wrote 4079 bytes to index.html
{"command":"ls -l"}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
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.