void detectMeter() FL_NO_EXCEPT
bool needsFFT() const FL_NO_EXCEPT override
void setTimeSignature(u8 beatsPerMeasure) FL_NO_EXCEPT
Manually set time signature (disables auto-detection)
float getMeasurePhase() const FL_NO_EXCEPT
Returns measure phase (0-1, 0 = downbeat)
deque< u8 > mMeterCandidates
void setAutoMeterDetection(bool enable) FL_NO_EXCEPT
Enable/disable automatic meter detection (default: true)
void updateBeatDetector(shared_ptr< Context > context) FL_NO_EXCEPT
const char * getName() const FL_NO_EXCEPT override
float getConfidence() const FL_NO_EXCEPT
Returns downbeat detection confidence (0-1)
u8 getBeatsPerMeasure() const FL_NO_EXCEPT
Returns detected beats per measure (time signature numerator)
float calculateBeatAccent(const fft::Bins &fft, float bassEnergy) FL_NO_EXCEPT
void fireCallbacks() FL_NO_EXCEPT override
void updateMeasurePhase(u32 timestamp) FL_NO_EXCEPT
deque< float > mBeatAccents
function_list< void(float phase)> onMeasurePhase
Fires with measure phase each frame (0-1 range)
Downbeat(shared_ptr< Beat > beatDetector) FL_NO_EXCEPT
Construct with shared Beat (recommended)
void reset() FL_NO_EXCEPT override
Downbeat() FL_NO_EXCEPT
Construct with standalone Beat.
function_list< void()> onDownbeat
Fires on detected downbeat (first beat of measure)
bool needsFFTHistory() const FL_NO_EXCEPT override
bool detectDownbeat(u32 timestamp, float accent) FL_NO_EXCEPT
float mConfidenceThreshold
u8 findMostCommonMeter() const FL_NO_EXCEPT
void update(shared_ptr< Context > context) FL_NO_EXCEPT override
void setConfidenceThreshold(float threshold) FL_NO_EXCEPT
Set minimum confidence for downbeat detection (default: 0.6)
shared_ptr< Beat > mBeatDetector
~Downbeat() FL_NO_EXCEPT override
bool isDownbeat() const FL_NO_EXCEPT
Returns true if downbeat was detected this frame.
void setAccentThreshold(float threshold) FL_NO_EXCEPT
Set accent detection threshold (default: 1.2)
u8 getCurrentBeat() const FL_NO_EXCEPT
Returns current beat number within measure (1-based, 1 = downbeat)
function_list< void(u8 beatsPerMeasure)> onMeterChange
Fires when time signature changes.
void setBeatDetector(shared_ptr< Beat > beatDetector) FL_NO_EXCEPT
Share an external Beat instance.
static constexpr size METER_HISTORY_SIZE
static constexpr size MAX_BEAT_HISTORY
function_list< void(u8 beatNumber)> onMeasureBeat
Fires on each beat with beat number (1-based, downbeat = 1)
shared_ptr< const fft::Bins > mRetainedFFT
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Base definition for an LED controller.