← Gallery Loop recurrence — tempo-free loop detection

Loop recurrence — tempo-free loop detection (Drive Through Beat.wav)

loop/recurrence.js — chroma recurrence heatmap + tempo-free lag proof

Most loop finders start by guessing a tempo. This one never does: loop.detect(buffer, {strategy:'recurrence'}) finds the loop of Drive Through Beat.wav purely from where the music repeats itself — no beat tracking, no BPM — and you can audition the result to hear that the detected cycle is real. The page rebuilds the EXACT matrix the strategy analyzed, using the same promoted pipeline functions with the same parameters (recurrence.computeChroma → stackMemory → recurrenceMatrix(affinity) at the effective hop reported in the result diagnostics), renders it as a frames×frames heatmap, and draws the winning lag as the off-diagonal stripe. Badges assert the detected loop duration equals the winning lag × hop / sr (to within one hop: the final bounds get sample-level refinement + zero-crossing snap), that the stripe is measurably brighter than the off-diagonal background, and that the result honors the tempo-free contract (NO bpm field, ever). Same pipeline node-verified in examples/node/loop-recurrence.mjs.

chroma recurrence matrix (affinity, time-delay embedded) — pink stripe = winning lag
candidatelagFramesduration (s)confidence (audio NCC)
loading + decoding WAV…