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

Detailed Description

Examples
Animartrix.ino, and BeatDetection.ino.

Definition at line 57 of file audio_processor.h.

#include <audio_processor.h>

+ Collaboration diagram for fl::audio::Processor:

Public Member Functions

 Processor () FL_NOEXCEPT
 
 ~Processor () FL_NOEXCEPT
 
void configureEqualizer (const detector::EqualizerConfig &config) FL_NOEXCEPT
 Configure equalizer detector tuning parameters.
 
void configureNoiseFloorTracker (const NoiseFloorTrackerConfig &config) FL_NOEXCEPT
 Configure noise floor tracker.
 
void configureSignalConditioner (const SignalConditionerConfig &config) FL_NOEXCEPT
 Configure signal conditioner.
 
float getBackbeatConfidence () FL_NOEXCEPT
 
float getBackbeatStrength () FL_NOEXCEPT
 
float getBassLevel () FL_NOEXCEPT
 
float getBassRaw () FL_NOEXCEPT
 
float getBeatConfidence () FL_NOEXCEPT
 
float getBPM () FL_NOEXCEPT
 
float getBuildupIntensity () FL_NOEXCEPT
 
float getBuildupProgress () FL_NOEXCEPT
 
float getChordConfidence () FL_NOEXCEPT
 
shared_ptr< ContextgetContext () const FL_NOEXCEPT
 
u8 getCurrentBeatNumber () FL_NOEXCEPT
 
u8 getCurrentNote () FL_NOEXCEPT
 
float getDownbeatConfidence () FL_NOEXCEPT
 
float getDropImpact () FL_NOEXCEPT
 
float getDynamicTrend () FL_NOEXCEPT
 
float getEnergy () FL_NOEXCEPT
 
float getEqAutoGain () FL_NOEXCEPT
 
float getEqBass () FL_NOEXCEPT
 
float getEqBin (int index) FL_NOEXCEPT
 
float getEqDominantFreqHz () FL_NOEXCEPT
 Frequency of strongest bin (Hz)
 
float getEqDominantMagnitude () FL_NOEXCEPT
 Magnitude of strongest bin (0.0-1.0)
 
bool getEqIsSilence () FL_NOEXCEPT
 
float getEqMid () FL_NOEXCEPT
 
float getEqTreble () FL_NOEXCEPT
 
float getEqVolume () FL_NOEXCEPT
 
float getEqVolumeDb () FL_NOEXCEPT
 Volume in approximate dB.
 
float getEqVolumeNormFactor () FL_NOEXCEPT
 
float getEqZcf () FL_NOEXCEPT
 
float getGain () const FL_NOEXCEPT
 
float getKeyConfidence () FL_NOEXCEPT
 
float getMeasurePhase () FL_NOEXCEPT
 
MicProfile getMicProfile () const FL_NOEXCEPT
 
float getMidLevel () FL_NOEXCEPT
 
float getMidRaw () FL_NOEXCEPT
 
float getMoodArousal () FL_NOEXCEPT
 
float getMoodValence () FL_NOEXCEPT
 
const NoiseFloorTracker::StatsgetNoiseFloorStats () const FL_NOEXCEPT
 
float getNoteConfidence () FL_NOEXCEPT
 
float getNoteVelocity () FL_NOEXCEPT
 
float getPeakLevel () FL_NOEXCEPT
 
float getPitch () FL_NOEXCEPT
 
float getPitchConfidence () FL_NOEXCEPT
 
const SamplegetSample () const FL_NOEXCEPT
 
int getSampleRate () const FL_NOEXCEPT
 
const SignalConditioner::StatsgetSignalConditionerStats () const FL_NOEXCEPT
 Access signal conditioning statistics.
 
u32 getSilenceDuration () FL_NOEXCEPT
 
float getTempoBPM () FL_NOEXCEPT
 
float getTempoConfidence () FL_NOEXCEPT
 
float getTransientStrength () FL_NOEXCEPT
 
float getTrebleLevel () FL_NOEXCEPT
 
float getTrebleRaw () FL_NOEXCEPT
 
float getVibeBass () FL_NOEXCEPT
 
float getVibeBassAtt () FL_NOEXCEPT
 
float getVibeMid () FL_NOEXCEPT
 
float getVibeMidAtt () FL_NOEXCEPT
 
float getVibeTreb () FL_NOEXCEPT
 
float getVibeTrebAtt () FL_NOEXCEPT
 
float getVibeVol () FL_NOEXCEPT
 
float getVibeVolAtt () FL_NOEXCEPT
 
float getVocalConfidence () FL_NOEXCEPT
 
bool isCrescendo () FL_NOEXCEPT
 
bool isDiminuendo () FL_NOEXCEPT
 
bool isHiHat () FL_NOEXCEPT
 
bool isKick () FL_NOEXCEPT
 
bool isSilent () FL_NOEXCEPT
 
bool isSnare () FL_NOEXCEPT
 
bool isTom () FL_NOEXCEPT
 
bool isVibeBassSpike () FL_NOEXCEPT
 
bool isVibeMidSpike () FL_NOEXCEPT
 
bool isVibeTrebSpike () FL_NOEXCEPT
 
void onAttack (function< void(float strength)> callback) FL_NOEXCEPT
 
void onAverageEnergy (function< void(float avgEnergy)> callback) FL_NOEXCEPT
 
void onBackbeat (function< void(u8 beatNumber, float confidence, float strength)> callback) FL_NOEXCEPT
 
void onBass (function< void(float level)> callback) FL_NOEXCEPT
 
void onBeat (function< void()> callback) FL_NOEXCEPT
 
void onBeatPhase (function< void(float phase)> callback) FL_NOEXCEPT
 
void onBuildup (function< void(const detector::Buildup &)> callback) FL_NOEXCEPT
 
void onBuildupEnd (function< void()> callback) FL_NOEXCEPT
 
void onBuildupPeak (function< void()> callback) FL_NOEXCEPT
 
void onBuildupProgress (function< void(float progress)> callback) FL_NOEXCEPT
 
void onBuildupStart (function< void()> callback) FL_NOEXCEPT
 
void onChord (function< void(const detector::Chord &chord)> callback) FL_NOEXCEPT
 
void onChordChange (function< void(const detector::Chord &chord)> callback) FL_NOEXCEPT
 
void onChordEnd (function< void()> callback) FL_NOEXCEPT
 
void onCompressionRatio (function< void(float compression)> callback) FL_NOEXCEPT
 
void onCrescendo (function< void()> callback) FL_NOEXCEPT
 
void onDiminuendo (function< void()> callback) FL_NOEXCEPT
 
void onDownbeat (function< void()> callback) FL_NOEXCEPT
 
void onDrop (function< void()> callback) FL_NOEXCEPT
 
void onDropEvent (function< void(const detector::Drop &)> callback) FL_NOEXCEPT
 
void onDropImpact (function< void(float impact)> callback) FL_NOEXCEPT
 
void onDynamicTrend (function< void(float trend)> callback) FL_NOEXCEPT
 
void onEnergy (function< void(float rms)> callback) FL_NOEXCEPT
 
void onEqualizer (function< void(const detector::Equalizer &)> callback) FL_NOEXCEPT
 
void onFrequencyBands (function< void(float bass, float mid, float treble)> callback) FL_NOEXCEPT
 
void onHiHat (function< void()> callback) FL_NOEXCEPT
 
void onKey (function< void(const detector::Key &key)> callback) FL_NOEXCEPT
 
void onKeyChange (function< void(const detector::Key &key)> callback) FL_NOEXCEPT
 
void onKeyEnd (function< void()> callback) FL_NOEXCEPT
 
void onKick (function< void()> callback) FL_NOEXCEPT
 
void onMeasureBeat (function< void(u8 beatNumber)> callback) FL_NOEXCEPT
 
void onMeasurePhase (function< void(float phase)> callback) FL_NOEXCEPT
 
void onMeterChange (function< void(u8 beatsPerMeasure)> callback) FL_NOEXCEPT
 
void onMid (function< void(float level)> callback) FL_NOEXCEPT
 
void onMood (function< void(const detector::Mood &mood)> callback) FL_NOEXCEPT
 
void onMoodChange (function< void(const detector::Mood &mood)> callback) FL_NOEXCEPT
 
void onNormalizedEnergy (function< void(float normalizedRms)> callback) FL_NOEXCEPT
 
void onNoteChange (function< void(u8 note, u8 velocity)> callback) FL_NOEXCEPT
 
void onNoteOff (function< void(u8 note)> callback) FL_NOEXCEPT
 
void onNoteOn (function< void(u8 note, u8 velocity)> callback) FL_NOEXCEPT
 
void onOnset (function< void(float strength)> callback) FL_NOEXCEPT
 
void onPeak (function< void(float peak)> callback) FL_NOEXCEPT
 
void onPercussion (function< void(detector::PercussionType type)> callback) FL_NOEXCEPT
 
void onPitch (function< void(float hz)> callback) FL_NOEXCEPT
 
void onPitchChange (function< void(float hz)> callback) FL_NOEXCEPT
 
void onPitchWithConfidence (function< void(float hz, float confidence)> callback) FL_NOEXCEPT
 
void onSilence (function< void(u8 silent)> callback) FL_NOEXCEPT
 
void onSilenceDuration (function< void(u32 durationMs)> callback) FL_NOEXCEPT
 
void onSilenceEnd (function< void()> callback) FL_NOEXCEPT
 
void onSilenceStart (function< void()> callback) FL_NOEXCEPT
 
void onSnare (function< void()> callback) FL_NOEXCEPT
 
void onTempo (function< void(float bpm)> callback) FL_NOEXCEPT
 
void onTempoChange (function< void(float bpm, float confidence)> callback) FL_NOEXCEPT
 
void onTempoStable (function< void()> callback) FL_NOEXCEPT
 
void onTempoUnstable (function< void()> callback) FL_NOEXCEPT
 
void onTempoWithConfidence (function< void(float bpm, float confidence)> callback) FL_NOEXCEPT
 
void onTom (function< void()> callback) FL_NOEXCEPT
 
void onTransient (function< void()> callback) FL_NOEXCEPT
 
void onTransientWithStrength (function< void(float strength)> callback) FL_NOEXCEPT
 
void onTreble (function< void(float level)> callback) FL_NOEXCEPT
 
void onValenceArousal (function< void(float valence, float arousal)> callback) FL_NOEXCEPT
 
void onVibeBassSpike (function< void()> callback) FL_NOEXCEPT
 
void onVibeLevels (function< void(const detector::VibeLevels &)> callback) FL_NOEXCEPT
 
void onVibeMidSpike (function< void()> callback) FL_NOEXCEPT
 
void onVibeTrebSpike (function< void()> callback) FL_NOEXCEPT
 
void onVocal (function< void(u8 active)> callback) FL_NOEXCEPT
 
void onVocalConfidence (function< void(float confidence)> callback) FL_NOEXCEPT
 
void onVocalEnd (function< void()> callback) FL_NOEXCEPT
 
void onVocalStart (function< void()> callback) FL_NOEXCEPT
 
void onVoiced (function< void(u8 voiced)> callback) FL_NOEXCEPT
 
void reset () FL_NOEXCEPT
 
void setGain (float gain) FL_NOEXCEPT
 Set a simple digital gain multiplier applied to each sample before detector.
 
void setMicProfile (MicProfile profile) FL_NOEXCEPT
 Set microphone correction profile for frequency response compensation.
 
void setNoiseFloorTrackingEnabled (bool enabled) FL_NOEXCEPT
 Enable/disable noise floor tracking.
 
void setSampleRate (int sampleRate) FL_NOEXCEPT
 Set the sample rate for all frequency-based calculations.
 
void setSignalConditioningEnabled (bool enabled) FL_NOEXCEPT
 Enable/disable signal conditioning pipeline (DC removal, spike filter, noise gate)
 
void update (const Sample &sample) FL_NOEXCEPT
 
void updateFromContext (shared_ptr< Context > externalContext) FL_NOEXCEPT
 

Private Member Functions

shared_ptr< detector::BackbeatgetBackbeatDetector () FL_NOEXCEPT
 
shared_ptr< detector::BeatgetBeatDetector () FL_NOEXCEPT
 
shared_ptr< detector::BuildupDetectorgetBuildupDetector () FL_NOEXCEPT
 
shared_ptr< detector::ChordDetectorgetChordDetector () FL_NOEXCEPT
 
shared_ptr< detector::DownbeatgetDownbeatDetector () FL_NOEXCEPT
 
shared_ptr< detector::DropDetectorgetDropDetector () FL_NOEXCEPT
 
shared_ptr< detector::DynamicsAnalyzergetDynamicsAnalyzer () FL_NOEXCEPT
 
shared_ptr< detector::EnergyAnalyzergetEnergyAnalyzer () FL_NOEXCEPT
 
shared_ptr< detector::EqualizerDetectorgetEqualizerDetector () FL_NOEXCEPT
 
shared_ptr< detector::FrequencyBandsgetFrequencyBands () FL_NOEXCEPT
 
shared_ptr< detector::KeyDetectorgetKeyDetector () FL_NOEXCEPT
 
shared_ptr< detector::MoodAnalyzergetMoodAnalyzer () FL_NOEXCEPT
 
shared_ptr< detector::NotegetNoteDetector () FL_NOEXCEPT
 
shared_ptr< detector::PercussiongetPercussionDetector () FL_NOEXCEPT
 
shared_ptr< detector::PitchgetPitchDetector () FL_NOEXCEPT
 
shared_ptr< detector::SilencegetSilenceDetector () FL_NOEXCEPT
 
shared_ptr< detector::TempoAnalyzergetTempoAnalyzer () FL_NOEXCEPT
 
shared_ptr< detector::TransientgetTransientDetector () FL_NOEXCEPT
 
shared_ptr< detector::VibegetVibeDetector () FL_NOEXCEPT
 
shared_ptr< detector::VocalgetVocalDetector () FL_NOEXCEPT
 
void registerDetector (shared_ptr< Detector > detector) FL_NOEXCEPT
 

Static Private Member Functions

static fl::shared_ptr< ProcessorcreateWithAutoInput (fl::shared_ptr< IInput > input) FL_NOEXCEPT
 

Private Attributes

vector< shared_ptr< Detector > > mActiveDetectors
 
fl::shared_ptr< IInputmAudioInput
 
fl::task::Handle mAutoTask
 
shared_ptr< detector::BackbeatmBackbeatDetector
 
shared_ptr< detector::BeatmBeatDetector
 
shared_ptr< detector::BuildupDetectormBuildupDetector
 
shared_ptr< detector::ChordDetectormChordDetector
 
shared_ptr< ContextmContext
 
shared_ptr< detector::DownbeatmDownbeatDetector
 
shared_ptr< detector::DropDetectormDropDetector
 
shared_ptr< detector::DynamicsAnalyzermDynamicsAnalyzer
 
shared_ptr< detector::EnergyAnalyzermEnergyAnalyzer
 
shared_ptr< detector::EqualizerDetectormEqualizerDetector
 
shared_ptr< detector::FrequencyBandsmFrequencyBands
 
float mGain = 1.0f
 
shared_ptr< detector::KeyDetectormKeyDetector
 
MicProfile mMicProfile = MicProfile::None
 
shared_ptr< detector::MoodAnalyzermMoodAnalyzer
 
NoiseFloorTracker mNoiseFloorTracker
 
bool mNoiseFloorTrackingEnabled = false
 
shared_ptr< detector::NotemNoteDetector
 
shared_ptr< detector::PercussionmPercussionDetector
 
shared_ptr< detector::PitchmPitchDetector
 
int mSampleRate = 44100
 
SignalConditioner mSignalConditioner
 
bool mSignalConditioningEnabled = true
 
shared_ptr< detector::SilencemSilenceDetector
 
shared_ptr< detector::TempoAnalyzermTempoAnalyzer
 
shared_ptr< detector::TransientmTransientDetector
 
shared_ptr< detector::VibemVibeDetector
 
shared_ptr< detector::VocalmVocalDetector
 

Friends

class AudioManager
 

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