PSN-L Email List Message

Subject: Re: FFT BASIC Source Code
From: Ben Bradley benbradley@...............
Date: Sun, 08 Jul 2007 17:58:17 -0500


Geoffrey wrote:
> Hello PSN;
>
> I found my very old notes from ASU Nobel Science Library regarding
> FFT basic program and I think it shows
> the source material it was found in.
>
> Can someone who understands FFT please look at this
> and comment to me at my address gmvoeth@........... or to PSN or to Both.

   You can get a better understanding of the Fourier Transform and FFT 
from many places online. Here's one:
http://www.dspguide.com/
>
> I intend to make a DOS executable program to use
> 8 bit data that will display the results in 640X480X256 if at all 
> possible. I will share my results if things look good.
>
> The only question I have is that about real and imaginary.
>
> I assume real means sine of the data and imaginary means cosine of the 
> data

   As I recall, Cosine is the "real" part and Sine is the "Imaginary" part.

> and the angle relates to the sample rate vs the desired frequency and 
> summed acxcording to the sample number and that the complete butterfly 
> operation needs
> to be done 1024 times for each desired freq to look at.
> The bandwidth of each freq will be related to the number of samples 
> processed. What I do not understand is how
> can you measure frequency unless you start out in phase
> with the freq you are looking for ??

   The complex Fourier Transform tells you both the frequency and the 
phase. It may seem like magic, but there's a graphical way of 
understanding it.

>
> Basic Source code for the FFT is very hard to find.

   I suppose BASIC is now considered obsolete, except for some of the 
Visual Basics found in Microsoft products, and even those may have been 
phased out by now.
>
> Out of that whole library in the 1980s this is the only basic example 
> I found.
>
> Maybe one of you experts can tell me if this program is honestly workable
> and the results will be proper ?
>
> I understand to save space you can use
> the same memory locations as the original data
> to put the results into but it (results) will be reversed
> and you need to start your freq display using the highest
> result (N) as the lowest Frq in the display (N).
>
> This computation although it is called FFT is very
> labor intensive and the time will increase exponentially
> to get the results according to the number of samples
> you process each line.
>
> If Im not mistaken it took me several minutes with the 10MHz VIC20 
> chip CPU
> to complete a single spectrum line using only 1024 samples.
> Today my machine is P4 3GHz so I should expect seconds instead of 
> minutes.
   An optimized, compiled program on a modern PC should be able to do a 
1024 point complex FFT in a very few milliseconds. This speed is helpful 
if you want to create waterfall plots, which (as I understand it) are 
made with many repeated FFT's over time.
>
> Notes:
> *****************************
> http://gmvoeth.home.mchsi.com/FFT_Basic_Source.bmp

   Actually, that's a FORTRAN source. Offhand it looks okay to me, but 
don't take my word for it.
>
> ******************************
>
> Regards;
> geoff
__________________________________________________________

Public Seismic Network Mailing List (PSN-L)


[ Top ] [ Back ] [ Home Page ]