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

◆ _generate_guassian()

void _generate_guassian ( kiss_fft_scalar window[],
int N )

Definition at line 56 of file cq_kernel.cpp.hpp.

56 {
57 fft_float_t sigma = 0.5; // makes a window accurate to -30dB from peak, but smaller sigma is more accurate
58 for(int i = 0; i < N; i++){
59 #ifdef FIXED_POINT // If fixed_point, represent window with integers
60 window[i] = SAMP_MAX*FFT_EXP(-0.5*FFT_POW((i-N/2.0)/(sigma*N/2.0), 2.0));
61 #else // Else if floating point, represent window as-is
62 window[i] = FFT_EXP(-0.5*FFT_POW((i-N/2.0)/(sigma*N/2.0), 2.0));
63 #endif
64 }
65}
#define SAMP_MAX
#define FFT_EXP(x)
#define FFT_POW(x, y)
float fft_float_t

References FFT_EXP, FFT_POW, FL_NOEXCEPT, kiss_fft_scalar, and SAMP_MAX.

Referenced by _generate_kernel().

+ Here is the caller graph for this function: