<< Chapter < Page | Chapter >> Page > |
Now that the frequencies in each window have been found, it is time to determine what note was most likely played to generate each frequency. As we know that each frequency is times larger than the preceding frequency, we can declare the points that are times larger and smaller than the known note frequency to be the limits of the range of frequencies that map to that known note. Thus for a known frequency, , the range of frequencies that map to it is:
If we do this for every known note frequency, then the limits for two adjacent frequency ranges coincide exactly, and we have a function that maps any frequency to a note. Such a function is graphed below.
This is the regression curve we used to map frequencies to notes. A fast way of implementing it is to number each note from 1 to 88, starting with the lowest note that can be played with a piano, and ending at the highest. After doing this, the following Matlab expression will evaluate this curve:
round(12*log(f/27.5)/log(2))+1
Notification Switch
Would you like to follow the 'Elec 301 projects fall 2006' conversation and receive update notifications?