3 ms·
Performance? Man, I wish someone would release a decent tutorial on how to actually use the FFT in real life. There are some decent explanations of FT, but of
by edblarney 10y ago
Performance?
Man, I wish someone would release a decent tutorial on how to actually use the FFT in real life.
There are some decent explanations of FT, but often they fail at the very end of FFT: what the output means, explicitly.
Particularly, this concern of 'the same freq. appearing in many buckets' due to issues of the phase of the wave?
So much theory, so much Matlab ... so little actual applied Engineering. Making 'stuff work' in the real world is basket of caveats ... looking forward to that article: 'FFT in the wild' :)
- ww520 10y agoI was baffled by FFT, too, when I first encountered in math class. It seemed useless. It's not until I started working with sound that it really dawned on me how it's being used. I think the best illustrated usage of DFT (FFT is just the fast algorithm of DFT) is the sound equalizer. Sound comes in. DFT converts it into the strength over frequency on the equalizer. You can visually see the strength bars on each frequency slots (from the high, the mid range, to low frequency slots). This let you adjust the frequency strength in each frequency slot individually. You can bump up the high frequency slot or depress the mid range slot. The adjusted frequencies are combined to produce the new distorted sound. When a sound comes in straight, you can only adjust its amplitude (volume). Now with DFT, you can adjust the decomposed frequency components of the sound individually, giving you finer control over the sound's pitch and quality. You can amplify the high frequencies to make it higher pitch. Or amplify the lower frequencies to give more booming bass. You can chop off the low frequency completely to remove background noise. You can chop off both the low and high frequencies to make the sound "clearer." DFT/FFT basically let you control the different dimension of the sound (or any time-based sine wave data).
- edblarney 10y agoThat I get. But the FFT results show all sorts of harmonics and results that effectively need to be further decomposed. It does not produce a the results as you described, in reality. Using FFT to decompose someones speech, I'm getting peaks at 300Hz, 600Hz, 900Hz etc.. My crude understanding is that those are all related to one another, though I can't quite fathom why. I fully grasp the example you give ... but the actual results are something bewildering altogether ...
- ww520 10y agoI'm afraid the interpretation of the output of FFT really has to go into some theory and the text book version of it. Here're some good description on the time-domain and frequency-domain of the FFT. http://www.dspguide.com/ch8/2.htm http://www.dspguide.com/ch8/2.htm, http://www.dspguide.com/ch8/3.htm http://www.dspguide.com/ch8/3.htm. As for the output you got, the peaks at 300Hz, 600Hz, 900Hz, etc are the signal strength level at those frequencies of the speech. A voice is made up of many different frequencies at various strength levels. Most frequencies of a voice have nearly 0 energy. Some have more energy, with varying levels of strength. DFT breaks the voice down and figures out the strength levels for all the frequencies. The frequency range in human voice is from about 70Hz to 10KHz. That's why you see some strength at 300Hz, 600Hz, and 900Hz. Instead of just describing a voice as volume over time, DFT decomposes it into an array of frequency strengths, giving you the frequency characteristic of the voice. The index into the FFT output array identifies the frequency. Let's say you sample the signal at 10000Hz (10000 samples per second). And you pass only 1000 samples into FFT. FFT always spits out an array F with half of the input size, i.e. 500 elements. Each element represents a frequency fraction with respect to the input size. So F[0] is at 1/1000 fraction, F[1] at 2/1000 fraction, etc, upto F[499] at 500/1000 fraction. To convert back to the real frequency, just multiply the fraction to the sampling rate. F[0] with 1/1000 * 10000Hz = at 10Hz. F[1] with 2/1000 * 10000Hz = at 20Hz, F[499] at 500Hz. The values at F[0], F[1], etc are the signal strength at those frequencies.
- qb45 10y ago> Using FFT to decompose someones speech, I'm getting peaks at 300Hz, 600Hz, 900Hz etc.. My crude understanding is that those are all related to one another, though I can't quite fathom why. This is not a quirk of FT but a result of the way physical things actually vibrate. You get this output from FT because your input consists of 300/600/900/...Hz sinewaves superimposed on each other. https://en.wikipedia.org/wiki/Harmonics https://en.wikipedia.org/wiki/Harmonics
- edblarney 10y agoThere is a person talking - that's it. The peaks at 600Hz and 900Hz are higher than 300Hz. Humans can't make speech at 600 and 900Hz, is my understanding. Listening to it, I don't hear those frequencies. So it's hard for me to understand how they are there.
- nkurz 10y agoHere's an article from a couple weeks ago that uses FFT as part of a machine learning algorithm to categorize music by genre: https://news.ycombinator.com/item?id=13078165 https://news.ycombinator.com/item?id=13078165