FastLED 3.9.15
Loading...
Searching...
No Matches
fl::audio::Reactive Class Reference

Detailed Description

Definition at line 91 of file audio_reactive.h.

#include <audio_reactive.h>

+ Collaboration diagram for fl::audio::Reactive:

Public Member Functions

 Reactive () FL_NOEXCEPT
 
 ~Reactive () FL_NOEXCEPT
 
void begin (const ReactiveConfig &config=ReactiveConfig{})
 
fl::u8 frequencyToScale255 (fl::u8 binIndex) const
 
float getBackbeatConfidence ()
 
float getBackbeatStrength ()
 
float getBass () const
 
float getBassEnergy () const
 
float getBassLevel ()
 
float getBeatConfidence ()
 
float getBPM ()
 
float getBuildupIntensity ()
 
float getBuildupProgress ()
 
float getChordConfidence ()
 
u8 getCurrentBeatNumber ()
 
u8 getCurrentNote ()
 
const DatagetData () const
 
float getDownbeatConfidence ()
 
float getDropImpact ()
 
float getDynamicTrend ()
 
float getEnergyLevel ()
 
float getGain () const
 
float getKeyConfidence ()
 
float getMeasurePhase ()
 
float getMid () const
 
float getMidEnergy () const
 
float getMidLevel ()
 
float getMoodArousal ()
 
float getMoodValence ()
 
const NoiseFloorTracker::StatsgetNoiseFloorStats () const
 
float getNoteConfidence ()
 
float getNoteVelocity ()
 
float getPeakLevel ()
 
float getPitchConfidence ()
 
float getPitchHz ()
 
const SignalConditioner::StatsgetSignalConditionerStats () const
 
u32 getSilenceDuration ()
 
const DatagetSmoothedData () const
 
const SpectralEqualizer::StatsgetSpectralEqualizerStats () const
 
float getSpectralFlux () const
 
float getTempoBPM ()
 
float getTempoConfidence ()
 
float getTransientStrength ()
 
float getTreble () const
 
float getTrebleEnergy () const
 
float getTrebleLevel ()
 
float getVocalConfidence ()
 
float getVolume () const
 
bool isBassBeat () const
 
bool isBeat () const
 
bool isCrescendo ()
 
bool isDiminuendo ()
 
bool isHiHat ()
 
bool isKick ()
 
bool isMidBeat () const
 
bool isSilent ()
 
bool isSnare ()
 
bool isSpectralEqualizerEnabled () const
 
bool isTom ()
 
bool isTrebleBeat () const
 
void processSample (const Sample &sample)
 
void setConfig (const ReactiveConfig &config)
 
void setGain (float gain)
 
void update (fl::u32 currentTimeMs)
 
CRGB volumeToColor (const CRGBPalette16 &palette) const
 
fl::u8 volumeToScale255 () const
 

Private Member Functions

void applyAWeighting ()
 
void applyGain ()
 
void applyLoudnessCompensation ()
 
void applyScaling ()
 
void applySpectralEqualization ()
 
void calculateBandEnergies ()
 
float computeRMS (const fl::vector< fl::i16 > &samples)
 
void detectBeat (fl::u32 currentTimeMs)
 
void detectEnhancedBeats (fl::u32 currentTimeMs)
 
ProcessorensureAudioProcessor ()
 
void mapFFTBinsToFrequencyChannels ()
 
float mapFrequencyBin (int fromBin, int toBin)
 
void processFFT (const Sample &sample)
 
void smoothResults ()
 
void updateSpectralFlux ()
 
void updateVolumeAndPeak (const Sample &sample)
 

Private Attributes

fl::unique_ptr< ProcessormAudioProcessor
 
ReactiveConfig mConfig
 
shared_ptr< ContextmContext
 
Data mCurrentData
 
SilenceEnvelope mDominantFrequencyEnvelope
 
fft::Bins mFFTBins
 
FrequencyBinMapper mFrequencyBinMapper
 
fl::u32 mLastBeatTime = 0
 
SilenceEnvelope mMagnitudeEnvelope
 
fl::unique_ptr< detector::MultiBandBeatmMultiBandBeatDetector
 
fl::unique_ptr< detector::MusicalBeatmMusicalBeatDetector
 
NoiseFloorTracker mNoiseFloorTracker
 
fl::unique_ptr< PerceptualWeightingmPerceptualWeighting
 
bool mPinkNoiseComputed = false
 
float mPinkNoiseGains [16] = {}
 
fl::array< float, 16 > mPreviousMagnitudes
 
float mPreviousVolume = 0.0f
 
SignalConditioner mSignalConditioner
 
Data mSmoothedData
 
fl::unique_ptr< SpectralEqualizermSpectralEqualizer
 
fl::unique_ptr< SpectralFluxDetectormSpectralFluxDetector
 
SilenceEnvelope mSpectralFluxEnvelope
 
float mVolumeThreshold = 0.04f
 

Static Private Attributes

static constexpr fl::u32 BEAT_COOLDOWN = 100
 

The documentation for this class was generated from the following files: