findLoopCandidates
findLoopCandidates(
lagMatrix,frameTime?,numFrames?):object[]
Defined in: packages/pleco-xa/src/scripts/xa-recurrence.js:367
Find peaks in lag matrix to identify loop-lag candidates.
Lag strengths are normalized by the number of frame positions that can contribute at each lag (numFrames − lag). Without this, raw lag sums decay linearly with lag and real repetition peaks drown in the ramp (Wave 3 fix).
Parameters
Section titled “Parameters”lagMatrix
Section titled “lagMatrix”Float32Array<ArrayBufferLike>[]
output of recurrenceToLag
frameTime?
Section titled “frameTime?”number = ...
seconds per lag step
numFrames?
Section titled “numFrames?”number = ...
frames in the ORIGINAL (unpadded) recurrence matrix; defaults to lagMatrix.length / 2 (i.e., assumes pad=true)
Returns
Section titled “Returns”object[]