Sound2Light auf RGB(W)-LED-Leisten
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fft.h 727B

12345678910111213141516171819202122
  1. /*
  2. * vim: sw=2 ts=2 expandtab
  3. *
  4. * THE PIZZA-WARE LICENSE" (derived from "THE BEER-WARE LICENCE"):
  5. * <cfr34k@tkolb.de> wrote this file. As long as you retain this notice you can
  6. * do whatever you want with this stuff. If we meet some day, and you think
  7. * this stuff is worth it, you can buy me a pizza in return. - Thomas Kolb
  8. */
  9. #ifndef FFT_H
  10. #define FFT_H
  11. #include "config.h"
  12. void init_fft(void);
  13. void complex_to_absolute(double *re, double *im, double *result);
  14. void apply_hanning(sample *dftinput);
  15. void fft_transform(sample *samples, double *resultRe, double *resultIm);
  16. uint32_t find_loudest_frequency(double *absFFT);
  17. double get_energy_in_band(double *fft, uint32_t minFreq, uint32_t maxFreq);
  18. #endif // FFT_H