Do you know of any algorithms for audio processing that make use of peaks in auto-correlation function? I am currently involved in research on mapping methodology for dynamic algorithms. I came recently over an algorithm for detection of fundamental frequency in audio signals, which has a dynamic structure I am looking for - the execution time of the algorithm varies with the number of peaks in the signal's auto-correlation:

while (i < hsize)

    // Search for peaks in auto-correlation:
    if((r[i] > 0) && (r[i]>r[i-1]) && (r[i]>=r[i+1])){

            temp = 0.25f*(r[i+1]-r[i-1]);
            temp = r[i] - temp*temp/(0.5f*(r[i+1]+r[i-1]) - r[i]);
            n = n1[i] + n2[i];
            if ((rmax*n) < (temp*nmax)) {imax=i; rmax=temp; nmax=n;}.


This would be perfect as a studying example for my methodology, but the problem is that there is only a couple of lines inside the loop, so the overhead of adding my techniques becomes too big for the problem of this size. Now I am wondering if there exist any similar algorithms in audio processing, i.e. also making use of peaks in auto-correlation function but perform more extensive calculations for each peak?

  • 1
    $\begingroup$ Dear colleagues, I am sorry that my post do not have any greeting. I could actually not add any - it disappears from the posted text! $\endgroup$ Commented Nov 25, 2014 at 9:46
  • $\begingroup$ Elena, i would suggest that many pitch-detection algorithms use some form of auto-correlation and must look at every peak of any significance and make decisions regarding those peaks (like picking just one of the peaks and then interpolating the precise location). $\endgroup$ Commented Nov 25, 2014 at 17:55
  • $\begingroup$ Thank you Robert! This is a good hint, I will look closer at pitch-detection algorithms! $\endgroup$ Commented Nov 26, 2014 at 9:04
  • $\begingroup$ @ElenaHammari Greetings and thanks are automatically removed because they are considered a distraction from the question. Just ask the question and thank people by clicking the upvote arrows. $\endgroup$
    – endolith
    Commented Dec 26, 2014 at 15:36

1 Answer 1


The YIN Algorithm could be of interest to you. It's based on autocorrelation and is used for estimating the fundamental frequency.

A. de Cheveigné, H. Kawahara: YIN, a fundamental frequency estimator for speech and music, Proceedings of ICMC 2005. Download PDF.

A C++ implementation is also available.

  • $\begingroup$ Thank you, Frank! Actually I already have YIN algorithm included in the same library as the algorithm above (which is documented as McLeod/Wyvill normalization scheme). I have profiled the YIN algorithm too, but did not test my methodology on it yet. And it seems that the version of YIN that I have is not the full one (step 6 of the algorithm is excluded), so it is indeed possible to extend further. Thank you for the link to the code! $\endgroup$ Commented Nov 26, 2014 at 13:26
  • $\begingroup$ I have now checked the YIN algorithm in my library and it still gives the same problem, although the results are better. Hope the full version of the algorithm will help :). $\endgroup$ Commented Nov 27, 2014 at 11:05
  • $\begingroup$ @ElenaHammari: If this answer helped, please consider accepting it. $\endgroup$
    – Peter K.
    Commented Mar 26, 2015 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.