0

At the moment I have no code to help me, but the Fast Fourier Transform probably has something to do with my goal.

I would like to take microphone input and 'extract' the notes from the chords, whether they are spoken vowels or instrumental. I want to display the values of the extracted frequencies in a list after a certain cue. The cue is not important.

Thanks for any help, I'll add more if needed

apophis
  • 269
  • 1
  • 3
  • 7
  • FFT does exactly what you want. – soandos May 13 '11 at 11:00
  • Many duplicates with good answers on SO already, e.g. [Chord detection algorithms?](http://stackoverflow.com/questions/4337487/chord-detection-algorithms) – Paul R May 13 '11 at 11:02
  • Yes, but I'm not sure how to use it. Any good tutorials? – apophis May 13 '11 at 11:02
  • FFT will give you the raw frequences, you'll need to conver that into notes yourself (simple transformation). For example, 440Hz is A1 – MattDavey May 13 '11 at 11:07
  • 2
    You really need to **read** some of the previous SO answers - they cover window functions, calculating the power spectrum, estimating frequencies of peaks, etc – Paul R May 13 '11 at 11:27

2 Answers2

1

This has been covered many times on SO already, but essentially you do this:

  • apply window function (e.g. Hanning)
  • calculate FFT to get complex spectrum
  • calculate magnitude (sqrt(re*re+im*im)) to get power spectrum
  • find peaks in power spectrum
Paul R
  • 195,989
  • 32
  • 353
  • 519
0

As others already mentioned there are great questions on SO addressing this in great detail. It should be noted however, that in most of those questions you will read that it is very difficult to extract the notes that make up a chord and will not be exact. You will probably have to end up making an educated guess at best.

Diego
  • 15,030
  • 8
  • 31
  • 46