FastLED 3.10.6
Loading...
Searching...
No Matches

◆ getVibeBeatConfidence()

float getVibeBeatConfidence ( const fl::audio::detector::VibeLevels & levels)
Examples
hydropack.ino.

Definition at line 175 of file hydropack.ino.

176 {
177 const float bassAverage = gAudio->getVibeBassAtt();
178 if (!levels.bassSpike || bassAverage <= 0.0f) {
179 return 0.0f;
180 }
181 return fl::clamp((levels.bass - bassAverage) / bassAverage, 0.0f, 1.0f);
182}
fl::shared_ptr< fl::audio::Processor > gAudio
constexpr enable_if< is_fixed_point< T >::value, T >::type clamp(T x, T lo, T hi) FL_NO_EXCEPT

References fl::audio::detector::VibeLevels::bass, fl::audio::detector::VibeLevels::bassSpike, fl::clamp(), and gAudio.

Referenced by setup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: