recurrenceLoopDetection
recurrenceLoopDetection(
audioBuffer,options?):Promise<any>
Defined in: packages/pleco-xa/src/scripts/xa-recurrence.js:493
Recurrence loop detection using matrix analysis.
Returns REAL candidates validated against the raw audio, or THROWS a diagnostic error. There are no fabricated fallbacks: every returned confidence is the normalized cross-correlation (0..1) between the candidate loop segment and the audio that follows it.
Cost note: the similarity matrix is O(frames² × features). For long buffers
the hop length is scaled up (documented in diagnostics.hopLength) so that
frame count stays under maxFrames — a resolution trade within the same
algorithm, never a switch to a different strategy.
Parameters
Section titled “Parameters”audioBuffer
Section titled “audioBuffer”any
AudioBuffer or shim with getChannelData
options?
Section titled “options?”hopLength?
Section titled “hopLength?”number
maxFrames?
Section titled “maxFrames?”number
cap on chroma frames (matrix is frames²)
minConfidence?
Section titled “minConfidence?”number
quality gate on audio-validated NCC
Returns
Section titled “Returns”Promise<any>
{ loopStart, loopEnd, confidence, candidates, diagnostics }