peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

PeppyMeter

Mon May 09, 2016 4:08 am

I've just finished PeppyMeter. PeppyMeter is a software VU Meter written in Python. It was originally developed as the new 'VU Meter' screensaver for Peppy Player (https://github.com/project-owner/Peppy.doc/wiki). With minor modifications it became a stand-alone application. PeppyMeter gets audio data from media players (e.g. mpd) via fifo and displays current volume level in a Graphical User Interface in a form of traditional VU Meter.

Image

Here are the key features of the program:
- Written in Python.
- Pygame library leveraged for UI purposes.
- Fixed resolution 480x320 pixels.
- Can work with any media player which is capable to output PCM signal to the fifo/named pipe.
- Supplies 9 default meters out of the box.
- Allows to add your own meters.
- Open-source. All source files are available on Github.
- Provides different algorithms for processing PCM data.
- Several data sources are available for testing and tuning.

More details including all source files can be found on the project's wiki:
https://github.com/project-owner/PeppyMeter.doc/wiki

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Tue May 29, 2018 2:08 am

New version of PeppyMeter was released today.
New features:

Added new native resolution 320x240px
Redesigned volume data extraction from named pipe
Handling of data input from different audio players through ALSA file plugin
Implemented support for output to Serial Interface and I2C interface

Here is example implementation of I2C output:

Image

Image

Here is example implementation of Serial interface created by Tobias (Hamburg):

Image

More details can be found on wiki pages:
https://github.com/project-owner/PeppyMeter.doc/wiki

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Sun Oct 14, 2018 10:01 pm

New version of the PeppyMeter which leverages peppyalsa plugin was just released:
https://github.com/project-owner/PeppyMeter

The details about peppyalsa plugin can be found here:
https://github.com/project-owner/peppyalsa.doc/wiki

Image

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Wed Oct 17, 2018 1:46 pm

Hi there,

A wonderful project and I was wondering if it is possible to feed an input source to activate the meters?

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Wed Oct 17, 2018 3:34 pm

jimthedj65 wrote:
Wed Oct 17, 2018 1:46 pm
A wonderful project and I was wondering if it is possible to feed an input source to activate the meters?
The meter will be automatically activated when you start the program. In this case it will use the
default data source - named pipe. peppyalsa plugin should be installed as well. It will send data
to that pipe. This configuration allows to use any player - mpd, vlc, mplayer etc. The only requirement -
peppyalsa plugin should be defined as the output device for that player, for example:
aplay -D peppyalsa some_audio_file.wav

It's also possible to define other data source for the meter: noise, sin, triangle etc. In this case the
input signal will be generated by the meter itself. This is useful for debugging purposes.

If you want to feed meter with your own data then it's also possible. You just need to send
data to the named pipe in a particular format which is described here:
https://github.com/project-owner/peppya ... eter-Usage

Please let me know if this answers your question.

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Wed Oct 17, 2018 3:51 pm

I am going to build it now to see if that indeed allows me to use it as a standalone meter with an input audio source from RCA etc. Once again great project, I am looking to mod old vu meter casings with the screen version as the large vu meters are very hard to come by.

I will keep you posted.

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Wed Oct 17, 2018 3:59 pm

OK, just make sure that your LCD or whatever you are going to use as output device can
make quick screen refresh. Otherwise you will experience a lag in animation. Just google
for PeppyMeter to see some videos explaining what I mean. Linear meters don't have such
issues.

I would recommend first to see how it works using either graphical desktop (e.g. Raspbian
Stretch Desktop) or VNC session.

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Wed Oct 17, 2018 5:08 pm

Thanks for your tips, I am using the standard 7" touch screen. I j installe d abrand new image onto a 32gig card and installed git etc compiled the source and get the following with success

[email protected]:~/peppyalsa $ aplay -D peppyalsa /usr/share/sounds/alsa/Side_Left.wav
Playing WAVE '/usr/share/sounds/alsa/Side_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

[email protected]:~/peppyalsa/src $ ./peppyalsa-client
Peppy ALSA Client. Goya Edition. 2018/09/08
No pipe name provided, defaulting to /home/pi/myfifo

I just need to install my sound card, at the moment it is outputting to the HDMI instead of the headphone jack as below, which I need to change to at least hear something

[email protected]:~/peppyalsa $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

I will now go do some research, thanks for your quick responses.

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Wed Oct 17, 2018 5:16 pm

Wow, you are fast :) That peppyalsa-client should display ASCII VU Meter. The amplitude
of the signal in VU meter depends on the maximum volume level defined in amixer or alsamixer
- lower maximum level will cause lower amplitude in VU meter.

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Wed Oct 17, 2018 7:03 pm

Hi and thanks for the wonderful compliment. I finally got some output to my amplifier via the headphone jack, I just ran raspi-config to force the sound out the headphone jack for now.

I just need a little guidance on how to output the vintage vu meter for example, I am getting a little bit lost on the config for it?

Any help greatly appreciated.. I did a screenshot a test wav, both right and left work great. Will this work with any raspbian supported sound card with an input?

https://www.dropbox.com/s/fa7dt6t7ystqb ... y.JPG?dl=0

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Wed Oct 17, 2018 7:56 pm

Just to clarify, the program peppyalsa-client shows only ASCII VU Meter. To see the graphical meters
you need to install PeppyMeter. The installation details can be found here:
https://github.com/project-owner/PeppyM ... stallation

If you want to see only 'vintage' meter then change the first line in the configuration file
/home/pi/PeppyMeter/config.txt
from
meter = random
to
meter = vintage
This change will set Vintage as the only meter which will be displayed. The default Random meter
periodically shows all meters. The changes in the meters.txt configuration file are necessary only
if you want to change any meter parameter. But the default settings should work well.

I'm not sure why the left channel is not visible on your screenshot. Probably the issue was in the
screen capture.

I think peppyalsa plugin and PeppyMeter should work with any hardware if that's a regular hardware
supported by ALSA.

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Wed Oct 17, 2018 9:58 pm

Hi there and once agaoin thank you for all your assistance. The screen capture was indeed the issue, I cut it off. I got everything working apart from the GUI Peppy Meter.

This is excellent coding and thanks for making it all standalone. I will post a video of my final build, I finally got VNC working and Pixel etc making good progress for my test rig.

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Wed Oct 17, 2018 11:22 pm

Finally got it all working, thanks for your help, I can now get to work on creating my own VU meters :-)

https://vimeo.com/295690421

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Wed Oct 17, 2018 11:56 pm

Great Job! Creating your own meter should be fun as well. For example you can make the photo
of your real VU meter and make new PeppyMeter using that image as a background. That will give
the second life to your favorite meters :) Please let me know if you will have any issue or question.

jimthedj65
Posts: 7
Joined: Wed Oct 17, 2018 1:14 pm

Re: PeppyMeter

Fri Oct 19, 2018 6:26 am

Thanks, I had fun building this and researching some errors and looking for a sound card input device, which I have narrowed down to http://www.audioinjector.net/rpi-hat.

I notice you have hard coded the resolution of the meter, is there any way I can stretch or fill the image to a 7" screen?

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Fri Oct 19, 2018 3:42 pm

The meter currently has two resolutions: 480x320, 320x240. These resolutions are
common for many small LCDs. You can define larger resolution but the meter will be
480x320 maximum with a black border around it.

The problem is that the meter is using bitmap/pixel images. As you probably know
such images don't scale up well. They look blurry in this case. Therefore all images
were prepared just for two common resolutions.

Is it possible to define the resolution 480x320 for the screen? I know that it's native
resolution is 800x480 but you can probably set smaller resolution as well. Ideally
one more resolution should be created for the meter - 800x480. I can do that for
the next meter release. Right now I'm working on the new version of the Peppy player.
Hopefully I'll release it soon. After that I'll have some spare time.

peppy.player
Posts: 114
Joined: Mon Mar 07, 2016 6:10 am

Re: PeppyMeter

Tue Nov 13, 2018 4:57 am

New version of the PeppyMeter was released today.
New feature - added one more native resolution - 800x480 pixels.
Here are two examples:

Image

Image

Return to “Graphics, sound and multimedia”