Measures how far a second track is shifted against a first one and whether its polarity is reversed: two microphones on one source, DI and amp of a bass, a track before and after a plugin with latency. It also shows what the sum of both tracks gains or loses, overall and below 150 Hz, including for kick and bass, which share no common source. The files are read in the browser and not uploaded.
Track A (reference)
Track B (gets shifted)
With only track A and a stereo file, left is measured against right. WAV and AIFF are read sample by sample; FLAC, MP3, M4A, Ogg and Opus go through the browser's decoder.
| Case | Sum, full band | Below 150 Hz | Weakest 100 ms window below 150 Hz |
|---|
From up to 30 s of common material, starting 0.1 s after the beginning, the cross-correlation of both tracks is computed for shifts of up to ±100 ms. The position of the peak comes from a whitened version (SCOT) in which every frequency counts equally, so low tones and reverb do not smear the peak. Values between samples come from sinc interpolation to a thousandth of a sample. Match and polarity come from the ordinary normalized correlation at that position; it weights by energy, the way the sum is heard.
The table computes the sum of both tracks as they are, with the polarity of B reversed and after the shift. Below 150 Hz, a fourth-order Butterworth low-pass filters both tracks the same way. The weakest 100 ms window only counts places where both tracks play (each no more than 20 dB below its loudest window); with kick and bass, that is the moment in which the low end cancels most.
Reversing the polarity inverts every sample and acts on all frequencies alike. An offset, by contrast, turns the phase differently for each frequency: at 1 ms the first cancellation lies at 500 Hz, the next at 1.5 kHz. That is why reversed polarity does not replace a shift. Sound travels 344 m/s in air at 20 °C, so 1 ms corresponds to 34.4 cm of distance between two microphones.
In FL Studio, Fruity Stereo Shaper reverses the polarity of one or both channels and delays one channel against the other; according to the manual, the delay compensation of a mixer track can be set by hand in milliseconds or in samples, samples being the finest setting.
Tested on 21 cases with a known offset: whole and fractional offsets were hit to within 0.016 samples, two microphones with room sound and noise (r = 0.32) to within 0.011 samples, and a snare top and bottom with a high-pass on the bottom microphone was recognized as shifted and inverted. A sine tone remained ambiguous; kick against bass, drums against bass and independent noise gave no common signal. After the suggested ffmpeg command, the tracks were aligned in all seven cases measured again, and the sum matched the prediction to within 0.1 dB. In a real browser (Chromium), the same track B as FLAC, MP3, AAC in M4A and Opus against the WAV version of A gave an offset of 64 samples each, to within 0.002 samples: the decoder removes the encoder delay, and Opus is brought to the rate of A.
How sidechain compression lowers the bass on every kick instead of shifting the two against each other is shown in the tutorial “Sidechain Compression in FL Studio 2026”.
Comb filter, snare top and bottom and kick in and out are measured in the article “Offset and Polarity of Two Tracks”.
What start phase, tuning, high-pass and ducking change in the low-end sum of kick and bass is measured in the article “Kick and Bass in the Low End”.
What a delay between left and right costs in the mono sum is measured in the article “Stereo Widening”.
How much latency a linear-phase EQ brings along, a frequent cause of offsets in parallel paths, is measured in the article “Linear Phase Versus Minimum Phase EQ”.
Sources: Image-Line: Mixer Track Effects (Plugin Delay Compensation) · Image-Line: Fruity Stereo Shaper · ffmpeg Filters Documentation (adelay, atrim, aeval) · HyperPhysics: Speed of Sound
The search only covers ±100 ms; a larger offset gives “no common signal”. An offset that drifts over the file, for example with different clocks in two devices, has no fixed position; the result is then an average over the first 30 s. Filters delay by themselves: a low-pass at 5 kHz on track B moved the measured position by 3.9 samples in the test, and the shift compensates exactly this delay as well.