Extracting notes from chords in C#
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 lik开发者_StackOverflow中文版e 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
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
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.
精彩评论