|
FastLED 3.9.15
|
Definition at line 64 of file mood_analyzer.h.
#include <mood_analyzer.h>
Inheritance diagram for fl::audio::detector::MoodAnalyzer:
Collaboration diagram for fl::audio::detector::MoodAnalyzer:Public Member Functions | |
| MoodAnalyzer () FL_NOEXCEPT | |
| ~MoodAnalyzer () FL_NOEXCEPT override | |
| void | fireCallbacks () override |
| float | getArousal () const |
| const Mood & | getCurrentMood () const |
| Mood::Category | getMoodCategory () const |
| const char * | getName () const override |
| float | getValence () const |
| bool | needsFFT () const override |
| bool | needsFFTHistory () const override |
| void | reset () override |
| void | setAveragingFrames (int frames) |
| void | setConfidenceThreshold (float threshold) |
| void | setMinDuration (u32 ms) |
| void | update (shared_ptr< Context > context) override |
Public Member Functions inherited from fl::audio::Detector | |
| virtual | ~Detector () FL_NOEXCEPT=default |
| virtual void | setSampleRate (int) FL_NOEXCEPT |
Public Attributes | |
| function_list< void(const Mood &mood)> | onMood |
| function_list< void(const Mood &mood)> | onMoodChange |
| function_list< void(float valence, float arousal)> | onValenceArousal |
Private Member Functions | |
| float | calculateArousal (float rms, float zcr, float flux) |
| float | calculateConfidence (float valence, float arousal) |
| float | calculateSpectralCentroid (const fft::Bins &fft) |
| float | calculateSpectralFlux (const fft::Bins &fft, const fft::Bins *prevFFT) |
| float | calculateSpectralRolloff (const fft::Bins &fft, float threshold=0.85f) |
| float | calculateValence (float centroid, float rolloff, float flux) |
| bool | shouldChangeMood (const Mood &newMood) |
Private Attributes | |
| fl::vector< float > | mArousalHistory |
| int | mAveragingFrames |
| float | mConfidenceThreshold |
| Mood | mCurrentMood |
| int | mHistoryIndex |
| u32 | mMinDuration |
| bool | mMoodChanged = false |
| Mood | mPreviousMood |
| shared_ptr< const fft::Bins > | mRetainedFFT |
| float | mRMSEnergy |
| float | mSpectralCentroid |
| float | mSpectralFlux |
| float | mSpectralRolloff |
| fl::vector< float > | mValenceHistory |
| float | mZeroCrossingRate |