Page 1 of 1

FFT a few questions

Posted: Sun Jun 02, 2013 6:13 pm
by borodadada
http://rghost.ru/46459517/image.png <--- Image, Forum use only 400px.

Hello, tell me, why in the translation values ​​in a comprehensive form, the first value in the 2 arrays are not true?

I use Graph, can I use another component (not Graph)to get an array F of stream?
If only Graph use this methode, how create auto get? I use trigger...

How convert array F of data in stream?

Re: FFT a few questions

Posted: Mon Jun 03, 2013 3:03 pm
by MyCo
Hi, and welcome to the forum!

The first FFT Bin contains the DC Offset of your waveform. So if your waveform isn't center arround 0, than you'll get really high values there.

I've attached a schematic that shows the effect of a DC-Remover to the FFT. The schematic also demonstrates the difference between the 2 nearly similare primitives "Graph FFT" and "FFT". The "Graph FFT" is unscaled, this means the result values are multiplied by the array length. The "FFT" primitive works with scaled values and that's also why you shouldn't use "Graph FFT" with the "Mag/Phase"primitives, the result wouldn't be correct.

Your way of converting Stream for Float Array is the right way. You have to trigger "get", when you want to update your FFT.
Converting a Float Array to Stream, is a very difficult task. You have to convert the Float Array into a memory (those gray/black rectangle connectors), and then you have to use some kind of waveplayer to play it back. If your goal is Realtime FFT/iFFT, then I've to disappoint you, this is at the moment not possible with primitives. It could be done with Ruby, but nobody done that before.

Regards
Maik

Re: FFT a few questions

Posted: Mon Jun 03, 2013 5:53 pm
by RJHollins
Hello MyCo,

Just following along to learn.

The posted .fsm loaded fine ... but when I clicked the 'trigger', FS crashes :o

Re: FFT a few questions

Posted: Mon Jun 03, 2013 6:17 pm
by tester
The same here.

Re: FFT a few questions

Posted: Mon Jun 03, 2013 6:26 pm
by MyCo
noticed that too, I reported it already to Malc.

I've attached a schematic that has a workaround for the bug.