In an ETC mode, I have seen etc.audio_in. From the code, I understood it’s a Python list of 100 elements, but I am not confident what the elements represent.
chrisk
July 11, 2023, 12:23pm
2
The etc.audio_in is an array of 100 samples of the amplitude of the audio input. More information here:
There is a little more info about the sampling rate and 100 point array here:
Basically it is updated 36.75 times a second in the background. Position 99 would be the most recent.
To check for threshold you could do a for loop, it might not slow down too much. But there is also the etc.audio_trig flag that gets set when audio exceeds a threshold, might be useful. The threshold is hard coded at around 80% full volume.