Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lampda::physical::microphone::SoundStruct Struct Reference

Handle the analysis of a sound sample. This structure handled the FastFourrier analysis of a sound sample, sound strenght, sound most active frequency, ... More...

#include <sound.h>

Static Public Member Functions

static constexpr float get_fft_resolution_Hz ()
 Return the FFT resolution of a single FFT bin in Hertz.
 

Public Attributes

bool isDataValid = false
 flag that indicate sound data validity
 
std::array< int16_t, SAMPLE_SIZEdata
 raw audio data
 
std::array< int16_t, SAMPLE_SIZErectifiedData
 audio data with auto gain enabled
 
float sound_level_Db = 0.0f
 Sound level of this sample, in Decibels A.
 
float maxAmplitude = 0.0f
 Maximum detected amplitude of this sample.
 
float maxAmplitudeFrequency = 0.0f
 Maximum detected amplitude frequency of this sample, in Hertz.
 
bool isFFTValid = false
 validity flag for the FFT results
 
std::array< float, SAMPLE_SIZE/2 > fft_raw
 Results of the FFT process, in raw Hertz bins.
 
std::array< float, numberOfFFtChanelsfft_log
 Results of the FFT process, in scaled logarithmic bins. This is closer to the sound sensitivity of the Human ear.
 
std::array< float, numberOfFFtChanelsfft_log_end_frequencies
 Results of the FFT process, in maximum frequency for every bin.
 

Static Public Attributes

static constexpr auto SAMPLE_SIZE = platform::microphone::PdmData::SAMPLE_SIZE
 Size fo the audio sample.
 
static constexpr uint8_t numberOfFFtChanels = 24
 Define the number of FFt bins to use. You should set this number close to the lamp max X coordinates.
 

Detailed Description

Handle the analysis of a sound sample. This structure handled the FastFourrier analysis of a sound sample, sound strenght, sound most active frequency, ...


The documentation for this struct was generated from the following file: