Skip to content

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).

Float32Array<ArrayBufferLike>[]

output of recurrenceToLag

number = ...

seconds per lag step

number = ...

frames in the ORIGINAL (unpadded) recurrence matrix; defaults to lagMatrix.length / 2 (i.e., assumes pad=true)

object[]