Audio Looper Online (Seamless Seam Crossfader)
Build glitch-free, continuous audio loops with equal-power trigonometric crossfading and tempo-synchronized markers.
Click or Drag & Drop Audio File Here
Supports MP3, WAV, AAC, OGG, and FLAC audio files
Interactive Waveform & Loop Region Visualizer
Equal-Power Crossfade Seam Gain Profile
Audio Looper Online - Free Seamless Loop Maker & Crossfader: Create seamless audio loops online with equal-power crossfading, zero-crossing boundary snapping, tempo beat matching, and lossless WAV export client-side.
Comprehensive Guide: Mathematical Mechanics of Seamless Audio Looping & Imposition
In modern video game audio programming, musical production, ambient soundscape design, and digital audio workstation (DAW) workflows, audio looping is the process of continuously repeating an acoustic segment without audible discontinuities, stuttering, or rhythmic drift.
Creating an imperceptible loop seam requires rigorous mathematical control over zero-crossing alignment, equal-power trigonometric interpolation, and periodic autocorrelation phase tracking.
1. The Boundary Discontinuity Problem & Click Acoustics
Let $x(t)$ denote a continuous acoustic pressure signal, and let $x[n]$ represent its discrete representation sampled at $f_s$ ($44,100,text{Hz}$). If an audio segment starting at sample index $N_{start}$ and terminating at $N_{end}$ is wrapped cyclically:
Unless $x[N_{start}] equiv x[N_{end}]$ and their first derivatives match ($dot{x}[N_{start}] equiv dot{x}[N_{end}]$), the instantaneous step jump $Delta x_{seam}$ acts as an impulse $delta(t)$ in the time domain. In the frequency domain, taking the Fourier transform reveals that an impulse generates a flat broadband noise spectrum:
The human auditory system perceives this broadband burst as a sharp, unmusical "pop" or "click" at every loop cycle.
2. Equal-Power Trigonometric Crossfading Physics
To eliminate the boundary step discontinuity, a time window of length $L = lceil f_s cdot tau_{xfade} rceil$ samples is reserved at the loop seam. The audio tail is crossfaded with the audio head.
In naive implementations, a linear crossfade is applied:
However, acoustic power is proportional to the square of pressure amplitude ($P propto A^2$). At the exact midpoint ($n = L/2$):
A linear crossfade produces a noticeable $-3,text{dB}$ drop in perceived volume at the transition point.
To maintain constant apparent acoustic loudness for uncorrelated musical signals, our engine enforces the Equal-Power Trigonometric Crossfade Law:
By fundamental Pythagorean trigonometric identity:
The total acoustic power across the entire seam interval remains perfectly constant, eliminating volume dips.
3. Tempo Snapping & Musical Metric Duration Calculations
For rhythmic material (such as drum loops, basslines, and synth arpeggios), loop duration must align with musical measures. Given a tempo $B$ in beats per minute (BPM) in standard $4/4$ time:
| Tempo (BPM) | 1 Beat Duration | 1 Bar (4 Beats) | 2 Bars (8 Beats) | 4 Bars (16 Beats) |
|---|---|---|---|---|
| 90 BPM (Hip-hop / Downtempo) | 0.667 s | 2.667 s | 5.333 s | 10.667 s |
| 120 BPM (House / Pop Standard) | 0.500 s | 2.000 s | 4.000 s | 8.000 s |
| 128 BPM (EDM / Electro) | 0.469 s | 1.875 s | 3.750 s | 7.500 s |
| 140 BPM (Dubstep / Techno) | 0.429 s | 1.714 s | 3.429 s | 6.857 s |
4. Step-by-Step Worked Seam Synthesis Example
Consider a 2-bar bassline loop at $120,text{BPM}$ sampled at $f_s = 44,100,text{Hz}$:
- Tempo $B = 120,text{BPM} implies T_{loop} = 4.000,text{s}$ ($N = 176,400$ samples).
- Desired crossfade duration: $tau_{xfade} = 50,text{ms} = 0.050,text{s}$.
Step 1: Compute Crossfade Overlap Samples
Step 2: Buffer Blend Computation
For each channel $c in {0, 1}$, the composite looped sample $y[n]$ over the initial overlap window $0 le n < L$ is synthesized by blending the head of the loop with the crossfaded tail:
For the body of the loop $L le n < N - L$, the original samples are preserved unattenuated: $y[n] = x[n]$.
When repeated across multiple cycles, the seam transitions without any audible click or drop in bass power.
5. Sound Design Best Practices for Clean Loops
- Choose Appropriate Crossfade Lengths: For percussive drum grooves, keep crossfades short ($10text{–}25,text{ms}$) to avoid smearing the transient punch of kick and snare hits. For ambient pads, strings, and vocal drones, use generous crossfades ($150text{–}400,text{ms}$) to melt boundaries together.
- Capture Reverb Tails: When bouncing synth loops from your DAW, allow the reverb and delay tail from the end of the phrase to ring into an extra cycle and blend it back into the loop start.
- Verify DC Offset: Ensure your source audio has $0,text{Hz}$ DC bias removed before setting loop markers; uncorrected DC bias produces persistent clicks at every loop repetition regardless of crossfading.
- Harmonic Zero-Crossing Alignment: Zooming in to locate positive-going zero crossings ($x[n-1] < 0 le x[n]$) ensures that the initial phase angle of the fundamental frequency aligns with the ending phase.
6. Autocorrelation Pitch Period Synchronization for Sustained Notes
When looping monophonic instruments or sustained vocal choir pads, phase cancellation during crossfading can cause an unwanted "chorusing" or "phasing" dip in the fundamental frequency. To prevent destructive interference:
By maximizing the normalized autocorrelation coefficient $R_{xx}(tau)$ over lag range $tau in [tau_{min}, tau_{max}]$, the loop boundary is aligned to an integer multiple of the fundamental pitch period $T_0 = 1 / f_0$. This guarantees that positive sinusoidal peaks in the fading tail sum in-phase with positive sinusoidal peaks in the incoming head ($0^circ$ phase delta), preserving full harmonic resonance without comb filtering.
Frequently Asked Questions
Audible clicks occur when the end of an audio segment joins the beginning with mismatched amplitude or phase. Our engine applies an equal-power trigonometric crossfade (sinusoidal curve) across the seam, blending the tail into the head to maintain constant acoustic energy.
Linear crossfading fades amplitudes along a straight line, which causes an audible -3 dB dip in sound volume right at the midpoint. Equal-power crossfading uses sine and cosine gain curves whose squared sum equals 1.0, preserving constant apparent loudness across the loop seam.
Yes. You can export a single seamless loop block, or render 2x, 4x, 8x, or 16x repetitions into a single cohesive, unbroken WAV audio file.
Yes. You can specify a tempo in BPM and snap loop points to exact 1-bar, 2-bar, 4-bar, or 8-bar musical measures to produce rhythmically tight loops.
No. All PCM audio decoding, seam crossfading, waveform rendering, and WAV encoding run 100% locally inside your browser memory via the HTML5 Web Audio API.