Go Down

Topic: Simple FFT Algorithm? (Read 1 time) previous topic - next topic

P18F4550

The last FFT i did was with Borland Visual C++, it involved listening to two morse code stations close together but only decoding the loudest (this was on a shortwave receiver), it invloved breaking the band into 8 frequency ranges 1kzh, 2khz, 3khz.....so you take 16 samples then you calculated the difference between samples 1&9, 2&10 and so on and basically end up with an 8 band spectrum analiser, don't ask me to do it now though, it was 10 years ago and i still haven't recovered lol.
el_supremo is quite correct

el_supremo

This is very simplified, but the result of computing the FFT of a signal is an array of numbers . Each element of the array (often referred to as a "bin") corresponds to a small range of frequencies in the input signal. The value in each element allows you to determine the amplitude of the signal corresponding to that frequency.
Subtracting successive voltages only tells you the rate at which the voltage is changing. That doesn't tell you what the frequency is. If it did there would be no need for an FFT.

Quote
i am in kind of hurry

You're really going to have to slow down if you want to understand what the FFT does. To start with, to understand the FFT you have to understand the mathematical concept of complex numbers. If you don't know that, you've got a long way to go.

But if you're in a hurry, the executive summary is that what you're doing isn't an FFT.


Pete

FFTMaster


This is very simplified, but the result of computing the FFT of a signal is an array of numbers . Each element of the array (often referred to as a "bin") corresponds to a small range of frequencies in the input signal. The value in each element allows you to determine the amplitude of the signal corresponding to that frequency.
Subtracting successive voltages only tells you the rate at which the voltage is changing. That doesn't tell you what the frequency is. If it did there would be no need for an FFT.

Quote
i am in kind of hurry

You're really going to have to slow down if you want to understand what the FFT does. To start with, to understand the FFT you have to understand the mathematical concept of complex numbers. If you don't know that, you've got a long way to go.

But if you're in a hurry, the executive summary is that what you're doing isn't an FFT.


Pete

Yeah, since i am in a hurry i am not going to use FFT right now i guess... unless my "algorithm" has some kind of fatal weakness....
About complex numbers and math... It is not like i dont know what are complex numbers and stuff... i have been studying in university for 3 ears already(actually this project is my bachelor's work and we are not given much time).
Sorry if i am being persistent by saying same thing all over again, i just think that u did not really understand what i wrote, since my language and explanations are pretty messy.
As i said before substracting is not the keypoint of this algorithm.
I get voltage signal from audio output(example values 252, 50, 100). And now what i do is look in which range of values it goes. For example if i have 5 columns i make ranges like: 0-49, 50-100, 100-150, 150-200, 200-infinity. I have columns array with 5 elements. So if i get 135 i add to columns[2]++. So basically it seems that i do the same thing as it was written in wikipedia? I do the sampling. Then i create an array which tells me how frequently(in the time of sampling) i get the values into those ranges.
Sorry if u did understand it before.
If i am wrong then i do not really understand what it means to have X as frequency. I understand that frequency is basically how many times in a time something happens? As i understand then those Hz are basically saying how often did i get value Y(voltage). If it was not frequent then  its somewhere near 0 and if it was frequent it goes somewhere to the right. If that is correct then i do get that, i get how frequently i get values in ranges predefined.

dxw00d

If I understand it correctly, your algorithm analyses amplitude over time, and assign different amplitudes to your column array. An FFT algorithm, (again, as I understand it), effectively breaks down the incoming signal into different frequency bands (for example, bass frequencies, mid-range frequencies and high-range frequencies) and then analyses the amplitude of each band, which would then be assigned to the columns.

FFTMaster

#9
Apr 11, 2012, 12:08 pm Last Edit: Apr 11, 2012, 12:11 pm by FFTMaster Reason: 1

If I understand it correctly, your algorithm analyses amplitude over time, and assign different amplitudes to your column array. An FFT algorithm, (again, as I understand it), effectively breaks down the incoming signal into different frequency bands (for example, bass frequencies, mid-range frequencies and high-range frequencies) and then analyses the amplitude of each band, which would then be assigned to the columns.

Okay, do you mean to say that for example from audio output comes 225 and it somehow breaks it into components? Is that really possible? Well if it is like that then it is really my bad:D Thank you for sharing with me. And yes if u want to visualize your audio, my method seems to be pretty nice.
It is laggy(phone camera), but at the end of it you can see the visualization. I have only 5 columns working, since it is what is needed for my project.
http://www.youtube.com/watch?v=OsCOHLGSN_8
UPDATE: If i understand correctly breking into frequencies means breaking the complex sound wave into simple sin and cos waves?

Go Up