View Full Version : float32 application: FFT

reimay

11-10-2006, 05:03 PM

Hello all,

I use the float32 library to perform a Fast Fourier Transform on Propeller.

To take a step forward, i implement the algo in spin.

In next step i want to alter to native assembler.

Also I would like to process real world input signal.

Currently the program calculate several input signals, run the fft and display

the result on vga screen.

The input signals from left to right are a linear ramp, a dirac impuls, a sine

and a sin/cos mix.

Under the inputs the corresponding fft results are displayed.

My roadmap is:

·change to assembler

·use real signals ( e.g. microphone sample )

·very interesting experiments:

··make it sense split the fft in several cogs

··e.g. one cog run the sin multiplication, another run the cos multiplication ... ( like a vector processor )

· ...

· ...

·· HAVE FUN WITH THE PROPELLER

Best Regards

p.s.: please excuse for my broken english

alex2

11-12-2006, 02:32 AM

Has anyone benchmarked fft on propeller using assembly vs. spin ?

I would love to see someone from parallax get involved and produce

code objects for real and complex ffts for different fft algorithms.

Can you parallax guys do that ?

M. K. Borri

11-12-2006, 07:37 AM

That's really cookies! I've been using a PICAXE-08 as a slave ADC for the Prop, basically I have it do analog voltages to NMEA-like strings. Not the best ADC in the world, but very cheap.

Hi reimay.

Reimay said...

My roadmap is:

·change to assembler

·use real signals ( e.g. microphone sample )

·very interesting experiments:

··make it sense split the fft in several cogs

··e.g. one cog run the sin multiplication, another run the cos multiplication ... ( like a vector processor )

Good job !!

Really could be great, get a reverb effect in real time....would be possible in assembler with the PChip ?

Regards.

Alberto.

Jim C

11-16-2006, 05:55 AM

Reimay:

This is excellent. A great way to learn about FFT's.

Is there any chance you have done a similar program to calculate the inverse FFT?

Thanks,

Jim C

reimay

11-16-2006, 05:36 PM

Hi Jim C,

I will do the IFFT in next time.

Here is a link for a intuitive FFT entry:

http://sepwww.stanford.edu/oldsep/hale/FftLab.html

This was very helpfull for myself.

Best Regard, reimay

DaveF

11-20-2006, 10:00 AM

Reimay,

I am trying to do something very similar.· I would like the prop to be able to read the levels of certain frequencies within an audio signal.· Do you think your work is capable of doing this?· If so, do you think you could help me make it work?

Thanks!

Dave

DaveF

11-21-2006, 05:09 AM

I forgot to say please!-- PLEASE!

:)

Robert Humiston

11-22-2006, 03:02 AM

I wonder if FFT could be used for frequency counting application. I am working on Frequency generator / Frequency counter and this FFT looks interesting because I could use it as a test suite for audio. The one pronlem with frequency counter it almost always uses square waves to count which means I need to have a waveshpaer for an input if i could do this with FFT I would not need and could detect hopefulle fairly low level signals

reimay

11-22-2006, 05:03 PM

Hi DaveF,

Since I work on this application only after my work, this is very slow in progress.

I found several items:

The Floating point engine is too slow for real time application.

I measured 160 ms for this 64 point FFT. (fast enough to analyse earthquakes, but not audio http://forums.parallax.com/images/smilies/wink.gif

Off Course this algo is not optimized, but I think the better way is to use a fixed point calculation,

instead the floating point.

So I have to learn about fixed point stuff, and I can not guess when finished.

Best Regards, reimay

reimay

11-22-2006, 05:21 PM

Post scriptum:

If I say : this algo is not optimized

I mean my FFT- Algorithm, not the Float32- Object !!!!!!!!!

Best Regards, reimay

DaveF

11-22-2006, 10:02 PM

Thanks Reimay. Please let me know what you end up with. I am very interested!