cwilso / PitchDetect

Pitch detection in Web Audio using autocorrelation
https://cwilso.github.io/PitchDetect/
MIT License
1.3k stars 437 forks source link

Doubt about this code in function **autoCorrelate**: #39

Closed cddqssc closed 2 years ago

cddqssc commented 2 years ago

Doubt about this code in function autoCorrelate: image Since "buf" is not changed in this loop: for (var j=0; j<SIZE-i; j++) c[i] = c[i] + buf[j]buf[j+i]; 'buf[j]buf[j+i]' should always be the same result, so every element in the 'c' array should be equal, Am I understanding it wrong? Looking forward to your reply!