Peppymeter (peppyalsa) VU Meters with Roon?

Ok, I know this is a complete shot in the dark, but thought it would be worth asking. I’m playing around with a RPi4 running RoonBridge (right now just plugged into a small speaker from the headphone jack but will eventually feed a DAC and headphone amp via USB), no HAT, and nothing else beyond RoonBridge. All is working well and as expected with Roon.

I’d like to run a software VU meter as well on the RPi4 and have had good success with PeppyMeter/peppyalsa which is working well when manually piping audio through the ‘peppyalsa’ software device, but I’m not having any luck getting Roon to pipe audio through peppyalsa so PeppyMeter can pick it up. I’m pretty sure this is by design as Roon writes directly to the hardware so no opp to pipe it through a software device, but in my case Peppy is also writing to “hw:0,0”, so I’m wondering if there’s any opp here to redirect Roon through peppyalsa.

I know, this is a bit ridiculous b/c I’m only messing around with this to get software VU meters to display on Roon data, no real value, but it’s a fun project, I’m a sucker for VU meters, and don’t have the skillset to pursue HW VU meters.

Anyone ever done anything like this?

I was able to use snd-aloop to loop bridge to a BT output. Maybe you can use it to loop through your vu meter? Wild guess… but, as you said, just testing.

Thanks for the pointer. How did you redirect Roon audio to a specific device? I’m not finding anything where I can set a config for Roon output…

This might not be my whole config. I actually had to hack my way into this SD card as I had forgotten my password… it’s been a while so going from memory on what I touched.

After your Pi is “working” with Roon you need to get the snd-aloop module loaded. This is an ALSA module. Make sure your distribution uses ALSA.

This will create loopback “hardware” devices like:
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]

“Loopback PCM” will show-up as a RAAT destination you need to enable in Roon. There might be more than one. Enable this in Roon

Then you need to run something like:
/usr/bin/alsaloop -d -C "hw:Loopback,0,0" -P "btaudio" -l 20000 -b 8000

-d runs alsaloop as a daemon
-C is the capture device, this is where Roon is sending the audio
-P is the “Playback” device. This is probably your VU meter.
*Note, I have a whole other set of things that runs and automatically tries to attach to a specific BT speaker address in the background. That speaker is built as “btaudio” in the alsa.conf
-l is latency
-b is non-block mode and I forget why I set this

I found the Pi was dropping a lot of frames trying to feed the outbound audio device until I set the latency properly. Just trial and error. There are lots of other options:

I’ll leave the rest up to you. This, hopefully obviously, is not a complete guide. If you ask questions maybe I’ll remember what else I did to make this work. Good luck. I do remember it took me a while to get the snd-aloop module to load.

Oh… and I just had an idea… If you do get snd-aloop loaded and looped into the VU meter it may be possible to just group a zone with the VU. That would be slick. Then you could have a dedicated Pi doing nothing but VUs.

OK, I got bored. I got it working…
$ /usr/bin/alsaloop -d -C "hw:Loopback,0,0" -P "peppyalsa" -l 100 -b

$ ./peppyalsa-client 
Peppy ALSA Client. Goya Edition. 2018/09/08
No pipe name provided, defaulting to /home/pi/myfifo
L: ===============                                                             
R: ===========                                                                 

In Roon I had 2 loopback devices. I found the one which was attached to hw:Loopback,0,0 and grouped that with the zone I was listening to. Now I’ve got meters. Fun stuff.

EDIT: Play with the -l The lower the latency the better the meter will track to the music but too low and you’ll see errors.

My Loopback PCM in roon is showing as “Fixed volume” - even after I selected use device volume.

I found the one which was attached to hw:Loopback,0,0 and grouped that with the zone I was listening to

How did you found out which loopback roonbridge is using ?

1 Like

That’s really cool and bent my brain a bit. I’m completely the opposite, where HW VU meters would be trivial to setup, but I’d struggle mightily to do the ALSA loopback.

Sorry I missed this. It’s literally trial / error. Enable in Roon and play something. Then run the above alsaloop command against loopback the different Loopback devices until you get something.

Hello! Would you be able to detail the process step by step to make this work, please? Thanks!

I’ve managed to build a Pi+ 7" touchscreen running Roon Bridge, peppyalsa and peppymeter and the alsaloop trick.
It works, but it’s not ideal, as you need to group zones and it doesn’t like straying from 16/44.1 PCM, forget DSD…

So, I’ll be working on some ALSA-fu to get to the green box and get something totally transparent to Roon that will support whatever audio thrown at it. I’m pretty sure that ALSA has all the bits required and that it’s a matter of plumbing the correct configuration.
Basically, the green box is the magic trick.

Once all sorted, I’ll push a full documentation to @spockfish with the hope that it can make it into Ropieee

1 Like

I also have a roon core on nuc i7, plus raspi from volumio and roon bridge. I would like to capture somehow the roon bridge signal for the display under the covers or vu indicators (without roon bridge after airplay, there is a reduction to 16/44, but the display works).
have any of you already done it and could help? thank you