A
Arduinoβ€’2w ago
skrilti

hi i need help

"equalizer" code to lcd 16x2 python
12 Replies
skrilti
skriltiOPβ€’2w ago
I mean that the visualization reacts terribly to words, e.g. music okay, it reacts, but when there is a text, it looks really scary and when I have it at full volume, almost all bars grow to the max and I would like to fix it so that it reacts better to the voice or somehow optimize it, if possible. I really don't know how to do it anymore.
skrilti
skriltiOPβ€’2w ago
skrilti
skriltiOPβ€’2w ago
Tuuli 🎹🎸🀘
Cool project. I'm not too sure what the issue is though. Are you expecting the way the graphics are drawn on the 16x2 display to be smoother? Or is it the CONTENT of the graphics (ie the levels) that aren't how you expect? If you have a video of what its doing that would be helpful; you can point out specific moments with timestamps in the video and describe what its doing and what you want instead.
skrilti
skriltiOPβ€’2w ago
Thanks! I have video. You see what i mean?
skrilti
skriltiOPβ€’2w ago
Already in the first second you can see that all the bars are filling up and I mean that the LCD should not react so much to the volume in the sense of display. And as you can see, it doesn't react well to the text (words) at all and the question is whether it can be fixed somehow
Tuuli 🎹🎸🀘
Cool 😎 Yes you can certainly adjust the sensitivity of the levels. Basically you need to adjust it in the code between when they’re measured, and when theyre displayed on the screen. Its up to you where exactly in the code you adjust the math. The easiest place to start hacking is right when the LCD is drawn. Take
int level = currentLevels[i];
int level = currentLevels[i];
and instead divide it by 2, see what happens! Like:
level = (int) level / 2;
level = (int) level / 2;
(In the displayEqualizer(); function)
skrilti
skriltiOPβ€’2w ago
I do that and its looks like this
skrilti
skriltiOPβ€’2w ago
did you mean that it would come out like this? (btw maximum volume)
Tuuli 🎹🎸🀘
Did it change? It should be smaller. And you should, by doing that, be learning that the number is tied to the display. And that if you want the display to be different, you can just adjust the math that you coded. You arent going to break anything by changing how level is calculated (you'll need to learn syntax and code it properly). BUT I recommend saving a copy of the code how you had it, before you start changing things. As you get closer to what you want, save more copies with clear names so you can go back to them. You are bound to wind up breaking the code by deleting a semicolon or something, so it wont compile. Thats ok, you can debug it and learn how to error check. And if you really cant fix it, you can go back to the previous versions that you save somewhere safe.
skrilti
skriltiOPβ€’2w ago
okay really thanks for your time and your advice i really appreciate it. I'll keep trying until I start to like it
Tuuli 🎹🎸🀘
Good luck! Come on back here if you have more questions or get stuck πŸ™‚

Did you find this page helpful?