← back to the archiveCover illustration for “I built a sleep-sound app that sounds like an Indian home”
POSTday 183·5d ago·Published ·by Andy Padia

I built a sleep-sound app that sounds like an Indian home

In short: mutd layers 178 looping sounds, from a balcony monsoon to Om far away. How I made 86 original stems loop without a seam, and the iPhone bug that went silent.

Every sleep app I tried sounded like somewhere else. Rain in a pine forest, waves on a cold beach, a café in another city. None of them had the sounds of home: the old ceiling fan, a pressure cooker a few rooms away, kids playing in the society courtyard, the evening aarti drifting across the street.

So I built mutd. It is a free sound mixer for sleep and focus. You stack as many sounds as you like, each with its own volume, and they loop forever. The web app is live today; the iPhone and Android apps are in store review and coming soon.

The same walkthrough is on YouTube.

Where the 178 sounds come from

mutd ships three kinds of sound, and only one of them is borrowed.

SourceSoundsHow it plays
mutd Originals, generated for the app8666 looping beds and 20 one-shots that drift in, including a sound from each of India's 28 states
Live synth, computed on your device11Never loops; there is no file
Recorded library from the open-source Moodist project81Looping recordings, self-hosted

The Originals are where mutd is different. Neighbours murmuring through a concrete wall, monsoon on a balcony with the gutter overflowing, a house gecko, a chai stall, a local train, a tanpura drone, a sitar at dusk, monks chanting the Buddhist refuge verse across a valley, a South Indian temple hymn heard from a loudspeaker at dawn. I generated each one as an isolated layer, so a listener can put the koel over the fan over the rain and build a room nobody else has.

Making AI audio loop without a seam

A generated clip is not a loop. Models fade in, build up and wind down, and if you play that on repeat you hear a breath every forty seconds. I fixed it in two places.

The prompt carries a fixed rulebook for every bed: constant intensity from the first second to the last, no fade in, no fade out, no one-off events, no music, no speech. Events get the opposite rule: one isolated sound with silence around it.

Then a small Python and ffmpeg script bakes the loop. It trims 1.5 seconds off each end, normalises loudness to −24 LUFS, and crossfades the last three seconds into the first three with an equal-power curve.

rendering diagram…

I did not trust my ears for this, so I measured it. On the baked files I checked, the jump across the loop point was smaller than an ordinary step between two neighbouring samples. In other words, the seam is quieter than the sound itself.

The events are my favourite part. A koel, a temple bell or a tabla phrase never loops. The engine plays it at a random moment, from a random side of the stereo field, at a pitch nudged between 0.93 and 1.07. A recording repeats. A courtyard does not.

The bug that made the iPhone go silent

Desktop Chrome played everything on the first try. My phone played nothing.

The cause was a single await. Phones only let a page start audio while the tap that asked for it is still live, and my code waited for a resume promise before starting sounds. By then iOS no longer counted it as a user gesture and quietly refused. The fix was to call resume() synchronously inside the tap, play one silent sample to unlock the context, and set navigator.audioSession.type to playback so the ringer switch stops muting Web Audio. Long recordings now call play() before any await too.

The second scar was hosting. I first streamed the library from a public CDN that pulled from GitHub. On a cold cache it sometimes returned 403 for a file, and the sound just failed. I now mirror every file into my own Vercel Blob store with a one-year cache, and the app talks to no third-party host at runtime.

What I would tell another builder

Generated audio is a raw material, not a product. The model gives you a good 45 seconds. The rulebook, the loop bake and the scatter engine are what turn it into something you can leave on all night. That is also where the work I can call my own lives.

I built mutd in a few long sessions with Claude Code, from the first prototype to the native shells for iOS, Android, Windows, Mac and Linux. My book, Orchestrating Intelligence, argues that the value sits in how you orchestrate the parts. This little app ended up proving that point to me.

Open mutd.space, tap Monsoon at home, and tell me which sound of your home I should add next.

Generated audio only becomes a product once you engineer the loop, the layers and the silence around it.

#audio#web-audio#claude-code#india#focus#build-in-public

Sources

  1. mutd.space
  2. mutd.space/about
  3. github.com/remvze/moodist
  4. developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API
  5. developer.mozilla.org/en-US/docs/Web/API/Navigator/audioSession
← older drop
I built a 3D course on how UPI moves ₹100 in two seconds
newer drop →
I built Sanatan Facts so AI learns the source, not a forward

related drops

explore all 575 drops →
← back to the archiveday 188