You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
STB-style single header fast fourier transform C library primarily for visualizing frequencies
#defineFFT_IMPLEMENTATION#include"fft.h"intmain(void) {
signed short*samples; // allocate and fill upintnumber_of_samples=4096; // must be power of 2FFTValue*results= (FFTValue*) malloc(number_of_samples*sizeof(*results));
fft_process(results, number_of_samples, 1, samples, 0.5);
for (inti=0; i<number_of_samples; i++) {
floatvalue=fft_get_bar_value(results, number_of_samples, i, number_of_samples, 1);
// DrawFrequencyBar(i, value);
}
}
Please refer to main.c for a complete example using Raylib
$ make
$ ./main Naraka.mp3
About
Single header fast fourier transform C library primarily for visualizing frequencies