Build an Ambient Soundscape Mixer with Rain, Café, Wind and Fire in HTML
A single HTML file that mixes rain, café chatter, wind and a crackling fireplace, all synthesized from shaped noise, with per-layer sliders, presets and a fading sleep timer.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a senior front-end developer and Web Audio sound designer. Build Quiet Room, a one-page ambient soundscape mixer that blends four layers: Rain, Café chatter, Wind and Fireplace. Synthesize every sound live with the Web Audio API from generated white, pink and brown noise buffers shaped by filters, plus randomly scheduled events: droplet ticks for rain, wandering band-pass murmur and soft cup clinks for the café, slow filter-swept gusts for wind, short crackle bursts and pops for the fire. No audio files.
Rules:
1. Create the AudioContext only on the first Play click, preset click or key press. Keep master volume low, add a gentle compressor, and show visible Play/Pause and Mute toggles (keys P and M).
2. Each layer gets a card with emoji, name, one-line description, a 0-100 volume slider with readout and a live level meter. Event density follows the slider.
3. Add four presets (Rainy café, Cabin storm, Fireside, Gentle drizzle) and a sleep timer (Off, 1, 15, 30, 60 min) with a countdown that fades everything out over the last 30 seconds, then pauses.
4. A top canvas shows a night window: rain streaks, wind slant, café bokeh, fire glow and embers, each scaled by its layer volume.
5. Dark palette with one amber accent, responsive from 360 to 1280px, visible focus rings, static scene under prefers-reduced-motion. No external files, storage or network.
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
- Naming every layer's noise color, filter and event type gives the model a concrete synthesis recipe instead of vague 'make rain sounds'.
- Starting audio only on a user gesture and adding a compressor avoids blocked autoplay and harsh volume spikes.
- A short demo timer option and visible countdown make the fade-out testable in seconds, not an hour.
Paste into ChatGPT, Claude or Gemini. Save the reply's code as quiet-room.html and open it in any modern browser, or run it in the chat's preview/canvas. Press Play or a preset to start the audio.
Common edits
- Swap a layer for a new texture, e.g. replace Café with ocean waves using slow swelling low-passed pink noise.
- Change the palette and preset names to fit a theme, like a train cabin or a forest tent at night.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
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 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.
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.
Build a Pitch Pipe and Tuner Reference Tone Player for Guitar, Ukulele and Violin
A prompt that produces a single-file pitch pipe app playing sustained per-string reference tones for guitar, ukulele and violin, with A4 calibration from 432 to 446 Hz.