27 bool needsFFT()
const override {
return true; }
29 const char*
getName()
const override {
return "Percussion"; }
30 void reset()
override;
static constexpr u32 SNARE_COOLDOWN_MS
shared_ptr< const fft::Bins > mRetainedFFT
AttackDecayFilter< float > mTotalEnvelope
function_list< void(PercussionType type)> onPercussionHit
float getZeroCrossingFactor() const
float getMidToTrebleRatio() const
float getClickRatio() const
function_list< void()> onKick
float getSubBassProxy() const
static constexpr u32 KICK_COOLDOWN_MS
float getKickConfidence() const
float getHiHatConfidence() const
void setSnareThreshold(float threshold)
void applyCrossBandRejection()
function_list< void()> onSnare
static constexpr u32 HIHAT_COOLDOWN_MS
float getBassToTotalRatio() const
void computeConfidences()
float getTrebleToTotalRatio() const
function_list< void()> onTom
void fireCallbacks() override
float getSnareConfidence() const
void setKickThreshold(float threshold)
void computeFeatures(const fft::Bins &fft)
~Percussion() FL_NOEXCEPT override
void setHiHatThreshold(float threshold)
void update(shared_ptr< Context > context) override
static constexpr u32 TOM_COOLDOWN_MS
float getTomConfidence() const
bool needsFFT() const override
function_list< void()> onHiHat
bool needsFFTHistory() const override
float getTrebleFlatness() const
float mZeroCrossingFactor
const char * getName() const override
float getOnsetSharpness() const
void setTomThreshold(float threshold)
Base definition for an LED controller.