18#include "../../../Utils/Math/Mathematics.h"
19#include "../../../Utils/Filter/RunningAverageFilter.h"
20#include "../../../Utils/Filter/MinFilter.h"
A simple class for processing microphone signals.
float previousReading
Previous reading from the microphone.
long previousMillis
Time of the previous reading.
long startMillis
Start time for processing.
float clipping
Clipping level for the microphone signal.
RunningAverageFilter< 5 > mv
Moving average filter for smoothing input.
MinFilter< 100 > minF
Minimum filter for peak detection.
float GetCurrentValue()
Retrieves the current processed microphone value.
float currentValue
Current processed microphone value.
float Update()
Updates the microphone reading and processes the signal.
uint8_t pin
Pin number for the microphone input.
float gain
Gain applied to the microphone signal.
RunningAverageFilter< 5 > output
Filter for smoothing the output.
MicrophoneSimple()
Constructs a default MicrophoneSimple instance.
Implements a minimum filter over a sliding window.
Smooths data values using a weighted running average.