Deluge Firmware 1.4.0
Build date: 2026.11.30
Loading...
Searching...
No Matches
deluge::dsp::mic_velocity::ThumpDetector Class Reference
Collaboration diagram for deluge::dsp::mic_velocity::ThumpDetector:

Public Member Functions

void reset ()
void process (float sample, Frame frame)
 One decimated sample of the mic (after any echo cancelling); frame is the input frame it ends at.
float noiseFloor () const
 The noise floor: a typical 10 ms peak of the band-limited mic with no thump.
float onsetLevel () const
 The level a thump has to reach to be found.
Thump const * recent (int32_t index) const
 The most recent thumps, newest first (0: the newest). nullptr past the ones there are.
bool rising () const
 Whether a thump is in progress (started, not yet settled).
bool inThump () const
 Whether a thump is going on (from its onset until it has died away).

Static Public Attributes

static constexpr Frame kSettleFrames = kInputRate * 4 / 1000
 How long after onset the level is measured for.
static constexpr Frame kMinGapFrames = kInputRate * 15 / 1000
 A thump lasts at least this long.
static constexpr float kOnsetOverFloor = 4.f
 Rising this far over the noise floor starts a thump (12 dB).
static constexpr float kMinOnsetLevel = 3.2e-5f
 Never start a thump below this, however quiet the noise (-90 dBFS).
static constexpr int32_t kNumThumps = 16

Private Attributes

Biquad highPass_
Biquad lowPass_
std::array< Thump, kNumThumps > thumps_ {}
int32_t newest_ = 0
int32_t count_ = 0
bool inThump_ = false
float thumpPeak_ = 0
float holdOff_ = 0
float floor_ = 0
float blockMax_ = 0
int32_t blockSamples_ = 0
bool blockHadThump_ = false
bool floorStarted_ = false
int32_t sustainedBlocks_ = 0

The documentation for this class was generated from the following files:
  • src/deluge/dsp/mic_velocity/thump_detector.h
  • src/deluge/dsp/mic_velocity/thump_detector.cpp