deque< u32 > mIBIHistory
Inter-beat interval history (in frames)
float mAverageIBI
Average inter-beat interval (in frames)
bool validateBeat(float onsetStrength) FL_NO_EXCEPT
Validate if an onset is a true musical beat.
const Stats & getStats() const FL_NO_EXCEPT
void configure(const MusicalBeatDetectorConfig &config) FL_NO_EXCEPT
Configure the beat detector.
float getBeatConfidence() const FL_NO_EXCEPT
Get beat confidence for the last detected beat.
bool mBeatDetected
Last beat was detected.
float mCurrentBPM
Current BPM estimate (smoothed)
void processSample(bool onsetDetected, float onsetStrength) FL_NO_EXCEPT
Process one audio frame.
void reset() FL_NO_EXCEPT
Reset internal state (clear history, reset BPM)
void updateBPMEstimate() FL_NO_EXCEPT
Update BPM estimate from inter-beat intervals.
float getBPM() const FL_NO_EXCEPT
Get current BPM estimate.
float mLastBeatConfidence
Last beat confidence score.
float calculateIBIStdDev() const FL_NO_EXCEPT
Calculate standard deviation of IBI history.
u32 mCurrentFrame
Current frame counter.
bool isBeat() const FL_NO_EXCEPT
Check if a musical beat was detected in the last frame.
u32 mLastBeatFrame
Last beat timestamp (in frames)
float getAverageIBI() const FL_NO_EXCEPT
Get inter-beat interval (IBI) statistics.
MusicalBeat() FL_NO_EXCEPT
bool isValidIBI(float ibi) const FL_NO_EXCEPT
Check if IBI is within valid BPM range.
float calculateBeatConfidence(float currentIBI) FL_NO_EXCEPT
Calculate beat confidence based on rhythmic consistency.
MusicalBeatDetectorConfig mConfig
Get statistics (for debugging/monitoring)
u32 samplesPerFrame
Samples per frame - used for timing calculations.
u32 sampleRate
Sample rate (Hz) - used for timing calculations.
float maxBPM
Maximum BPM to detect (default: 250 BPM)
float minBeatConfidence
Minimum beat confidence to report a beat (0.0-1.0) Higher values = fewer false positives,...
u32 maxIBIHistory
Maximum number of inter-beat intervals to track Higher values = better BPM estimation,...
float minBPM
Minimum BPM to detect (default: 50 BPM)
float bpmSmoothingAlpha
BPM estimation smoothing factor (0.0-1.0) Higher values = slower BPM adaptation, more stable tempo.
Configuration for musical beat detection.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Base definition for an LED controller.