How to make seamless audio loops (music, ambience and game audio)
Free kit: Free Cozy Audio kit bundles this with the other tools you need.
A loop that clicks, hiccups or swells at the seam gets noticed fast. Players hear it in a game menu, viewers in a stream's waiting screen, and anyone using a 10-minute rain track in the background. Seamless loops come down to three things: the exact length, a clean edit point, and a file format that doesn't add gaps. This guide covers musical loops (which need to match tempo) and ambient loops (which just need to sound continuous).
Part 1: Musical loops need the exact length
A musical loop has to be a whole number of bars long, to the sample, or it drifts out of time as it repeats.
Loop length in seconds = 60 / BPM x beats per bar x number of bars
Length in samples = seconds x sample rate
Example: 4 bars of 4/4 at 120 BPM
- One beat: 60 / 120 = 0.5 s (500 ms)
- 4 bars = 16 beats = 16 x 0.5 = 8.0 seconds
- At 48 kHz: 8 x 48,000 = 384,000 samples
- At 44.1 kHz: 8 x 44,100 = 352,800 samples
Example: 2 bars of 4/4 at 90 BPM
- One beat: 60 / 90 = 0.667 s
- 8 beats = 8 x 60 / 90 = 5.333 seconds
- At 44.1 kHz: (8 x 60 / 90) x 44,100 = 235,200 samples (exactly, because 480 / 90 x 44,100 is a whole number)
Some tempos don't land on a whole number of samples. In that case, round to the nearest sample. The error is far too small to hear over a few minutes, though it can add up over very long loops. The loop and sample length calculator gives seconds and samples for any tempo and bar count. The BPM to ms calculator and the 120 BPM in ms page list note lengths.
Part 2: A clean seam
Even with the right length, the join can click. A click happens when the waveform jumps suddenly between the last sample and the first.
Fixes, in order of simplicity:
1. Cut at zero crossings. Zoom in and place the start and end where the waveform crosses the center line. Most editors have a "snap to zero crossing" option.
2. Tiny fades. A fade-in and fade-out of a few milliseconds at the ends removes clicks on percussive loops. Keep them very short, or you'll hear a dip.
3. Match what's ringing over. If a cymbal or reverb tail is still sounding at the end of the loop, it should also be sounding at the start. Otherwise it cuts off at every repeat.
Capturing tails the right way: record or render one extra bar past the loop. Cut that extra tail off and mix it into the start of the loop. Now the tail from the end of each repeat carries over into the next, as it would in a continuous performance.
Part 3: Ambient loops (rain, wind, room tone, engine hum)
Ambience doesn't need a tempo, but the ear catches two things: a click at the seam, and a recognizable event (a bird chirp, a car) repeating at the same moment.
The crossfade method:
1. Start with a longer recording than you need, for example 70 seconds for a 60-second loop.
2. Cut the last 10 seconds off and lay them over the first 10 seconds.
3. Crossfade: the tail fades out while the head fades in, over those 10 seconds. Use an equal-power crossfade for noise-like sounds.
4. Trim to the original start of the tail. The loop now ends with audio that flows directly into its own beginning.
Other tips:
- Longer loops repeat less noticeably. For rain or crowd ambience, 1 to 3 minutes is often enough. Anything memorable, like a single thunder clap, makes a loop feel short.
- Remove standout events or place them as separate one-shot sounds triggered at random times. Games do this to make ambience feel alive.
- Listen across the seam many times. Loop it for a few minutes while doing something else, and note whether anything catches your attention.
Part 4: Choose a format that loops cleanly
- WAV loops cleanly in almost everything.
- OGG Vorbis loops well in most game engines and is much smaller than WAV.
- MP3 encoders add a small amount of padding at the start and end. Unless your player handles gapless metadata, this can create an audible gap at the seam. Avoid MP3 for tight loops.
Also check your engine's import settings: some have a separate "loop" flag, or loop start and end points stored in the file.
Part 5: Changing tempo without breaking the loop
If you need a 120 BPM loop at 126 BPM:
- Time-stretching keeps the pitch and changes length: 8.0 s x 120 / 126 = 7.62 s. Then recheck the sample count at the new tempo.
- Resampling (tape-style) changes pitch too. A 126 / 120 = 1.05 speed ratio raises pitch by about 0.84 semitones, since 12 x log2(1.05) = 0.845.
The time stretch calculator works out both.
Final check
Export, re-import and loop the file in the place it will actually play: your engine, your stream software or your DAW. The seam that sounds perfect in an editor can still click after a format conversion. Five minutes of testing catches it.

