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

◆ updateBackbeatProfile()

void fl::audio::detector::Backbeat::updateBackbeatProfile ( const fft::Bins & fft)
private

Definition at line 380 of file backbeat.cpp.hpp.

380 {
381 // Update spectral profile using exponential moving average
382 // This learns the typical frequency content of backbeats
383
384 size profileSize = fl::min(mBackbeatSpectralProfile.size(), fft.raw().size());
385
386 for (size i = 0; i < profileSize; i++) {
387 // EMA: profile = alpha * new + (1 - alpha) * old
389 (mProfileAlpha * fft.raw()[i]) +
391 }
392}
AudioAnalyzeFFT1024 fft
vector< float > mBackbeatSpectralProfile
Definition backbeat.h:159
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NOEXCEPT
Definition math.h:71

References mBackbeatSpectralProfile, fl::min(), and mProfileAlpha.

Referenced by update().

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