[music-dsp] Detecting notes in samples

Axel Nackaerts Axel.Nackaerts at esat.kuleuven.ac.be
Mon Dec 11 04:13:13 EST 2000


"Sergio R. Caprile" wrote:

> >
> > Is there an algoritm to find the fundamentanal frequency of a sound?
> > ie I would like to sample a note lets say A4 from a piano, and find a =
> > frequency wich I can compare with other notes from the piano to figure =
> > out what they are!
>
> I tried to do it by measuring frequency (with a counter) a lot of time ago,
> but had many problems I could not explain at that time: chromatic errors of a
> half tone on "random" situations.
> Then, I found an article on the internet explaining what could have been the
> problem: pitch is not the fundamental frequency, pitch is the brain
> perception of the auditory system signals.

not much to add here.  There are several methods to determine the pitch for
non-realtime applications.  I have a master's thesis here (unfortunately in
Dutch) that goes over the methods.  These are (I selected the best ones)

* lowest peak in fft
* highest peak in fft
* peak with most harmonics
* frequency that matches as a fundamental with most of the other peaks (Xavier
Serra's method, note that this doen't mean that this frequency really appears in
the signal)


> Most of standard methods have a (noticeable) delay on low frequency notes,
> because of the time it takes to have a whole period (18 ms for just one
> period on a 55 Hz A, a bass' 3rd string), and you want to have a good
> resolution in frequency, you need to take lot of samples in time. I've read
> that developers are using neural networks to predict the note from the
> instrument attack.

Yes.  You can use a combination of two methods:  use a slow method (like the
ones above) to accurately determine the pitch and a fast method (like a NN,
trained with the results of the slow method).  This way you can have a adaptive
system that improves the more you use it.

regards,

Axel Nackaerts

--
-----------------------------------------------------------------------
- Axel Nackaerts   ---   nackaert at esat.kuleuven.ac.be  ----------------
- KULeuven - Fac. of Engineering - Dept. ESAT - SISTA/ACCA ------------
- http://www.esat.kuleuven.ac.be/~nackaert/   -------------------------
-----------------------------------------------------------------------
- ESAT, Kardinaal Mercierlaan 94, B-3001 Heverlee, BELGIUM            -
- tel. (32)(16)321800                                                 -
-----------------------------------------------------------------------
- Music synthesis research : Physical modeling                        -
-----------------------------------------------------------------------




dupswapdrop -- the music-dsp mailing list and website: subscription info,
FAQ, source code archive, list archive, book reviews, dsp links
http://shoko.calarts.edu/musicdsp/




More information about the music-dsp mailing list