float rms(fl::span< const int16_t > data)
void update(shared_ptr< Context > context) override
float getTrebleEnergy(const fft::Bins &fft) const
float calculateEnergyFlux(float currentRMS) const
function_list< void(const Drop &)> onDropEvent
bool shouldTriggerDrop(float impact, u32 timestamp) const
function_list< void()> onDrop
float mEnergyFluxThreshold
float calculateBassFlux(float currentBass) const
void setImpactThreshold(float threshold)
void(*)(const Drop &) DropCallback
void(*)(float) ImpactCallback
float getBassEnergy(const fft::Bins &fft) const
void setEnergyFluxThreshold(float threshold)
void setMinTimeBetweenDrops(u32 ms)
void setBassThreshold(float threshold)
float getCurrentImpact(shared_ptr< Context > context) const
float calculateDropImpact(float energyFlux, float bassFlux, float spectralNovelty, float rms) const
const Drop & getLastDrop() const
DropDetector() FL_NOEXCEPT
function_list< void(float impact)> onDropImpact
float getMidEnergy(const fft::Bins &fft) const
void updateBaselines(float rms, float bass)
float calculateSpectralNovelty(float bass, float mid, float treble) const
Base definition for an LED controller.
Drop() FL_NOEXCEPT=default