All the heavy lifting has been done by the code in this GitHub repository. I have just tweaked a few things to make it work like a desktop widget on system startup ...
This project creates a real-time audio spectrum visualizer using a microcontroller (Arduino/ESP32), a microphone, and an LED matrix. It analyzes audio input, performs a Fast Fourier Transform (FFT), ...