Peppymeter (peppyalsa) VU Meters with Roon?

Fixed this issue (at least so far after a normal work day of streaming) by setting the resync delay on the alsaloop device in Roon to 500ms. Not really sure what this does but so far, so good.

I was also able to solve the load on boot issue by loading alsaloop in crontab:

$ crontab -e
@reboot /usr/bin/alsaloop -C hw:Loopback,0,0 -P peppyalsa -l 2000 -b > /tmp/alsaloop.log 2>&1 &

I had to jack the latency all the way up to 2000 to keep it stable, and am redirecting stdout and stderr to a temp log to debug future latency issues.

…an wrote a small script to load PeppyMeter:

#!/bin/bash

export DISPLAY=:0 
cd /home/pi/PeppyMeter
python3 ./peppymeter.py > /tmp/peppymeter.log 2>&1 &
cd

…that I call from ~/.config/lxsession/LXDE-pi/autostart:

@/home/pi/runpeppy.sh

And that did it. I now have a 3.5 TFT streamer running RoonBridge, out via USB to a Schiit stack with PeppyMeter working on boot. Now onto building a more permanent one with a wide screen LCD for the main streaming room. Thanks again for all the notes in this thread!

3 Likes

Nice job!

Would you mind checking CPU load just for me to compare with my dynamic-range-metering-bridge?
Thanks a lot for considering!

Load is high, floating around 35 for user processes while streaming. Biggest offenders are mutter and Xorg. Makes me wonder if you can run pygame without X (something like fbi for displaying pictures w/o X). A quick search looks like it should be possible…

@rcrawley I’m out of town for a long weekend but will give this a go upon returning. If you happen to get to eventually start from scratch on a new unit at some point would you be willing to do a starting from scratch tutorial of sorts? If I happen to get to it first, I’ll document the process as well and credit you. I just don’t think there’s a clearly document d start to finish tutorial for this procedure and I think it’s very much needed.

@312Elements Thanks for looking at it. And I’d be happy to build a more complete walkthrough, see below. I run a few different Pi endpoints around the house, most of them are running Ropieee with the official 7" Pi screen and HifiBerry HATs, so nothing really different or special there. For my tinkering streamers, I alternate between these types:

  • RoonBridge running a simple kiosk display showing Roon’s Display (connecting to port 9330 on Roon), with a flip clock screensaver
  • RoonBridge running Roon Extensions and the Web Controller, a nice aftermarket interface that allows me to start/stop the music from the streamer (something I can’t do with Roon display), with a flip clock screensaver
  • Volumio, just for testing every few months to see how it’s going with Roon support. I really like Volumio and would probably swap out to Volumio on all of my Pi Roon endpoints so the fam could walk up to any and change the music/source to anything they’d like. I could do this today with volroon but I have a few small issues here and there when testing it so I don’t think it’s 100% stable yet. And of course getting Peppy support for Roon as I mentioned above. :slight_smile:

Here’s my straightforward walkthrough of the 2nd option, RoonBridge using Web Controller and a 3.5 TFT screen with USB out to a stand-alone DAC (like the Schiit Modi). It’s the most involved so if you want to use Roon’s Display instead just skip all of the steps I’ve listed as [OPT] below and change the Chrome Kiosk URL to the one that’s published in Roon’s Display settings. Hope this helps, feel free to ping me with any questions or issues, and always open to doing things more simply or different for ease and stability.

* install and update buster (raspberryPiOS 32b)
* `sudo raspi-config` to expand local storage, set timezone, and set audio to USB
* install/config screen:
  * git clone https://github.com/Lcdwiki/LCD-show.git (docs https://lcdwiki.com/MHS-3.5inch_RPi_Display), (MHS3528)
  * sudo ./MHS35-show 180
* Calibrate screen (and install unclutter while you're there)
  * apt install xinput-calibrator unclutter
  * export DISPLAY=:0 && xinput_calibrator
* install ALSA (if not installed) 
* install Roon bridge - wget https://download.roonlabs.com/builds/roonbridge-installer-linuxarmv7hf.sh
  * chmod 755 ./roonbridge-installer-linuxarmv7hf.sh && ./roonbridge-installer-linuxarmv7hf.sh
* [OPT] install docker - wget https://get.docker.com/ -O docker-install.sh
* [OPT] install Roon extensions - wget https://github.com/TheAppgineer/roon-extension-manager/raw/v1.x/rem-setup.sh
* [OPT] In Roon, install extension snapshots (extensions -> system -> snapshots)
* [OPT] In Roon, install web controller (snapshots -> web/controll -> web control), then start it
* Test chromium-browser: 
  * export DISPLAY=:0 && chromium-browser --noerrdialogs --start-fullscreen --start-maximized --disable-infobars --homepage http://localhost:8080
    * Or swap out --homepage URL for Roons Display address
* add to ~/.config/lxsession/LXDE-pi/autostart to run at boot
  @unclutter -idle 0.5 -root &
  @lxpanel --profile LXDE-pi
  @pcmanfm --desktop --profile LXDE-pi
  @xset -dpms
  @chromium-browser --kiosk --no-first-run --fast --fast-start --noerrdialogs --start-fullscreen --start-maximized --disable-infobars --homepage http://localhost:8080&
* install x11-apps: sudo apt install x11-apps
  * apt install xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
* install flip clock: 
  * sudo apt-get install build-essential libsdl1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libx11-dev
  * git clone https://github.com/alexanderk23/gluqlo
  * cd gluqlo && make && sudo make install && sudo cp gluqlo /usr/local/bin
* Add screensaver to ~/.config/systemd/user/xscreensaver.service
  [Unit]
  Description=XScreenSaver
  [Service]
  ExecStart=/usr/bin/xscreensaver -nosplash
  [Install]
  WantedBy=default.target
* systemctl —user enable screensaver
* Add gluqlo to local xscreensaver by adding this block at the end of the `programs:` section, removing -w and -h if you don't need to run a custom size)
  * -				gluqlo -root -ampm -w 800 -h 480	    \n\
* Run `xscreensaver` to disable everything except gluqlo
  * You'll need to ssh into the streamer with port forwarding enabled and
    using a local X server like XQuartz, or do it manually via local config
    files
* [OPT] install shairport - apt install shairport-sync
  * edit /etc/shairport[?].conf to select correct audio device and set name
    * alsa = {output_device = "hw:1"}

Once everything is working with Roon to stream to the endpoint and display one of the options via the screen, you can pick up my two posts above to swap out chromium-browser with PeppyMeter if you’d like. My next test is to replace gluqlo with PeppyMeter and run it as the screensaver with the Web Controller, assuming you can run pygame via xscreensaver, TBD.

I’ve been running with this setup for a few weeks and generally everything is working really well. I have bumped into two minor issues, though, and would love to see if anyone has seen this?

  1. After running for a full day-ish (maybe after two days) of grouping the alsasound endpoint with the Cambridge, Roon starts to interpret pause as “Next Track”. This happens in both the Roon client as well as using the pause button directly on the Cambrdige. When I press Pause on either it just goes to the next track, and the following is displayed in logs (vumeters-lo-1 is the alsasound loopback):
04/08 17:19:50 Trace: [vumeters-lo-1] [Lossless, 16/44 MQA TIDAL FLAC => 24/44] [1% buf] [PLAYING @ 4:44/4:46] This Twilight Garden - The Cure
04/08 17:19:50 Debug: [raat/tcpaudiosource] connecting to 192.168.1.203:36633
04/08 17:19:50 Debug: [raat/tcpaudiosource] connected
04/08 17:19:50 Warn: [raat/tcpaudiosource] send failed: Broken pipe
04/08 17:19:50 Warn: [raat/tcpaudiosource] disconnecting + retrying
04/08 17:19:50 Debug: [raat/tcpaudiosource] disconnecting

I haven’t narrowed it down to only happening when it’s playing Tidal, or maybe MQA, that’s as far as I’ve gotten.

  1. When I group the Cambridge with the alsaloop endpoint, the Cambridge will start reporting a lot of clipping which it never does when not grouped with this endpoint or when grouped with other endpoints in the house:

Screen Shot 2023-04-09 at 9.42.28 AM

Full signal path for the Cambridge when clipped:

I’ve enabled headroom and experimented down to 6 with the same result. Is there another setting in the alsaloop endpoint that could be causing this? Interestingly I always have headroom set at 4 for the Cambridge, but when I group it with the alsaloop endpoint I can audibly here the volume of the Cambridge going up, like Roon is interpreting a different headroom for the Cambridge when it’s solo and then when it’s grouped.

Let’s see your parametric EQ resulting curve!

TLDR, how do you handle different sample rates/bit depths for the vu meters zone?

Volume leveling settings need to be set every time you ungroup/regroup zones, so that’ll explain you hearing volume changes, maybe?

I’m not sure how to find/show a resulting EQ graph?

Good catch on volume leveling; I have it set to Auto for the Cambridge and not enabled for alsaloop. Once I enabled it for alsaloop and for the grouping the volume issue went away. Thanks for the pointer!

I don’t have max sampling rates or max bits per sample option for the alsaloop device. Both the Cambridge and the Cambridge+alsaloop groupings are set to allow 192kHz.

The white curve in my example is the resulting EQ curve.

Ah, didn’t realize there was a resulting EQ.

According to the graph it seems you’d need at least -5dB of headroom, but you could also use the slider to the right of the graph to pull it down to stay below 0dB, instead.
You should at least effect less clipping occurrences when decreasing gain, so just keep on reducing it to remedy and keep observing…

Good luck!

I had an urge to use PeppyMeter for cool VU meters but also (importantly) to show the metadata for the current playing track, whether this is from internet radio, spotify or roonbridge.

I bought a Waveshare widescreen 7.9" display and mounted it in a metal box that sits on top of my kitchen radio (an old valve radio) which houses the Pi and AMP2 so it’s not “proper hifi”.

I swapped out DietPi for Volumio on my Rasberry Pi as thought this would be the easiest way to get this all working whereupon I discovered that Peppymeter doesn’t display metadata for Roonbridge…

I did start investigating the guidance in this thread but for my use case, it all looked a bit complex and (I was thinking) might result in metadata for roon but not for the other sources. So (as an experiment), I enabled shairport in volumio so I can stream to the Pi via Airplay from Roon and lo, the metadata displays perfectly!

For my limited sonic requirements, this was a quick and easy way to get Peppymeter working with Roon.

Using AirPlay and Volumio+Peppy via Roon is a great tip, thanks for sharing! Can you group AirPlay endpoints in Roon with RAAT endpoints?

I’ve reached out on this thread asking for Volumio+Peppy support for Roon as a source and it sounds like it’s not on anyone’s roadmap:

That’s not possible, unfortunately…

Just a quick update here: I’ve been relatively stable and running on my PeppyMeter build for a few weeks and generally everything is great. I’ve noticed that when grouping the loopback device with my primary Roon zone in the same room, alsasound seems to be a bit less stable when applying volume leveling, it just stops receiving or sending data on occasion but doesn’t report anything in logs. Not an issue that a quick reboot of the Peppy Pi won’t fix. So overall I’m really pleased with the results, and wanted to say thanks again to this community for the help and feedback on getting this in place.

But never satisfied, I saw these just came out and immediately started thinking about options to run one per channel. :smiley:

Anyone get this working with moode audio?

I followed this guide and everything works except the needle never moves. I tried grouping with both Loopbacks that appear in Roon.

I’ve never tested moode as a Roon endpoint (actually never even seen it, thanks for the pointer), but I’m guessing this is the same issue that Volumio has with its implementation of VUMeters: it doesn’t support Roon audio either. Probably an issue with the virtual Alsa devices that each use but that’s way above my head. :slight_smile:

I had used moOde as a Roon endpoint before discovering RoPieee. Any device that you can install Roon bridge on using the script should work.

I wasn’t even able to get PeppyMeter working locally with volumio so I gave moOde a try and it worked per the guide I linked above, but of course it wouldn’t work with Roon. I hope the PeppyMeter author works more closely with moOde/volumio/others? to get this working with Roon.

Further refinement and usage updates, and one tip to keep PeppyMeter a bit more stable when grouping with another Roon endpoint: I needed to set Max bits per sample (PCM) to 16 because PeppyMeter would just sit at zero when playing any 24bit encoded song.

I still haven’t solved the issue where eventually it will get confused and Pause becomes “skip to next track”, but I’m continuing to refine the deployment to make it as stable and usable as possible.

You have peppymeter running with roon and volumio? Did you have to do anything special to get this to work? What airplay plugin are you using with volumio?