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

◆ binToFreq()

float fl::audio::fft::Bins::binToFreq ( int i) const

Definition at line 104 of file fft.cpp.hpp.

104 {
105 int nbands = static_cast<int>(mBinsRaw.size());
106 if (nbands <= 1) return mFmin;
107 float m = fl::logf(mFmax / mFmin);
108 return mFmin * fl::expf(m * static_cast<float>(i) / static_cast<float>(nbands - 1));
109}
fl::vector< float > mBinsRaw
Definition fft.h:110
float expf(float value) FL_NOEXCEPT
Definition math.h:398
float logf(float value) FL_NOEXCEPT
Definition math.h:418

References fl::expf(), fl::logf(), mBinsRaw, mFmax, and mFmin.

Referenced by binBoundary(), operator=(), and fl::audio::detector::EqualizerDetector::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: