MCPcopy Create free account
hub / github.com/FastLED/FastLED / reset

Method reset

src/fl/audio/detector/beat.cpp.hpp:67–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void Beat::reset() {
68 mBeatDetected = false;
69 mBPM = 120.0f;
70 mPhase = 0.0f;
71 mConfidence = 0.0f;
72 mSpectralFlux = 0.0f;
73 mLastBeatTime = 0;
74 mBeatInterval = 500;
75 mAdaptiveThreshold = 0.0f;
76 fl::fill(mPreviousMagnitudes.begin(), mPreviousMagnitudes.end(), 0.0f);
77 mFluxAvg.reset();
78}
79
80float Beat::calculateSpectralFlux(const fft::Bins& fft) {
81 float flux = 0.0f;

Callers

nothing calls this directly

Calls 3

fillFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected