# Re: Detection of harmonics and rhythmic structure ("James W. Beauchamp" )

```Subject: Re: Detection of harmonics and rhythmic structure
From:    "James W. Beauchamp"  <j-beauch(at)UX1.CSO.UIUC.EDU>
Date:    Thu, 11 May 2000 16:09:50 -0500

Brian Gygi wrote:
>Does anyone know some good algorithms for determining a) the presence or
>absence of harmonics in a signal (non-speech), and b) whether the signal
>is discrete or rhythmic (repetitive)?  I can imagine that these two
>questions are related, one is in the frequency domain and one in the time
>domain.  I have fooled around with autocorrelations, but want to be able
>to extract a number that would capture the amount of either harmonic or
>rhythmic structure in a signal.

You could try looking at the autocorrelation function for the spectrum
and rms amplitude functions. I.e.,

In the frequency domain:
1) produce a copy of the spectrum shifted by a frequency increment
2) multiply the original and shifted spectrum.
3) average over frequency and index and save result
4) repeat steps 1-3
5) plot result vs. index
6) if there is a pronounced peak in the graph, it corresponds to the pitch
of the harmonics; if there is no pronounced peak, must be no harmonics.

In the time domain:
1) compute the rms amplitude vs. time of the signal
2) do the same thing as the frequency domain by replacing frequency by time.
3) a pronouced peak would correspond to the period of repetition; if there
is no pronouced peak, there must be no repetition.

This is a simple-minded approach, and I'm sure there are more sophisticated
algorithms, but it is a start.

Jim Beauchamp
University of Illinois at Urbana-Champaign
j-beauch(at)uiuc.edu
```

This message came from the mail archive
http://www.auditory.org/postings/2000/
maintained by:
DAn Ellis <dpwe@ee.columbia.edu>
Electrical Engineering Dept., Columbia University