2

I want to make a program that recognizes the notes I play over the microphone with my guitar, but I'm not sure how I will make my program recognize the sounds I play, and then make the program choose between a bunch of notes. Can I have any help with this? I basically need a library, which is able to recognize sound played over the microphone, and then compare it to different audio files, and see which one is the closest to the played note. I hope you guys understand this now, it is hard to explain.

Charles
  • 50,943
  • 13
  • 104
  • 142
Stan
  • 3,659
  • 14
  • 35
  • 42
  • One thing to consider is that you shouldn't need to compare to example sounds. Notes are frequencies and it's possible to determine the frequency spectrum of a sound. For more information, I recommend reading about [Fourier Transforms](http://en.wikipedia.org/wiki/Discrete_Fourier_transform). There may be subtleties relating to fidelity of the microphone (it may distort the signal somewhat), but this might give you a place to start. – Dan Bryant Oct 19 '12 at 20:37
  • Check this question: http://stackoverflow.com/questions/170394/fast-fourier-transform-in-c-sharp – vz0 Oct 20 '12 at 01:57

1 Answers1

1

As Dan Bryant mentioned, you basically want to do an FFT, which gives you the amount of energy at different frequencies. Find the frequency with maximum energy, then choose the note whose frequency is closest to that. This is what is going in the little digital tuners you buy that help you tune your guitar. There are several available libraries that will do the FFT for you. You just need to specify an FFT size that gives you enough frequency resolution to distinguish between notes.

TJD
  • 11,800
  • 1
  • 26
  • 34