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

Method updateAdaptiveThreshold

src/fl/audio/detector/tempo_analyzer.cpp.hpp:149–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149void TempoAnalyzer::updateAdaptiveThreshold() {
150 // O(1) running average via MovingAverage filter
151 float mean = mFluxAvg.update(mPreviousFlux);
152 mAdaptiveThreshold = mean * 1.5f;
153}
154
155bool TempoAnalyzer::detectOnset(u32 timestamp) {
156 // Simple onset detection: flux exceeds adaptive threshold

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected