sheaivey / ESP32-AudioInI2S

A simple MEMS I2S microphone and audio processing library for ESP32.
MIT License
48 stars 11 forks source link

VU meter for stereo data with L/R peaks #2

Closed andyvans closed 5 months ago

andyvans commented 5 months ago

Hi. Firstly, this is a handy tool you have built here. If I am using stereo data I2S_CHANNEL_FMT_RIGHT_LEFT' and use your code to split into bands for a VU meter like your FastLED.ino example, then do you see any issues?

In addition to this, I would also like to get peaks for left and right channels. Is there a way to do this?

Thanks!

sheaivey commented 5 months ago

Most MEMS microphones that I have seen are mono. So hardware you would need two of those for stereo.

Currently the analysis library is built around that mono constraint.

I believe I2S supports stereo input. So if you can get the samples you could create two instances of AudioAnalysis one for left one for right so long as they have the same settings.

andyvans commented 5 months ago

Thanks. I am reading a stereo i2s feed from another esp32 that is outputting audio from https://github.com/copych/AcidBox. I think I will manually split the left and right (odd/even) data. Cheers