Help with FFT of raw data.

Status
Not open for further replies.

Suyash

New member
Hello there. I am trying to write a code for teensy 3.6 where I have raw data(which I have recorded from one of the analog pins) in my SD card, and I want to get its FFT. I have been working with teensy for quite a long time, however I am a complete beginner at using FFT on Teensy. Please suggest me something on these lines. I did try to find out existing posts that can help, but I could not locate something that is similar to my requirements. Thanks in advance.
 
There is a sample with the Audio Tutorial Workshop that might apply. It has Sound samples in memory and gets and shows FFT data. Seems that code is in here: ...\teensy\avr\libraries\Audio\examples\Tutorial\Part_3_02_Fourier_Transform
 
Thanks for the reply. Actually this example applies to data with data that has 1024 data points. I have around 200000 data points(or a power of 2 near to that), whose FFT I want to find out. So I was looking for a more generalized method.
 
That sample as I see it has data points in flash of :: unsigned int AudioSampleGuitar[36929];

It does an FFT of size 1024 over those data points - that are a properly encoded music sample.

Quick web search shows a problem similar to post #3 : stackoverflow.com/ ... /1024-pt-fft-on-a-large-set-of-data-points

Depends on what your unspecified data is and what you want from it - but in any case that sample seems a start point for what is part of Teensy Audio library where 1024 is the largest:
AudioAnalyzeFFT1024
Summary
Compute a 1024 point Fast Fourier Transform (FFT) frequency analysis, with real value (magnitude) output. The frequency resolution is 43 Hz, useful detailed for audio visualization.
 
Thanks for the reply. Actually this example applies to data with data that has 1024 data points. I have around 200000 data points(or a power of 2 near to that), whose FFT I want to find out. So I was looking for a more generalized method.

You hardly can do a 200000 point FFT on a teensy, so you have to do one of the overlap-save or overlap-discard algorithms.
Search this forum for 'overlap fft' and you will get some nice examples (esp. by dd4wh) which you could adapt to your problem.
 
Status
Not open for further replies.
Back
Top