Soundscape Mixer
Soundscape Mixer (hereinafter the “Application”) is a free web app for mixing ambience, such as a tavern, a forest or a storm, to focus to or to play tabletop sessions over. You switch sounds on, set how loud each one is, and the Application plays them together.
1. User Documentation
Section titled “1. User Documentation”The live instance is available at https://soundscape.spellware.dev.
Playing Sound
Section titled “Playing Sound”- Open the page. Nothing plays yet, because browsers only allow sound after you interact with a page.
- Select a scene, or move the volume slider of any sound up from zero. Either one starts playback.
- Adjust the sounds to taste. Changes are heard at once.
- Select Pause to stop everything, and Play to carry on.
Select Switch everything off to silence every sound but keep your master volume.
The Sounds
Section titled “The Sounds”There are 60 sounds in seven categories. Each has its own volume slider.
| Category | Sounds |
|---|---|
| Tavern | Quiet murmur, busy hall, next room, clinking tankards, mugs on wood, lute, tin whistle, creaking door, footsteps, crowd cheer |
| Forest | Birdsong, cuckoo, owl, crickets, cicadas, frogs, rustling leaves, woodpecker, wolf howl, crows |
| Storm and weather | Light rain, steady rain, downpour, rain on a roof, rain on leaves, breeze, howling gale, blizzard, hail, distant thunder, thunderclaps |
| Water | Babbling stream, wide river, waterfall, ocean waves, lapping lake, seagulls |
| Fire | Campfire, hearth, roaring bonfire, torch flame |
| Dungeon and arcane | Cave drone, deep rumble, dripping water, whispers, rattling chains, tolling bell, wind chimes, arcane hum, singing bowl |
| Focus | White noise, pink noise, brown noise, desk fan, starship hum, ticking clock, page turns, ambient pad, music box, harp |
A card is marked Loop, Random or Music:
| Kind | What it does |
|---|---|
| Loop | Plays continuously, such as rain or a crowd |
| Random | Fires now and then, such as thunder or an owl. A second slider, How often, makes it rarer or more frequent |
| Music | Plays short phrases made up as it goes, such as the lute, the tin whistle and the harp. How often sets the gap between phrases |
Use the search box to find a sound by name, and tick Only sounds that are on to see just the ones you are using.
Scenes
Section titled “Scenes”A scene is a ready-made mix. Selecting one sets every sound and leaves your master volume alone. There are 14 built-in scenes:
| Key | Scene |
|---|---|
| 1 | Busy tavern |
| 2 | Quiet inn by the fire |
| 3 | Thunderstorm camp |
| 4 | Misty forest dawn |
| 5 | Night in the woods |
| 6 | Seaside cliffs |
| 7 | Dungeon crawl |
| 8 | Haunted manor |
| 9 | Deep focus |
| None | Rainy library, Wizard’s study, Blizzard camp, Riverside camp and Starship bridge |
To keep your own mix, type a name and select Save scene. Saving a scene with the same name replaces it. Saved scenes appear under Your scenes, and each has a Delete button.
Sharing a Mix
Section titled “Sharing a Mix”Select Copy share link. Anyone who opens the link hears the same mix, with the same volumes and the same How often settings. The mix is carried in the part of the address after the #, so it is never sent to a server.
Master Volume, Mute and the Sleep Timer
Section titled “Master Volume, Mute and the Sleep Timer”The master slider changes the overall volume, and Mute silences everything without changing your mix. The sleep timer can be set to 15, 30, 45, 60, 90 or 120 minutes. It counts down on the page, fades the sound out over the last 30 seconds, and then pauses.
Keyboard Shortcuts
Section titled “Keyboard Shortcuts”| Key | Action |
|---|---|
Space | Play or pause, unless a button has focus |
M | Mute or unmute |
[ and ] | Lower and raise the master volume |
1 to 9 | Load a built-in scene |
0 | Switch everything off |
The shortcuts do nothing while you are typing in a box.
Recordings
Section titled “Recordings”Every sound can be synthesised, and 29 of them also have a real recording that plays instead. These are CC0 recordings from Freesound, covering rain, the ocean, fire, crickets, crowds, thunder, owls, wolves, bells, door creaks and more. The author of each one is credited in a file published at https://soundscape.spellware.dev/samples/CREDITS.md.
A recording is only downloaded when you switch its sound on, so the first time takes a moment to start. If it cannot be loaded, the Application plays the synthesised version instead.
Installing and Using Offline
Section titled “Installing and Using Offline”Your browser may offer to install the Application. Once the page has loaded, it works without a connection. Synthesised sounds always work offline. A recording works offline once you have played that sound while online.
I Cannot Hear Anything
Section titled “I Cannot Hear Anything”- Check that the master volume is up, Mute is off and the sound you want is above zero.
- Press Play. Nothing starts until you interact with the page.
- Check that the sleep timer has not already paused playback.
- Check your device volume and that the browser tab is not muted.
2. Technical Documentation
Section titled “2. Technical Documentation”The Application is a static single page app written in TypeScript with Vite and React. There is no server component and no database. Every synthesised sound is generated in the browser with the Web Audio API.
Local Setup
Section titled “Local Setup”pnpm installpnpm dev| Script | Purpose |
|---|---|
pnpm dev | Starts the Vite dev server on port 8002 |
pnpm build | Type checks, then writes the production build to dist/ |
pnpm preview | Serves the production build on port 8002 |
pnpm lint | Runs ESLint with zero warnings allowed |
pnpm test | Runs Vitest with coverage |
Project Layout
Section titled “Project Layout”| Path | Contents |
|---|---|
src/core | The framework free logic: the sound engine, the mix state, scenes, the sleep timer, share links, persistence and the sample loader |
src/core/synth | The building blocks that sounds are made from |
src/core/sounds | The catalogue: one recipe for each of the 60 sounds, grouped by category |
src/ui | The React interface and the hooks that connect it to the engine |
public/samples | The recordings, manifest.json and CREDITS.md |
test | The Vitest suites |
How the Sound Is Made
Section titled “How the Sound Is Made”The sounds are built from a small set of parts: looping noise (white, pink and brown), filters, low frequency oscillators, parameters that drift to random values, one shot tones, bursts of filtered noise, struck bells made from several partials, plucked strings from a Karplus-Strong model, and sung vowels made with formant filters. Crowd chatter is many voices that shift between vowels and pause at random. It is not recorded speech.
The engine owns the audio context and builds a sound only while it is switched on, so an idle sound costs nothing. Every sound feeds a master gain, and that feeds a compressor used as a limiter, so stacking many sounds cannot clip. Each sound has a trim value, set from measured loudness, so that a slider at the same position gives roughly the same loudness whichever sound it controls.
Random and music sounds are scheduled with timers. The How often setting scales the gap between events from four times longer, at 0, to four times shorter, at 100, with 50 leaving it alone. The page also plays a silent clip in a media element, which is what makes the operating system’s media controls appear.
Recordings and the Manifest
Section titled “Recordings and the Manifest”public/samples/manifest.json maps a sound id to its files and a gain:
{ "rain-steady": { "files": ["rain-steady-1.mp3"], "gain": 0.65 }, "owl": { "files": ["owl-1.mp3", "owl-2.mp3"] }}- The Application fetches only the manifest at first play. A sound’s files are downloaded and decoded when that sound is switched on, and kept until the page reloads.
- Until a recording is ready the sound stays silent, so it never starts synthesised and then changes character. If the files fail to load, or take longer than 10 seconds, the sound falls back to synthesis. A recording that arrives late is still used.
- A loop sound loops its first file, so it must be a seamless loop. A random or music sound plays one of its files each time it fires.
- The
gainmatches a recording to the loudness of the synthesised sound it replaces. Entries for unknown sound ids, and files that fail to load, are ignored. - Use MP3, because Safari cannot play Ogg Vorbis. Delete
manifest.jsonto use fully synthesised sound.
Browser Storage
Section titled “Browser Storage”The Application keeps two values in the browser’s local storage. Nothing is sent to a server by the Application itself.
| Key | Holds |
|---|---|
soundscape.mix | Your current mix, as text such as m=70&s=rain-steady:60:50 |
soundscape.scenes | The scenes you have saved |
Hosting
Section titled “Hosting”pnpm build writes a static site to dist/. nginx serves that directory at soundscape.spellware.dev, as configured in the nginx-configs repository. The page, the service worker and the manifest are sent with Cache-Control: no-cache, the content hashed files in assets/ are cached for a year, and the recordings in samples/ are cached for a day. An unknown path returns a 404 and is sent to the company 404 page.
The service worker precaches the application shell, and caches recordings and the shared SpellWare assets as they are fetched.
Shared Headers
Section titled “Shared Headers”index.html loads the shared SpellWare headers script from https://cdn.spellware.dev/headers/index.js, with no features excluded. It adds the SpellWare header and footer, the page metadata and icons, the community popup, and the services listed in the legal section below. The Application’s own styles use the shared design tokens, with a fallback for each, so that the page still looks right if the script cannot load. The Application sits inside <main>, which the script turns into the page card. The page title beside the logo is taken from the document title.
3. Legal Documentation
Section titled “3. Legal Documentation”The Application inherits SpellWare’s global legal documents:
- Privacy Policy: https://docs.spellware.dev/#/privacy
- Terms of Service: https://docs.spellware.dev/#/terms
- License: https://docs.spellware.dev/#/license
Data the Application Keeps
Section titled “Data the Application Keeps”The Application has no accounts and no server side storage. It keeps two values, in your own browser:
| Data | Kept |
|---|---|
| Your current mix | In your browser’s local storage, so that the page opens as you left it |
| Your saved scenes | In your browser’s local storage, until you delete them or clear your site data |
A share link holds a mix in the part of the address after the #, which browsers never send to a server. All sound is made or decoded in your browser.
Recordings
Section titled “Recordings”The recordings are dedicated to the public domain under Creative Commons Zero 1.0. Each one was checked on its own Freesound page, and the authors are credited in samples/CREDITS.md even though CC0 does not require it.
Services Loaded by the Shared Headers
Section titled “Services Loaded by the Shared Headers”Like our other websites, the page loads the shared SpellWare headers script, which loads the following services. A consent banner asks for your choices. Their use of your data is covered by the Privacy Policy and by each provider’s own terms.
| Service | Purpose |
|---|---|
| Secure Privacy | The cookie consent banner |
| Google Analytics | Measuring how the site is used |
| HubSpot | Site tracking and the chat widget |
| Google AdSense | Advertising |
| Tree-Nation | The tree planting widget in the footer |
4. Contributing Documentation
Section titled “4. Contributing Documentation”The Application’s repository is private, and it does not accept code contributions. Feedback and bug reports are welcome in the #bug-reports and #feature-requests forum channels in our Discord community.
Development Setup
Section titled “Development Setup”For maintainers, the project uses:
- TypeScript with the shared ESLint and TypeScript configs, and a zero warnings policy.
- Vitest for tests, with 100% coverage enforced on
src/core. - pnpm for package management.
pnpm installpnpm lintpnpm testpnpm buildAdding a Sound
Section titled “Adding a Sound”- Write the recipe in the right file in
src/core/sounds, using the parts insrc/core/synth, and add it to that file’s list. Give it a unique id in lower case with hyphens. - Set its
trimso that it is as loud as the others. Render it and measure its loudness rather than guessing. - Run
pnpm test. The catalogue tests build every sound with several random number sources and check the metadata, so a recipe that throws or has no summary fails. - Add it to a scene in
src/core/presets.tsif it belongs in one. The tests check that every scene only uses sounds that exist.
Adding a Recording
Section titled “Adding a Recording”- Use a CC0 recording, and confirm the licence on the source page. Credit its author in
public/samples/CREDITS.md. - Convert it to mono MP3. For a loop, crossfade the end into the start so that it loops without a click, and check the seam.
- Normalise the loudness, then list it in
manifest.jsonwith againthat matches the sound it replaces.