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

Method reset

src/fl/audio/detector/transient.cpp.hpp:73–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void Transient::reset() {
74 mTransientDetected = false;
75 mStrength = 0.0f;
76 mLastTransientTime = 0;
77 mPreviousEnergy = 0.0f;
78 mCurrentEnergy = 0.0f;
79 mAttackTime = 0.0f;
80 fl::fill(mPreviousHighFreq.begin(), mPreviousHighFreq.end(), 0.0f);
81 mEnergyHistory.clear();
82 mEnergyOutlierFilter.reset();
83}
84
85float Transient::calculateHighFreqEnergy(const fft::Bins& fft) {
86 // Focus on mid-high to high frequencies (bins 4-15) for transient detection

Callers

nothing calls this directly

Calls 4

fillFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected