Skip to main content

NoiseLayers: Ambient Sound Mixer and Sound Guide Website

NoiseLayers is a free sound mixer that runs in the browser. You tap rain, a fan, brown noise or a café, set each sound’s volume and leave the mix playing for hours, for work or for sleep. I built it for myself first: background videos on YouTube came with ads, and short loops clicked at the seam until I caught myself waiting for the click. Around the mixer I built noiselayers.com, a guide site that explains each sound, plays it on the page and links to the research behind it.

NoiseLayers home page: the headline «Background noise for focus and sleep», a playable Rain + brown noise mix and buttons for single sounds

NoiseLayers Project at a Glance

Product

My own product, from the first line of code: the mixer app, the audio pipeline, accounts, the WordPress site, the server and the release process.

Scope

A mixer with 73 sounds, saved boards, share links, a sleep timer and an installable app; a WordPress site with 50 pages, 39 of them sound guides with a built-in player; media delivery through Cloudflare R2; automated tests and releases.

Stack

React 19, Vite 8, Web Audio API, Supabase (PostgreSQL with row-level security, Auth, Realtime, Edge Functions), WordPress 7.1 with YOOtheme Pro and a custom plugin, GSAP, Cloudflare R2, GitHub Actions and Puppeteer.

Scale

158 minutes of audio in 73 recordings of up to 14 minutes each, 196 MB in all. Rain now starts 0.4–0.6 s after a tap; before the rework it took 65 s on a first visit.

What the NoiseLayers Project Required

A sound mixer is easy to start and hard to keep running for a whole night. The recordings are long on purpose: on a 15-second loop the ear hears the repeat within minutes. Long files, though, are heavy, and the first version loaded all of them before playing anything.

By November 2026 the mixer worked, but not for a stranger opening it for the first time:

  • A first visitor in Europe waited 60–80 seconds after tapping rain, and more than 90 seconds for an 11 MB recording. The files travelled from a server in the US across a route that lost up to a quarter of its packets.
  • Opening the page downloaded all 15 sounds on the board, 29 MB, before the visitor tapped anything, and kept about 550 MB of decoded audio in memory.
  • The sleep timer counted timer ticks rather than time. A phone slows timers in the background, so «30 minutes» could last for hours.
  • Loops restarted with an audible seam, and sounds came at very different loudness, so every new layer meant reaching for the slider.
  • There was no marketing site yet, no staging, no tests and no backups, and the database for accounts had been paused by the free plan.

The goal was simple to state: any sound starts fast anywhere in the world, plays all night on a locked phone, and costs close to nothing to deliver.

What I Built for NoiseLayers

Media delivery through Cloudflare R2

The recordings moved out of the code repository and off the web server. A build script gives every file a name based on its content, measures it (duration, samples, loudness) and writes a manifest. The files are served from media.noiselayers.com on Cloudflare R2 and cached for a year, because a file at a given address never changes. Delivery has no traffic fees.

Sounds that load only when they play

Nothing is downloaded when the page opens. A sound is fetched the moment it is tapped, so opening the mixer costs 0 bytes of audio instead of 29 MB.

Seamless loops

A few seconds before a recording ends, a second copy starts from the beginning and the two swap along equal-power curves, so the level never dips and there is no click. All swaps are scheduled ahead on the audio clock, 20 minutes at a time, so they keep happening when a locked phone freezes the page. Pure tones such as binaural beats use an exact loop instead, because two overlapping copies would cancel out.

Equal loudness

Every recording’s loudness was measured (LUFS), and the mixer applies a per-sound gain. At the same slider position, a fan and a thunderstorm play at the same level.

A sleep timer that counts real time

The timer stores the moment it should end, not a number of ticks, and checks again when the tab comes back. Tested by moving the clock forward: the sound stopped at the right moment.

Accounts, boards and share links

Sign-in with Google, an email link or as a guest. Boards and saved mixes sync between devices through Supabase, with row-level security on every table. A mix can be shared as a short link, and a live counter shows how many people are listening right now. Users can delete their account and all their data themselves.

The website: noiselayers.com

A WordPress site on YOOtheme Pro with my own plugin on top:

  • 39 sound guides on one template: a short answer, a player with the page’s own sound, key facts, what the sound suits and what it does not, the article, FAQ, sources and the author.
  • Spectrum charts drawn from the actual files that play in the mixer, not from textbook curves.
  • A home page with a playable hero whose wave reacts to the sound, a mini mixer, a scroll story through the five noise colours, and a «what wakes you is change» chart of how steady each sound is (loudness range, in LU).
  • A sound engine on every page: press play in a guide or in the footer and a «now playing» bar follows you between pages.
  • Structured data for search (Organization, Article, Person, breadcrumbs; ProfilePage for the author), redirects for merged pages, and consent-based analytics (GA4 with Consent Mode v2).
The mixer inside the site

The mixer has three embed modes: a full player, a compact WordPress player and small previews, several per page. The site and the mixer talk through messages that are accepted only from the mixer’s own origin.

Releases, tests and operations
  • Every push runs lint, a check that every media file in the manifest exists on the CDN, a build and browser tests in headless Chrome: no audio on page open, a tap plays, embeds work, sign-in, live presence and short links answer.
  • A push to the main branch deploys to a staging copy; a version tag deploys the same tested build to production. Rolling back is re-running an older tag.
  • Cloudflare cache rules, CORS and DNS records are kept as code. The server got BBR congestion control, security headers and daily backups of the site files, the WordPress database and the account data.

How NoiseLayers Works

  1. Build. Source recordings live outside the code. media:build names each file by its content hash, measures it and writes the manifest; media:upload sends only new files to R2, and the originals are backed up in a private bucket.
  2. Open. The mixer page loads the interface only. Backgrounds and sounds come from the CDN when they are needed.
  3. Tap. The sound is fetched from the nearest Cloudflare location, decoded and started with its measured gain and its loop crossfade.
  4. Leave it running. Loop swaps are already scheduled on the audio clock, 20 minutes ahead, so they do not depend on the page’s JavaScript being awake.
  5. Save or share. A signed-in user’s boards sync through Supabase; a share link opens the same mix for anyone, without an account.

NoiseLayers Results

Measured in headless Chrome and with curl from Italy.

Measurement Before (28 Nov 2026) After (1 Dec 2026)
Tap → sound, rain (1.3 MB) 65 s 0.4–0.6 s
Tap → sound, owls (1 MB) 64.6 s 0.7 s
Tap → sound, whale song (11 MB) more than 90 s 3.6–3.9 s
Full download of the 11 MB file more than 90 s 1.1 s
Audio downloaded when the page opens 29 MB (15 files) 0
Server packets resent (TCP) 2.57% 1.16%
Code repository size 516 MB (media inside) 560 KB

Before: a first visit with the CDN cache forced to miss, with the old engine. After: the same full download and decode, with media served from Cloudflare R2.

The site went live on 30 November 2026 and is open for indexing.

Built, Not Yet Public

A paid plan is built and tested but hidden until launch: Stripe billing through Supabase Edge Functions, a mix rendered in the browser to an MP3 of 1–10 hours (several workers encode parts of the timeline in parallel and the parts are joined frame-exactly, nothing is uploaded), Pomodoro focus sessions, and a slow sleep fade with a gentle wake-up.

NoiseLayers Screens

Screenshots of the live site and the mixer, taken on 1 December 2026: on a computer in the first row, on a phone below.

NoiseLayers home page on a computer: headline, a playable mix and single sounds

The first screen of noiselayers.com: a playable hero, a ready mix and single sounds to try.

NoiseLayers mixer on a computer: a board of 15 sounds and the control bar

The default board of 15 sounds and the control bar.

NoiseLayers mixer playing rain, thunder and fire, each with its own volume, over a fire background

Rain, thunder and fire layered, each with its own volume, over the background of the last sound tapped.

NoiseLayers home page on a phone: headline, mix button and sound buttons

The same first screen at phone width.

NoiseLayers mixer on a phone: a list of 15 sounds with a volume slider each

On a phone the board becomes a list with a slider for each sound.

NoiseLayers mixer on a phone with rain, thunder and fire switched on

Rain, thunder and fire playing, highlighted at the top of the list.

Need an App That Has to Work All Night?

Describe your project in the brief and receive a written proposal.