26 for (uint16_t i = 1; i <
FFTSize / 2; i++) {
27 if (i >= binL && i <= binH)
31 return average / float(binH - binL + 1);
Provides a base class for FFT-based microphone signal processing.
Calculates the derivative (rate of change) of input values with filtering for stability.
Processes and normalizes FFT data.
A templated class for performing Fast Fourier Transform (FFT) operations.
static bool isInitialized
Flag indicating if the system is initialized.
static float inputSamp[FFTSize *2]
Raw input samples for FFT.
static const uint16_t FFTSize
Size of the FFT (number of samples).
static FFT< FFTSize > fft
FFT processor instance.
static float GetCurrentMagnitude()
Retrieves the current signal magnitude.
static FFTFilter fftFilters[OutputBins]
Array of FFT filters for post-processing.
static float threshold
Threshold value for processing.
static float outputData[OutputBins]
Processed FFT data for output bins.
static const uint16_t OutputBins
Number of output bins from FFT processing.
static bool IsInitialized()
Checks if the microphone system is initialized.
static DerivativeFilter peakFilterRate
Filter for peak rate detection.
static float outputMagn[FFTSize]
Magnitude output from FFT.
static float maxDB
Maximum decibel value for normalization.
static float currentValue
Current magnitude of the microphone signal.
static float GetSampleRate()
Retrieves the current sampling rate.
static float inputStorage[FFTSize]
Storage for processed input samples.
static uint8_t pin
Pin number for microphone input.
static float outputDataFilt[OutputBins]
Filtered FFT data for output bins.
static float AverageMagnitude(uint16_t binL, uint16_t binH)
Calculates the average magnitude of the specified FFT bins.
static float * GetSamples()
Retrieves the raw input samples.
static uint16_t sampleRate
Sampling rate in Hz.
static float * GetFourierFiltered()
Retrieves the filtered FFT output data.
static float minDB
Minimum decibel value for normalization.
static float * GetFourier()
Retrieves the FFT output data.