Hello, I am working on a final project, and this project is in audio processing:
I need to be able to enter a WAV file and show the notes it is composed of, change frequencies, analyze which instruments are playing and change them, etc.
I had a few question, and I would be extremley greatful if you could answer them:
- We are trying first to get a file and show its melody. We fugured we would first implement sort of tuner, using fourier transform. That is, only one note playing, we do a fourier transform on it. Now, we get several frequencies and we need to find the dominant. Ideas we had:
a. return the frequency with maximal amplitude - this isn’t working so well becuase of noise.
b. we have x an array of samples on which we did fourier transform. Now, we thought about calculatin a difference series, that is dx_=x-x[i-1], which is sort of a discrete differntial, and we can detect local maximum points (that is peaks) using this method.
c. another method we thought about is like a, finding maximum, but instead of one, finding something like 10 maximum and then with these result, find which values are multiplication of other values, and by this distinguishing noise from “real” note.
No, I also tried to draw the fourier result as a graph and look at the peaks, but when I enter a C note, it has peaks at 35 Hz, 71 Hz, 286 Hz etc. These are multiplications of 35 of course, but I expected it ti output something closer to 261.626 - and 280 is closer to C#. I also thought that maybe 35 Hz isn;t the real frequncy and that it needs multiplication by 2*PI, but this is still doesn’t get ti 261.626 (or multiplication of this value).
So, basically, I am finding a way to figure out which note is the dominant note.
- After this is done, we need to somehow divide the entire smapled points to sub-sets, such that each has only one dominant note. That is if I sing “Old McDonald has a farm”, and the notes are, per say, C E G D D F C, then somehow divide it correctly so that we can activate the algorithm from 1 and find that note. Any suggestion on how to do this?
- Then we also need to be able to identify sounds. I read here that such un-mixing is impossible. Then at least is it possible for one instrument playing or two?
I thought for this section I could first identify the note played using algorithm 1, say it is a D note. Then use a bank of D notes of a piano, guitar, fiddle etc. and find the one that is most similiar in form to the sampled input.
Thank you so much
for your time and effort._