sparkfun / SparkFun_Artemis

World's first open source hardware module using a Cortex-M4F capable of running TensorFlow models and Arduino sketches..
Other
37 stars 4 forks source link

examples and wrappers for using core FFT algorithms #5

Open jerabaul29 opened 3 years ago

jerabaul29 commented 3 years ago

Hi,

First, thank you for releasing this very exciting board.

This issue may be better posted at another place; if this is the case, please just let me know and I will move it.

I see that the processor supports taking FFTs in an effective way:

https://github.com/sparkfun/OpenLog_Artemis_Geophone_Logger/blob/master/Firmware/OpenLog_Artemis_Geophone_Logger/Geophone.ino

However, there is still quite a bit of low level "obfuscation" for n00bs like me to use it.

Would it be possible to get a few wrappers that provide a dead simple interface to take a FFT on some data, for example something like:

constexpr size_t fft_size = 512;

class FFT_Analyzer{
  public:
    float16_t timeseries_in_real[fft_size];
    float16_t timeseries_in_complex[fft_size];
    float16_t fft_out_real[fft_size];
    float16_t fft_out_complex[fft_size];
    void perform_fft(void);
};

or something like this, which would simply perform the fft analysis from the timeseries_in into the fft_out, with documentation of what the admissible buffer sizes are, and other possible tricks and tips?

Many thanks in advance!