Build a Generative Ambient Chime Toy With Pentatonic Notes in One HTML File
A ready-to-paste prompt that builds a calm ambient music toy where every tap drops a glowing, drifting ripple and a pentatonic chime, with an auto-play mode.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a creative front-end developer and sound designer. Build Tidepool Chimes, a generative ambient music toy set in a dark, glowing tide pool. Every click or tap drops a chime into the water. Each chime is a soft bell tone synthesized with the Web Audio API, paired with a glowing ripple that expands, fades and drifts slowly upward on a full-window canvas.
Rules:
1. Snap pitch to an A minor pentatonic scale across three octaves (15 horizontal lanes). Higher on screen means higher pitch, and left-right position sets stereo pan, so every tap sounds pleasant.
2. Build each chime from two sine oscillators with exponential decay plus a gentle feedback delay. Create the AudioContext on the first click, tap or key press, keep master volume low, and include a visible mute button.
3. Add an Auto-play toggle that wanders the scale in small steps at relaxed, irregular intervals. Dragging strums across lanes.
4. Keyboard: keys 1-9 play notes from low to high, Space toggles auto-play, M mutes.
5. Use a deep navy background, teal-to-violet note colors, faint lane lines and drifting motes. Add a small info panel with the title, instructions and buttons. Respect prefers-reduced-motion by shrinking ripples and stopping drift.
6. Use no external files, fonts, libraries, storage or alerts. The canvas resizes with the window from 360 to 1280px.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.Example output
Tips and common edits
Why this works
- Locking every note to a pentatonic scale removes clashing intervals, so random taps and auto-play always sound calm.
- Two decaying sine partials plus a filtered feedback delay give a bell-like shimmer without any audio files.
- Lanes, a visible panel and keyboard shortcuts make the toy obvious on first load across mouse, touch and keys.
Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as tidepool-chimes.html and open it in any browser, or use the chat's preview/canvas. Tap once to start the sound.
Common edits
- Swap the scale steps (e.g. 0,2,4,7,9 for major pentatonic) or change the base frequency to retune the whole pool.
- Change auto-play timing or ripple colors and size for a slower, sleepier mood or a brighter, busier one.
Keep exploring
More like this
Build a Theremin-Style Pointer Instrument with Live Waveform in One HTML File
A ready-to-paste prompt that builds a canvas theremin. Horizontal motion sets pitch, vertical motion sets volume, notes can snap to a scale, and a live oscilloscope trace shows the sound.
Build a 16-Step Drum Sequencer with Tempo and Swing in One HTML File
A ready-to-paste prompt that makes an AI build a clickable 16-step drum machine with synthesized drums, preset grooves, tempo, swing and a moving playhead.
Build a Classroom Game Show Buzzer Board with Timer Sounds in HTML
A prompt that builds a single HTML quiz-night console with four colored team buzzers, correct and wrong sounds, scoring, and a ticking countdown that ends in a horn.
Build a Four-Lane Rhythm Tap Game with a Synthesized Beat in One HTML File
A ready-to-paste prompt that builds an original four-lane rhythm game with a Web Audio backing loop, Perfect/Good/Miss timing judgments, combos, and keyboard plus touch lanes.
Build a Guided Breathing Exercise App with Soft Rising Tones in One HTML File
A prompt that produces a single-file breathing guide with box, 4-7-8 and coherent patterns, an expanding circle and gentle synthesized sine swells.
Build a Piano Interval Ear-Training Quiz with Streak Scoring in One HTML File
A one-file interval ear trainer that plays two synthesized piano notes, gives four multiple-choice answers, tracks streaks and shows the answer on a keyboard.