So a while ago I bought the 2nd speaker add-on for my Pirate Radio to move it up to Stereo. Today I finally replaced the original Pi Zero W with a Zero 2 Wand the performance is so much better. As such I’d like to finally sort out one of the things thats always anoyed me, the VU meter seems to just relate to volume not the rise and fall of the music (if thats clear?) As I use it in a small room, the volume is always low and as such the VU meter just shows the first 2 lights lit up at most.
I’d like it to show the vu meter for the music (regardless of volume) for both channels and say have the brightness of the LEDs increase as the volume increases.
Has anyone done this or know what I can do to implement this? (but be aware my python skills are limited).
The sensitivity of the VU meter can be adjusted. Another forum member Scott posted this in thread I had on it.
You can increase the sensitivity on the Phat Beat VU Meter by doing the following:
Change line 88 to:
int bar = (meter_level * (meter_level / 8) / 131071.0f) * (brightness * (NUM_PIXELS/2));
Recompile the library:
sudo make install
Now your VU meter is more sensitive! Tweak the values to your liking.
The following is I believe what i ended up with.
int bar = (meter_level * (meter_level / 8) / 1200000.0f) * (brightness * (NUM_PIXELS/2));
Don’t forget to change the switch on the back of the pHat Beat from mono to stereo.
Perfect, many thanks. I’ll go play and see what setting fits best.
Can you tell me how you got the zero 2 to work? What version OS are you using. I can’t get the buttons nor the VU meter working although the radio plays and can be controlled from my phone. I am using Buster Legacy.
Hi, I used the ‘Legacy OS’ version of raspbain then followed the install instructions. I think if you go with the current (32bit) version of raspbain then you must run apt update before running the install script so that it correctly updates the repos.