oneshotlm
Compare all models on this prompt →

Piano synth · llama-4-scout

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.

⚠ no runnable output

This one-shot run produced no runnable artifact.

agent produced no index.html

The transcript below shows what the model did — read it to see why the one shot fell short.

transcript · 2 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

[write(index.html, <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Piano Keyboard</title> <style> /* Add some basic styling to our piano keyboard */ .piano-keyboard { display: flex; flex-wrap: wrap; width: 800px; margin: 40px auto; } .piano-key { width: 40px; height: 200px; border: 1px solid black; border-radius: 5px; margin: 5px; position: relative; cursor: pointer; } .piano-key.active { background-color: #ccc; } .piano-key span { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: 12px; } </style> </head> <body> <div class="piano-keyboard" id="piano-keyboard"></div> <script src="tone.min.js"></script> <script> // Create the piano keyboard const keyboard = document.getElementById('piano-keyboard'); const notes = ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4', 'C5']; const keys = []; notes.forEach((note, index) => { const key = document.createElement('div'); key.classList.add('piano-key'); key.dataset.note = note; key.innerHTML = '<span>' + note + '</span>'; keyboard.appendChild(key); keys.push(key); }); // Initialize Tone.js let synth; let playing = {}; // Function to play a note function playNote(note) { if (synth) { synth.triggerAttackRelease(note, '8n'); } } // Function to stop a note function stopNote(note) { if (synth) { synth.triggerRelease(); } } // Create a synth with an ADSR envelope synth = new Tone.Synth().toDestination(); synth.envelope.attack = 0.1; synth.envelope.decay = 0.5; synth.envelope.sustain = 0.5; synth.envelope.release = 1; // Add event listeners to the keys keys.forEach((key) => { key.addEventListener('mousedown', () => { playNote(key.dataset.note); key.classList.add('active'); }); key.addEventListener('mouseup', () => { stopNote(key.dataset.note); key.classList.remove('active'); }); }); // Add event listeners for keyboard input document.addEventListener('keydown', (e) => { switch (e.key) { case 'a': playNote('C4'); keys[0].classList.add('active'); break; case 's': playNote('D4'); keys[1].classList.add('active'); break; case 'd': playNote('E4'); keys[2].classList.add('active'); break; case 'f': playNote('F4'); keys[3].classList.add('active'); break; case 'g': playNote('G4'); keys[4].classList.add('active'); break; case 'h': playNote('A4'); keys[5].classList.add('active'); break; case 'j': playNote('B4'); keys[6].classList.add('active'); break; case 'k': playNote('C5'); keys[7].classList.add('active'); break; } }); document.addEventListener('keyup', (e) => { switch (e.key) { case 'a': keys[0].classList.remove('active'); break; case 's': keys[1].classList.remove('active'); break; case 'd': keys[2].classList.remove('active'); break; case 'f': keys[3].classList.remove('active'); break; case 'g': keys[4].classList.remove('active'); break; case 'h': keys[5].classList.remove('active'); break; case 'j': keys[6].classList.remove('active'); break; case 'k': keys[7].classList.remove('active'); break; } }); </script> </body> </html> )]

TAKE IT TO CODE

This run produced no artifact — reuse the prompt with a different model or your own pi-agent run.

RUN

modelllama-4-scout
vendorMeta · Llama
harnesspi-agent
generated2026-08-01

METRICS

runtime9.7s
tokens in1.5k
tokens out1.3k
cached0
cost / run$0.0005