I don't suppose anyone is aware of any libraries that allow you to detect the current pitch (that is, in notes) received by the microphone in Mac OS X? I'm assuming it'd be a mixture of Objective-C and some provided lib. Or else in Java for multi-platform goodness?
musical DSP solutions are difficult. finding something particularly GOOD and packed in a library and for free is very optimistic. (the music software industry being as competitive as it is...)
a useful repository of source code can be found at http://www.musicdsp.org/
otherwise, Miller Puckette's Fiddle~ code does pretty much exactly what you describe. it is not a library, though (it is an extension to PD). but the source is available AFAIK
good luck,
|K<
Transcribe is excellent. It will show you the pitch of a recording, and show you which piano keys.
If you are looking to write this yourself, have a look at FFT (Fast fourier transform) algorithms. Its actually quite easy to implement. Id do the FFT (which converts a signal into its frequency components) and then just pick out the top one.
There are some code snippets here that describe auto-correlation for pitch.
http://www.iwillapps.com/wordpress/?p=212
http://www.iwillapps.com/wordpress/?p=214
Also, this is a great "explanation" on two types of pitch detection http://cnx.org/content/m11714/latest/):
- time-domain autocorrelation
- frequency-domain harmonic product spectrum.