Learn · The guide
How mutd's sounds work: ambient stems, loops and scattered events
By Anand “Andy” Padia · 30 November 2026 · 12 min read
In short
- A stem is one isolated layer of sound. mutd mixes them live, so you choose what plays and how loud.
- Beds loop seamlessly; events are single sounds scattered at random times, positions and pitches.
- You can make your own with any audio model and ffmpeg. Steps and a sourced model comparison below.
mutd has 373 sounds today: 221 mutd Originals I made for the app, 11 that are synthesised live on your device, and 141 recordings from the open-source Moodist library. None of them is a finished track. Each is a stem, and the player in mutd is a mixer that stacks them. This guide explains how that works, from the prompt that makes a stem to the line of code that decides when a koel calls.
What a stem is
In music production a stem is one part of a mix, exported on its own: the drums, the bass, the vocal. In ambient sound it is one source: rain on a tin roof, a ceiling fan, a temple bell. A stem has no other sounds mixed into it, so you can raise, lower or remove it without touching anything else.
mutd uses two kinds:
- A bed is continuous. Rain, wind, cicadas, a tanpura drone. It should sound the same at second 5 as at second 50, and it loops forever.
- An event is a single sound with silence around it. A koel call, a cooker whistle, a conch. It never loops; the app plays it again after a random wait.
The difference matters because the ear treats them differently. You stop noticing a steady bed after a minute. You notice every event, so if an event repeats on a fixed beat you hear the loop at once. Beds and events goes deeper.
Why stems beat finished tracks for a mixer
A one-hour “rain and fan” video is a finished track. It is fine until you want any of these:
- Your own balance. More fan, less rain. With stems that is two sliders; with a track it is impossible.
- Combinations nobody recorded. Om chanted far away over Kerala backwaters with a temple bell now and then. Stems let 373 sounds make more mixes than anyone could render.
- No audible loop. A long track still loops, and the seam is a fixed moment you learn to wait for. Short beds that loop seamlessly, plus events at random times, never line up the same way twice.
- Small downloads. A 39-second bed in mutd is about 305 KB. An hour of stereo audio is tens of megabytes.
The cost is that every stem has to be clean: no fade at either end, no stray sounds, a loop point you cannot hear. The rest of this guide is about meeting that standard.
Hear it first: Monsoon at home is two beds (balcony rain, an old fan) and two events (a koel, a dripping tap).
Browse moodsHow I generate mutd Originals
Every Original starts as one entry in audio/stems.json: an id, a label, a kind (bed or event), a target length and a one-sentence subject, such as “Heavy monsoon rain drumming on a corrugated tin roof, heard from the room below, dense metallic patter.” The prompt sent to the model is that subject plus one of three fixed rules from the same file:
Continuous steady ambient texture with constant intensity from the first second to the last, evenly dense throughout, no fade in, no fade out, no build-up, no distinct one-off events, no music, no speech, recorded as a seamless ambient loop.A single isolated sound, clean and close, with silence before and after, no background ambience, no music, no speech, natural short tail.Meditative and continuous from the very first second to the last: no intro, no ending, no fade in or out, no build-up, steady intensity throughout, recorded far away in a large reverberant space so it sits softly in the background.I generate through Higgsfield. Music beds (the tanpura, sitar alaap, the folk instruments in the India by state set) use elevenlabs_music_v2_5. Ambience and sound effects use mirelo_text_to_audio. I keep the rules separate from the subjects so I can change a rule once and regenerate everything that uses it. Prompting for no-fade ambience explains each clause.
Baking the loop
Models do not follow “no fade in” perfectly, so every raw file goes through scripts/process-stems.py. For a bed it does three things:
- trimmed off each end, where models fade
- 1.5 strimmed off each end, where models fade
- LUFS: every bed at the same loudness
- −24LUFS: every bed at the same loudness
- equal-power crossfade, tail into head
- 3 sequal-power crossfade, tail into head
- 96 kbps stereo; AAC padding clicks
- MP396 kbps stereo; AAC padding clicks
The crossfade takes the last 3 seconds, fades them out along a quarter-sine curve, fades the first 3 seconds in along the same curve, and mixes the two. The result is appended to the middle of the file, so its end flows straight into its start. I encode to MP3 with LAME because it decodes to the exact sample length; AAC adds padding at the end, and that padding is a click at every loop. Events are simpler: strip the silence, normalise to −20 LUFS, add a 10 ms fade in and an 80 ms fade out.
In the browser, the engine crossfades once more: files under 900 KB are decoded, and the last 1.2 seconds are blended into the first, in case a decoder adds anything. Each loop also starts at a random point, so two people never hear the same second at the same time. Making AI audio loop seamlessly has the full ffmpeg graph.
Scattering events
Each event in stems.json has an every range in seconds. The koel is 14 to 40, the temple bell 25 to 70, the cooker whistle 60 to 180, a dripping tap 2 to 6. When you switch an event on, src/lib/engine.ts plays it once within about 3 seconds, so the switch feels responsive, and then schedules every next play like this:
wait = min + random × (max − min) seconds
pitch = 0.93 to 1.07 × normal speed
pan = anywhere from 75% left to 75% right
loudness = 45% to 100% of the sliderPitch, position and loudness all change, so the same 4-second koel file sounds like different birds in different trees. Nothing is ever on a grid, which is why a mix with a few events can play for hours without feeling looped.
Live synth, recorded and generated
The 373 sounds come from three places, and each has a job:
- Live synth (11). White, pink and brown noise, a box fan, slow ocean, soft rain, wandering wind, deep space, a heartbeat and two binaural beats. They are built from noise and oscillators in
src/lib/synth.tsand drift through slow random modulation, so they never repeat and need no download. - Recorded (141). Field recordings from Moodist, under CC0 and the Pixabay Content License. Real places that synthesis cannot fake: an airport, a library, a campfire. I mirror them to my own CDN; see self-hosting audio.
- Generated (221 mutd Originals). Sounds nobody has recorded cleanly and freely licensed: a pressure cooker a few rooms away, neighbours through the wall, an algoza over Punjab's wheat fields. These ship inside the app, so they work offline in the native builds.
Do it yourself
You need an audio model, ffmpeg, and a browser. This is the order I would follow:
- 1Write a subject and a rule One sentence for what it is and where you hear it from. Append a fixed bed or event rule like the ones above.
- 2Generate long Ask for 30 to 60 seconds for a bed. You will lose 3 seconds to trimming and 3 to the crossfade.
- 3Listen once, all the way Reject any take with a voice, a melody where you wanted none, or a single loud event inside a bed.
- 4Trim, normalise, crossfade Trim 1.5 s from each end, run
loudnorm=I=-24, then bake a 3 s equal-power crossfade. - 5Encode to MP3 LAME at 96 kbps stereo or 64 kbps mono. Avoid AAC for anything that loops.
- 6Loop it in Web Audio Decode to an
AudioBufferand setloop = trueon the source. An <audio> element withloopleaves a gap in most browsers.
On iPhone
Web Audio is silent on iOS unless you resume it inside a tap and set the audio session to playback. Why iPhone Web Audio goes silent lists the fixes.Models that can make stems today
I checked each against its official pages on 30 November 2026. Only ElevenLabs Sound Effects documents a native loop option, and it stops at 30 seconds, so for anything longer you will bake the loop yourself as above. Tap a row for length, licence and access. Several are previews, so check the source before you build on one.
ElevenLabs Sound EffectsSound effects and short ambience from textLoops
- Length
- 0.5 to 30 seconds
- Loops
- Yes: the API has a loop option
- Use
- Commercial use on paid plans; check your plan's terms
- Access
- Closed model; web app and API
ElevenLabs Music (v2.5)Music, vocal or instrumentalBake loop
- Length
- 3 seconds to 5 minutes
- Loops
- No loop option documented
- Use
- Cleared for most commercial uses, depending on plan
- Access
- Closed model; API for paid plans
Mirelo SFXSound effects, foley and ambience, from text or videoBake loop
- Length
- Video up to 10 minutes; text-to-audio listed at 1 to 600 seconds by Picsart
- Loops
- Not documented
- Use
- Paid plans allow commercial use; the free plan is non-commercial and watermarked
- Access
- Closed model; own API, also on fal and Picsart. Plans from $20 a month
Stable Audio 3.0Music, plus a Small SFX model for sound effectsBake loop
- Length
- Small up to 2 minutes; Medium about 6 minutes
- Loops
- Not documented; can edit a section or continue a track
- Use
- You own outputs; organisations over $1M annual revenue need an Enterprise licence
- Access
- Open weights for Small SFX, Small and Medium; Large via API
Stable Audio OpenSound effects and ambienceBake loop
- Length
- About 47 seconds (Open Small: 11 seconds)
- Loops
- No
- Use
- Stability Community Licence, same $1M threshold
- Access
- Open weights; runs on your own GPU
Meta AudioCraft (AudioGen, MusicGen)AudioGen: sound effects and ambience. MusicGen: musicBake loop
- Length
- Short passes that can be extended
- Loops
- No
- Use
- Code is MIT, but the weights are CC-BY-NC 4.0: non-commercial only
- Access
- Open weights; self-host
Google Lyria (3, RealTime)Music, instrumental possibleBake loop
- Length
- Lyria 3 Clip is 30 seconds; longer models run to about 3 minutes; RealTime streams without end
- Loops
- RealTime plays continuously and can be steered; no loop setting for files
- Use
- Every output carries a SynthID watermark; Vertex AI terms apply
- Access
- Closed model; Gemini API, AI Studio, Vertex AI
SunoSongs, with instrumental mode and stem exportBake loop
- Length
- Not stated
- Loops
- No
- Use
- Pro and Premier downloads carry commercial rights; Free is non-commercial
- Access
- Closed model; no public API
UdioSongsBake loop
- Length
- Not applicable
- Loops
- No
- Use
- Audio and stem downloads have been switched off since its Universal Music deal
- Access
- Closed model
Adobe Firefly sound effectsSound effects from text, or matched to videoBake loop
- Length
- Set with a slider; no maximum published
- Loops
- Not documented
- Use
- Adobe markets it as commercially safe under its guidelines
- Access
- Closed model; Firefly app
What I would pick. For sound effects and short ambience, any of the closed services works; the rulebook matters more than the model. For self-hosting with commercial use, Stable Audio's open weights fit if you are under the revenue threshold; AudioCraft's weights are non-commercial. For music beds, ElevenLabs Music and Lyria both make long instrumental takes. I use Higgsfield because it gives me ElevenLabs Music and Mirelo behind one account.
If you would rather listen than build, the 23 moods are a good place to start.
Hear it
Everything here is playing in mutd right now.
373 sounds, 23 one-tap moods, no account. Free in your browser; the iOS and Android apps are coming soon.