Skip to main content
ilovecalcs logoilovecalcs.

Tools · Live

Audio Loop Checker, seamless loops, zero gaps.

Upload an MP3 or WAV file, trim the start and end points on the waveform, and verify a perfectly gapless loop using the Web Audio API. Download the trimmed region as a clean WAV when the loop sounds right.

How it worksBrowser-native

Drop your audio file here

MP3, WAV, or OGG · click to browse

Upload a file to see the waveform

00.00s / 00.00s

0.00s
sec

Trims first 0.00s · loop begins here

0.00s
sec

Trims last 0.00s · loop ends here

Transition Preview Mode

Audition just the loop seam in isolation

Field guide

How gapless audio looping works in the browser.

Creating a seamless audio loop sounds simple but is notoriously difficult to achieve with standard HTML5 audio elements. The<audio> tag introduces gap artefacts at the loop boundary because it must seek back to the beginning, load from disk or buffer, and resume playback, all of which takes measurable time. On most browsers, this gap is 50 to 300 milliseconds, completely destroying the illusion of a seamless loop.

The Web Audio API solves this at the engine level. AnAudioBufferSourceNode with loop = trueperforms the loop transition inside the browser's audio rendering thread, at sub-millisecond precision with no disk I/O, no decode latency, and no JavaScript event loop involvement. The loop boundary is calculated in sample-exact increments, which means the transition is genuinely inaudible when the audio content at the loop point is continuous.

How the loop engine works here

When you click Play, this tool creates a freshAudioBufferSourceNode, sets three properties:

source.loop = true
source.loopStart = trimStart (seconds)
source.loopEnd = totalDuration - trimEnd (seconds)

Then calls source.start(0, loopStart) to begin playback at exactly the loop-in point. The browser's audio engine handles the wrap-around internally: when the playhead reachesloopEnd, it jumps back to loopStart at the sample level with zero additional latency. The result is a loop that is indistinguishable from a native hardware sampler.

Reading the waveform visualizer

The waveform is drawn by downsampling the raw PCM data from the decoded AudioBuffer. For each pixel column across the canvas, the minimum and maximum sample values within the corresponding time window are found and drawn as a vertical bar. This "peak display" method accurately shows the amplitude envelope of the audio at every point in time.

  • Dimmed regions (darker waveform at the edges) are the sections trimmed from the loop. They will not play.
  • Pink "LOOP IN" and "LOOP OUT" markers show the exact loop boundary points. The audio will snap between these two markers on every cycle.
  • The white moving line is the playhead, showing the current position within the audio. When it reaches the LOOP OUT marker, it wraps instantly back to LOOP IN.

What makes a good loop point

A perfect loop point is one where the audio at the end of the loop flows naturally into the audio at the beginning. The most reliable technique is to find a zero-crossing: a moment where the waveform crosses the silence axis (zero amplitude). Transitions through zero prevent the "click" artefact caused by a sudden discontinuity in the audio signal.

Beyond zero-crossings, check that the pitch and harmonic content at the loop-out matches the pitch and harmonic content at the loop-in. For music, this usually means finding a beat or bar boundary where the rhythm and chord are consistent. For ambient sound design (wind, rain, engines), the frequency spectrum must be similar on both sides of the boundary, or the ear will hear a texture change even if there is no click.

To test your loop point: trim the audio until the loop sounds seamless, then deliberately listen for several cycles at the transition point. If after 10 loops you cannot tell when the boundary happens, the loop is production-ready.

How the WAV download works

Clicking "Download WAV" uses an OfflineAudioContext, a special non-realtime rendering context that processes audio as fast as the CPU allows rather than at real time. A source node is configured to play exactly one pass of the trimmed region (from loopStart to loopEnd), the context renders the output, and the resulting PCM data is encoded into a standard RIFF WAV file using a 16-bit signed integer format at the source file's native sample rate.

The output file contains exactly the trimmed loop region with no silence padding, no re-encoding artifacts (it is lossless PCM regardless of the source format), and at the original sample rate. Import it directly into any DAW, game engine, or sample player.

Common use cases

  • Game audio. Background music, ambient sounds, and engine loops in games must loop seamlessly regardless of how long the player is in a scene. This tool lets you verify a loop before importing it into Unity, Unreal, or Godot.
  • Sample creation. Drum loops, bass lines, and melodic phrases for samplers and loop libraries must hit exactly on the beat boundary. Use the trim controls to align the loop region to the correct bar.
  • Podcast and video production. Background music beds need to loop without calling attention to themselves. Finding a natural-sounding loop point saves significant editing time in post-production.
  • Web audio development. Developers building browser-based games or experiences can use this tool to test and export loop-ready assets before integrating them into theirAudioContext pipeline.

Privacy and file handling

Your audio file never leaves your device. All decoding, waveform rendering, looping, and WAV export happens entirely in your browser using the Web Audio API and the HTML5 File API. No audio data is uploaded to any server.