Yep, finally coming back to the technical blog, after all of this time. Just haven’t had the strength to come up with something during school, so now that its break, I got all the time and energy in the world.
I’ve become more intimately familiar with the concept of the Fourier transform and have a better understanding of the data that would go into an FFT algorithm and the data that comes out. I have a better idea of why all FFT’s are approximations, what their shortcomings are, and when they’re important.
Now, without further gloating, I have some new ideas to get the ball rolling on writing some music. Today I did an experiment with a guitar recording. I recorded me plucking a guitar string and used Audacity’s “Frequency Analysis” feature, which is actually a very nice tool. This is the frequency spectrum (the loudness of each tone) of the recording.
The peaks tell me the tones that the guitar produces. With this information, I can reconstruct an electronic version of the guitar pluck. Basically, I observe the amplitude of each peak, what frequency each peak is, then reconstruct the signal from that.
This is done by the following algorithm (simplified version of the IDFT, does not contain phase angles):
Signal = A1sin(2πf1t) + A2sin(2πf2t) + …
Basically, An represents the height of a particular peak and fn represents the frequency at which the peak occurs.
I used the same C program as before to fabricate the sound. All I did was plug in the numbers I got and ran. It actually worked very well. Compare the recording and the recreation.
********************************************************
Guitar Recording:
click
********************************************************
********************************************************
Guitar Recreation:
click
********************************************************
I think I’m going to spend some time figuring out how I can create an automatic procedure for recording tones, exporting the frequency response raw data, then directly fabricating the sound from the raw data file.
This seems like a nice way to create simple sounds, but there is an issue here involving the short comings of FFT algorithms. The very nature of how a Fourier Transform is calculated makes this whole process a significant approximation. There are two untrue assumptions that explain this.
1.) The signal’s frequency response is not dependent on time.
2.) The signal is sampled during an infinitely long time interval.
Since generally speaking these two things are not true, there are only certain types of sounds that can be fabricated electronically by using the procedure provided in this entry. The best candidates are sounds that do not change much with time and are at least a few seconds in length. Most instruments should be fine candidates since while the instrument is playing a single note, the system is linear (meaning that the frequency response is not changing with time). Even the sound of drums can be recreated since drums are for the most part, linear.
EDIT——————————————————————————————
I inspected the frequency response of me saying “wahhh” and it seems that my explanation for how the mouth filters the sound is inaccurate. When the mouth is open, higher frequencies are propagating more easily. I suppose this could be happening because when the mouth is closed, all you hear is the lower frequency sound penetrating through the throat. Then when the mouth is open, the higher frequencies have a path to get out of the throat.
————————————————————————————————
An example of something that would not work well is a person speaking. The whole process of forming words requires changing tones based on the conventions established by that language. For example, making the “waaahh” sound requires you to sweep from high frequency to low frequency in a particular way. This is done by first producing a tone from the larynx then filtering it with the shape of the mouth. A small mouth starts a “waaah” and a large mouth finishes the “waaah.” A small mouth will only allow higher frequencies to escape because their wavelengths are small enough to allow them to propagate through. As the mouth opens, lower frequencies are allowed out as well.










