FastLED 3.9.15
Loading...
Searching...
No Matches

◆ _generate_guassian()

void _generate_guassian ( kiss_fft_scalar window[],
int N )

Definition at line 42 of file cq_kernel.cpp.

42 {
43 float sigma = 0.5; // makes a window accurate to -30dB from peak, but smaller sigma is more accurate
44 for(int i = 0; i < N; i++){
45 #ifdef FIXED_POINT // If fixed_point, represent window with integers
46 window[i] = SAMP_MAX*exp(-0.5*pow((i-N/2.0)/(sigma*N/2.0), 2));
47 #else // Else if floating point, represent window as-is
48 window[i] = exp(-0.5*pow((i-N/2.0)/(sigma*N/2.0), 2));
49 #endif
50 }
51}
#define SAMP_MAX
T exp(T value)
Definition math.h:47

References kiss_fft_scalar, and SAMP_MAX.

Referenced by _generate_kernel().

+ Here is the caller graph for this function: