Audio Loop Generator

Last updated: October 12, 2026 · Written by the Pitch Detectors Editorial Team

Create tight loops from any audio file. Set start/end, crossfade, loop count, preview and export WAV.

100 = original speed
Tip: Use short crossfade (10–50 ms) for tight seamless loops. Increase loop count for longer output.

An audio loop generator turns a section of an audio file into a seamless repeating cycle. This one runs entirely in your browser: pick a start and end point, set a crossfade and loop count, preview the repeat, and download a 16-bit WAV. Your file never leaves your device.

Key Takeaways

  • A seamless loop is a transition, not a jump: this tool applies linear fades at both segment ends, then joins the repeats into one file.
  • Keep crossfades short for rhythmic material (10–50 ms) and long for ambience (200–1000 ms).
  • The tempo control works by resampling — 110% plays faster and higher-pitched, like a record player.
  • Loop math: one cycle = (end − start) × 100 ÷ tempo; total length = one cycle × loop count.
  • Linear (equal-gain) fades can dip about 3 dB at the junction on uncorrelated material — keep rhythmic crossfades short.
Alt: Diagram showing a loop segment with end fades repeated into a continuous cycle
Alt: Diagram showing a loop segment with end fades repeated into a continuous cycle

What Is an Audio Loop Generator?

An audio loop generator is a tool that takes a chosen section of an audio file and repeats it so the end flows back into the beginning without a click or gap. It combines sample-exact cutting, end fades, and repetition rendering into a single downloadable file.

Loops are everywhere: video game engines repeat engine hums and ambient beds, sleep apps play hours of rain from a 30-second recording, producers build tracks from drum loops, and theater sound designers hold a musical "vamp" under dialogue until a cue lands. A raw repeat — pasting the segment end-to-end — almost always clicks, because the waveform's end value rarely matches its start value. The generator's job is to make that junction inaudible.

How This Loop Generator Works

This tool builds loops entirely in your browser using the Web Audio API — decoding, resampling, fading, and WAV encoding all happen on your device.

Methodology, per the tool's processing code: the file is decoded to a buffer, and the [start, end) range is extracted at the sample level. An OfflineAudioContext replays that slice at playbackRate = tempo ÷ 100, which is resampling: the segment gets shorter or longer and its pitch moves with it. Linear gain automation applies a fade-in over the first crossfadeSec and a fade-out over the last crossfadeSec of each segment (equal-gain, i.e. straight lines). The rendered segment is then concatenated loop-count times and encoded as 16-bit PCM WAV. We verified the segment-length math and the repeat count against the tool's own output-length readout on five test configurations.

Loop Length Math and a Worked Example

Two formulas cover everything. For musical loops in 4/4 time:

Tbeat = 60 ÷ BPM,    Tbar = 240 ÷ BPM

And for the tool's output:

one cycle = (end − start) × 100 ÷ tempo,    total = one cycle × loop count

Worked example: a 4-bar drum loop at 120 BPM:

  1. One beat = 60 ÷ 120 = 0.500 s; one bar = 240 ÷ 120 = 2.000 s
  2. Four bars = 8.000 s → set Loop Start = 0.00, Loop End = 8.00
  3. Tempo = 100 → one cycle = (8.00 − 0) × 100 ÷ 100 = 8.00 s
  4. Loop Count = 8 → total = 8.00 × 8 = 64.00 s
Tempo (BPM)1 beat1 bar (4 beats)4 bars8 bars
80 (hip-hop / lo-fi)0.750 s3.000 s12.000 s24.000 s
90 (boom bap / reggae)0.667 s2.667 s10.667 s21.333 s
100 (pop / downtempo)0.600 s2.400 s9.600 s19.200 s
120 (house / commercial)0.500 s2.000 s8.000 s16.000 s
128 (EDM)0.469 s1.875 s7.500 s15.000 s
140 (dubstep / trap)0.429 s1.714 s6.857 s13.714 s
174 (drum & bass)0.345 s1.379 s5.517 s11.034 s

How to Use This Loop Generator

  1. Upload audio: choose an MP3, WAV, M4A, or OGG file. The tool shows filename, duration, and sample rate.
  2. Set Loop Start and Loop End in seconds (0.01 s steps). For music, use the BPM table above so the segment holds whole bars.
  3. Set Loop Count: how many times the segment repeats (default 4).
  4. Set Crossfade: fade length in seconds (default 0.05). Short for drums, long for ambience — see below.
  5. Set Tempo: percent of original speed (50–200). 100 keeps the original; anything else resamples, changing pitch too.
  6. Click Preview Loop to hear the full repeated render, then Export WAV to download the 16-bit file. Reset clears everything.

Crossfade Laws: Equal-Gain vs Equal-Power

A crossfade blends two sounds with two gain curves that trade places over the fade time. Which curve you use changes what the junction sounds like.

Crossfade lawCurve shapeWhat stays constantBest for
Equal-gain (linear)Straight lines: gin = t/T, gout = 1 − t/TAmplitude sum (g1 + g2 = 1)Correlated material — same drum hit fading into itself
Equal-power (sine/cosine)Curves: gin = sin(πt/2T), gout = cos(πt/2T)Power sum (g12 + g22 = 1)Uncorrelated material — rain, crowd noise, reverb tails

Why this matters: a linear fade of uncorrelated material — the usual case at a loop junction — dips about 3 dB in summed power at the midpoint (0.5 + 0.5 = 0.5 in power terms), an effect documented in sampler firmware development notes. This tool uses linear (equal-gain) fades, so the practical rule is: keep rhythmic crossfades short (10–50 ms) so any dip is too brief to notice, and use longer fades (200–1000 ms) only for ambient beds where the material is smooth enough to hide it. Matching the loop points to similar-sounding moments (same beat phase) also hides the junction.

[Infographic: equal-gain vs equal-power crossfade curves side by side — straight lines dipping at the midpoint vs curved lines staying level]
Alt: Infographic comparing equal-gain and equal-power crossfade curves at a loop junction

Tempo Scaling vs Time-Stretching: Know the Difference

This tool's tempo control is resampling, not time-stretching. It replays the slice faster or slower, exactly like speeding up a record: 110% plays the loop 10% faster and 10% higher in pitch. There is no pitch-preserving stretch mode.

When does that matter? For percussion loops, pitch shift is barely noticeable. For melodic loops — a vocal phrase at 110% sounds like a different, higher voice — it is obvious. If you need a new tempo without a new key, keep the tempo at 100 here and shift pitch separately afterward with the pitch shift calculator as a reference, or do both steps in a DAW. The old source material and the target key should be within a few percent for the resample to sound natural.

Where Seamless Loops Get Used

Looping is a production technique, not just an effect. The main professional uses:

  • Video game audio — engines like Unity and Unreal hold short ambience, engine hum, and music beds in memory and repeat them; a click at the junction ruins immersion, which is why game audio specs demand loop-perfect files.
  • Sleep and meditation audio — a 30-second rain recording rendered 240 times becomes a 2-hour track with no startling repeats.
  • Sample packs — producers sell or share looped drum and instrument phrases that must drop into a DAW timeline without edits.
  • Theater and video vamps — underscore sections looped under dialogue until a cue lands; loop count sets the exact hold duration.

Loop Generator vs Alternatives

ToolWhat it doesUse when
Loop GeneratorRepeats one segment with junction fadesYou need one section playing over and over seamlessly
Audio TrimmerExtracts one segment, played onceYou need a single clip or ringtone, not a repeat
Audio MergerJoins different files end to endYou need verse + chorus from separate recordings in one track
Speed ChangerChanges tempo of the whole fileThe entire track (not a looped excerpt) needs a new pace
Rhythm Pattern MakerCreates new rhythms from scratchYou want an original loop, not one from existing audio

Limitations

  • Linear (equal-gain) fades only. There is no equal-power/sine curve option, so uncorrelated material can dip ~3 dB at the junction — keep rhythmic crossfades short.
  • Tempo changes pitch. The speed control resamples; there is no pitch-preserving time-stretch.
  • Crossfade length comes out of the segment. A 0.5 s crossfade on a 1 s segment leaves almost nothing unfaded — keep crossfade well under half the segment length.
  • Junctions are tail-fade followed by head-fade, not an overlapped blend — choose loop points at similar-sounding moments for the cleanest result.
  • Big renders live in RAM. A long loop count on a long segment is best rendered on a desktop browser.

Frequently Asked Questions

A raw repeat jumps from the segment's end value to its start value in one sample — a click. A seamless loop applies fades at the segment ends so the junction has no sudden jump. This tool fades each segment's head in and tail out linearly, then joins the repeats, so the transition is a smooth slope instead of a cliff.

For drums, basslines, and rhythmic loops use 10–50 ms (0.01–0.05 s) — long enough to remove the click, short enough to keep transients punchy. For rain, room tone, pads, and other ambient beds use 200–1000 ms (0.2–1.0 s), where a slow dissolve sounds natural. The tool defaults to 0.05 s, a safe start for rhythmic material.

In 4/4 time, one beat is 60 ÷ BPM seconds and one bar is 240 ÷ BPM seconds. At 120 BPM a bar is exactly 2.000 s, so a 4-bar loop is 8.00 s — set Loop Start to 0.00 and Loop End to 8.00. Use the BPM table on this page for other tempos; whole-bar lengths keep the groove locked.

Yes. This tool's tempo control works by resampling — replaying the audio faster or slower — so 110% sounds faster and higher-pitched, like speeding up a record. There is no pitch-preserving time-stretch. For melodic material, keep tempo at 100 and change speed in a DAW if you need to hold the key.

No. The source is decoded once into 32-bit floating-point audio, the fades are applied mathematically, and the result is written as an uncompressed 16-bit WAV. There is no lossy re-encoding step, so the loop is as clean as the source file.

The tool uses linear (equal-gain) fades, which sum to a dip of about 3 dB at the midpoint when the two sides are uncorrelated — the normal case at a loop junction. Shorten the crossfade for rhythmic loops so the dip is too brief to notice, or pick loop points where the audio sounds similar on both sides.

Yes — set a high loop count. A 30-second rain segment repeated 240 times gives 7,200 seconds (2 hours). Note the WAV will be large: 2 hours of stereo 44.1 kHz 16-bit audio is about 1.27 GB, so render on a desktop with free memory and consider converting the result to MP3 afterward for everyday playback.

Yes. The export is a standard 16-bit WAV, which Unity, Unreal Engine, and most game audio middleware import directly. Choose loop points on whole bars for music or steady sections for ambience, preview the junction at volume, and the file will repeat cleanly in-engine.

No. Decoding, resampling, fading, concatenation, and WAV encoding all run on your device's CPU through the Web Audio API. Your files stay private, and there are no server-side size limits — only your device's RAM bounds how long a render you can make.

Yes — that is exactly what Loop Start and Loop End are for. Upload the full song, set the start and end around the section you want (a chorus, a breakdown), and only that range is looped and exported. The rest of the file is ignored.

Disclaimer: this tool is provided for informational and creative purposes only and is not professional audio-engineering advice. Always keep backups of your original recordings before processing, and only loop audio you own or have the right to use.

Explore Related Audio Editing Tools