Since my last post, I have finished my project and graduated from college. This winter I relocated my website to a new address. You can now find it at http://jasonrhine.cabspace.com/SeniorProject/index.htm
If you want to try out my final program, I have made it available on my Documents page along with recordings of different instruments to test the program.
While I was working on this project I noticed that the shape of a single
instrument's harmonic profile will change when it plays notes at different
frequencies. As shown in the images I attached to this email, when a trumpet is
played at a lower frequency, its earlier harmonics may have a larger relative
amplitude. As the frequency increases, the later harmonics decrease in amplitude
until there may only be around 1 or 2 main harmonics left by the time you get to
around 900 hz.
In order to account for the dramatic change in
the harmonic profile of these instruments, I built a library consisting of many
samples of each type of instrument over a range of different frequencies. This
allows the program to more accurately recognise the instrument over a broader
range of frequencies. The basic function of my program is that by storing the
harmonic profiles of instrument, it is able to "remember" what different types
of instruments sound like when they sustain a note. When you play a recording,
the program compares its harmonic profile with all the previously stored
profiles, and identifies the instrument as whichever type matches the closest.
My final program seems to work well. With the recordings I have. If you make new recordings, you will need to make sure that the .wav file does not contain the points in time when the instrument starts and stops playing the note. This program analyzes periodic waveforms, so the recordings used must consist of a constant sustained note.
After getting my main program finished, I added a section that allows you to manipulate an instrument's harmonic profile. You can select a file where you had previously captured the harmonic profile of a recording, and by using slider controls, you can change the shape of the harmonics. For example, if you had selected the profile of a Flute, which has large first and second harmonics, you can raise the value of some of the later lower valued harmonics. You can tell what frequency you want the note to be played at, and the program will then recreate the sound described by the harmonic profile you have created. This is an interesting feature to play around with because it gives you an audible idea of how the relative amplitudes of a harmonic profile effect the overall sound.