30#ifndef MUSIC_MISUALIZER_HPP__
31#define MUSIC_MISUALIZER_HPP__
63 musicChannel(
int pin_p,
float silentLimit_p,
float offset_p );
71 musicChannel(
int pin_p,
float silentLimit_p,
float offset_p,
float avgSampleFilterBeta_p,
float sampleFilterBeta_p );
This object is used to process audio data.
float signal
The filtered signal will be stored in this variable.
void update()
Update function.
float signalMax
The maximum level of the signal is stored in this variable.
int pin
Analog input pin of the channel.
float avgPeak
Average peak signal.
float sample
The raw sample will be processed to this variable.
float silentLimit
Silent limit.
float offset
Offset of the ADC result.
void(* peakFunc)(void)
Function pointer to peak event function.
float avgSampleFilterBeta
Filter constant for average sample.
float sampleFilterBeta
Filter constant for sample.
void attachPeakFunction(void(*peakFunc_p)(void))
Attach a function to every peak event.
float signalPrev
Previous value of the signal.
float avgSample
Holds the average filter level.
bool peak
Flag, that indicates a peak event.
musicChannel peak
Peak detector object.