FastLED 3.9.15
Loading...
Searching...
No Matches
musical_beat_detector.h File Reference
#include "fl/stl/int.h"
#include "fl/stl/vector.h"
#include "fl/stl/deque.h"
#include "fl/stl/noexcept.h"
+ Include dependency graph for musical_beat_detector.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  fl::audio::detector::MusicalBeat
 MusicalBeat distinguishes true musical beats from random onset detection. More...
 
struct  fl::audio::detector::MusicalBeat::Stats
 Get statistics (for debugging/monitoring) More...
 
struct  fl::audio::detector::MusicalBeatDetectorConfig
 Configuration for musical beat detection. More...
 

Namespaces

namespace  fl
 Base definition for an LED controller.
 
namespace  fl::audio
 
namespace  fl::audio::detector
 

Class Documentation

◆ fl::audio::detector::MusicalBeat::Stats

struct fl::audio::detector::MusicalBeat::Stats
Class Members
float averageIBI = 0.0f
float currentBPM = 0.0f
u32 ibiCount = 0
u32 rejectedOnsets = 0
u32 totalOnsets = 0
u32 validatedBeats = 0

◆ fl::audio::detector::MusicalBeatDetectorConfig

struct fl::audio::detector::MusicalBeatDetectorConfig
Class Members
float bpmSmoothingAlpha = 0.9f BPM estimation smoothing factor (0.0-1.0) Higher values = slower BPM adaptation, more stable tempo.
float maxBPM = 250.0f Maximum BPM to detect (default: 250 BPM)
u32 maxIBIHistory = 8 Maximum number of inter-beat intervals to track Higher values = better BPM estimation, more memory.
float minBeatConfidence = 0.5f Minimum beat confidence to report a beat (0.0-1.0) Higher values = fewer false positives, may miss weak beats.
float minBPM = 50.0f Minimum BPM to detect (default: 50 BPM)
u32 sampleRate = 22050 Sample rate (Hz) - used for timing calculations.
u32 samplesPerFrame = 512 Samples per frame - used for timing calculations.