<div dir="ltr">As a preamble, I&#39;ll note that I posted a question on chuck-dev about AutoCorr/XCorr always crashing for me. <a href="https://github.com/ccrma/chuck/pull/150">This patch</a> seems to fix that.<div><br></div><div>That said, I don&#39;t understand the results I get from AutoCorr. For periodic inputs, I expect to see periodicity in the output. For small FFT sample sizes, I see the expected peak at 0, and at large sample sizes I see a second peak at the end of the window. See example plots at <a href="https://i.ibb.co/BBZXgBB/autocorr-128.png">128</a> and <a href="https://i.ibb.co/Mn5fty5/autocorr-4096.png">4096</a>. That second peak is correlated with the window size, not the input frequency.</div><div><br></div><div>Thanks to Mario for his <a href="https://github.com/mariobuoninfante/ChucK_various">gnuplot wrapper</a> that captured those plots.</div><div><br></div><div>Here&#39;s the plotting code if anyone would like to repro:</div><div><font face="monospace">SinOsc s =&gt; FFT fft =^ AutoCorr c =&gt; blackhole;<br>4400 =&gt; s.freq;<br>128 =&gt; fft.size;<br>300::ms =&gt; now;<br>c.upchuck();<br>Plot plot;<br>&quot;autocorrelation of 4400 hz, 128 samples&quot; =&gt; plot.title;<br>plot.plot(c.fvals());<br>200::ms =&gt; now;<br></font></div><div><br></div><div>Should I be using AutoCorr differently? Am I looking at the power spectrum or something, and not the correlation vector like I think I am? My current understanding comes from reading uana_extract.cpp many times with references like <a href="http://paulbourke.net/miscellaneous/correlate/">this</a>.</div><div><br></div><div>Thanks,</div><div>Curtis</div></div>