FFT a few questions

For general discussion related FlowStone
Post Reply
borodadada
Posts: 47
Joined: Sun Jun 02, 2013 5:58 pm

FFT a few questions

Post 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?
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: FFT a few questions

Post 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
Attachments
FFT Comparison (MyCo).fsm
(3.47 KiB) Downloaded 1145 times
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: FFT a few questions

Post by RJHollins »

Hello MyCo,

Just following along to learn.

The posted .fsm loaded fine ... but when I clicked the 'trigger', FS crashes :o
tester
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: FFT a few questions

Post by tester »

The same here.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
User avatar
MyCo
Posts: 718
Joined: Tue Jul 13, 2010 12:33 pm
Location: Germany
Contact:

Re: FFT a few questions

Post by MyCo »

noticed that too, I reported it already to Malc.

I've attached a schematic that has a workaround for the bug.
Attachments
FFT Comparison2 (MyCo).fsm
(3.62 KiB) Downloaded 1181 times
Post Reply