Another audio visualizer #617
-
Hello, First off, many thanks for putting in the effort and making this available publicly. Can't thank the contributors enough. As the subject line describes, I am trying to put together an audio visualizer (64x64 single HUB75 panel). I had made this earlier using MAX7219 modules and MD Parola library so a lot of the code is carried over. The sketch works fine other than the part where I try to draw the bars on the panel. With the Parola library I was able to draw a frame in the background and then update the display manually. I understand that this is not how this library works. I have tried a few different approaches but have failed miserably. My broken code is as follows and I appreciate that it is untidy at the moment but I am trying to solve one problem at a time. In essence the problem is that while the display updates with data from the barHeights array, it is very "choppy". I am not sure how else to describe this. What I mean to say is that the display updates but in discrete frames which looks very laggy and out of sync with the audio. Interestingly if I replace the following line: with the following to simulate random values, the behavior is fluid: I know I am doing something foolish, I just can't seem to figure out what it is. Would really appreciate some guidance on this. My code (I have excluded some parts that ideally should not be relevant to the issue that I am seeking help with):
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If this is not a typo, it means that esp32 evaluates the first expression too long.
|
Beta Was this translation helpful? Give feedback.
-
Resolved as mentioned above |
Beta Was this translation helpful? Give feedback.
If this is not a typo, it means that esp32 evaluates the first expression too long.
Let's try to simplify it and convert it to integer mathematics: