24 function_list<
void()>
onKick;
27 function_list<
void()>
onTom;
57 bool detectKick(
float bassEnergy,
float bassFlux, u32 timestamp);
58 bool detectSnare(
float midEnergy,
float midFlux, u32 timestamp);
59 bool detectHiHat(
float trebleEnergy,
float trebleFlux, u32 timestamp);
static constexpr u32 SNARE_COOLDOWN_MS
function_list< void(PercussionType type)> onPercussionHit
function_list< void()> onKick
bool detectSnare(float midEnergy, float midFlux, u32 timestamp)
static constexpr u32 KICK_COOLDOWN_MS
void setSnareThreshold(float threshold)
function_list< void()> onSnare
static constexpr u32 HIHAT_COOLDOWN_MS
bool detectKick(float bassEnergy, float bassFlux, u32 timestamp)
float getMidEnergy(const fft::Bins &fft)
float getTrebleEnergy(const fft::Bins &fft)
float getBassEnergy(const fft::Bins &fft)
function_list< void()> onTom
void setKickThreshold(float threshold)
void setHiHatThreshold(float threshold)
bool detectHiHat(float trebleEnergy, float trebleFlux, u32 timestamp)
void update(shared_ptr< Context > context) override
function_list< void()> onHiHat
#define constexpr
Declares that it is possible to evaluate a value at compile time, introduced in C++11.
Base definition for an LED controller.