Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


PeppyMeter and moOde
#1
Hello everybody,
as suggested by @TheOldPresbyope I wish to open a new thread related to the use of PeppyMeter, a software VU Meter, in the moOde environment.

For more info on PeppyMeter, please have a look to: : PeppyMeter.doc.


The current state is that I'm trying to run PeppyMeter on moOde; and thanks to a consistent help come from two guys in the "diyAudio Forum" (thanks to them again) as you can see (attached), now it also works together with mpd_oled ... but with some issues.
Please be free to ask any question.
Best regards to all of you,
Francesco
   
Reply
#2
Really Nice!
A tuto would be nice.
I know Kent told you no need to, but not everybody is at his level  Smile
Reply
#3
@ "Alaini93"
Hi, thanks for the reply: I'll try to build a tutorial but it's all experimental: so please make a copy of your current microSD before following the guide.
Also I mentioned a few issues: the biggest one is that I'm able (hopefully just for now) to view the meter on the default display only. My goal is to do it on another display but ... I need help !!!
I'll be back with the installation notes soon.
Regards,
Francesco
Reply
#4
Ok Francesco, no rush.
thanks
Reply
#5
First of all let us open a putty session on our moOde system and run: 
Code:
aplay -l
and take care of the result because it will be useful later.

PeppyMeter needs PeppyAlsa to run: so we need first to install and adapt it to our environment.
Code:
git clone https://github.com/project-owner/peppyalsa.git
cd peppyalsa
sudo apt-get install build-essential autoconf automake libtool libasound2-dev libfftw3-dev
aclocal && libtoolize
autoconf && automake --add-missing
./configure && make
sudo make install


Now we have to create 2 files with the same contents (in the third row (slave.pcm) we have to put the default output we had in "aplay -l": normally "hw:0,0" or "hw:1,0") 
Code:
sudo nano /etc/asound.conf

Copy and past the following content:
Code:
pcm.peppyalsa {
       type meter
       slave.pcm "hw:1,0"
       scopes.0 peppyalsa
}
pcm_scope.peppyalsa {
       type peppyalsa
       decay_ms 400
       meter "/var/tmp/peppyfifo"
       meter_max 100
       meter_show 0
       spectrum "/var/tmp/peppyfifosa"
       spectrum_max 100
       spectrum_size 30
}
pcm_scope_type.peppyalsa {
       lib /usr/local/lib/libpeppyalsa.so
}


Quote:^o and Enter to save and then ^x to exit.


Let's create the second file:
Code:
sudo cp /etc/asound.conf /home/pi/.asoundrc

At this point we have to patch an important file that create the configuration of moOde MPD:

Code:
sudo nano /var/www/inc/playerlib.php


Quote:^-1994 to go to row 1994 and modify the current content from:

Code:
"name \"ALSA default\"\n" . "device \"hw:" . $device . ",0\"\n",

to the new content:

Code:
"name \"ALSA default\"\n" . "device \"peppyalsa\"\n",

^o and Enter to save and then ^x to exit.

Now reboot the system and try to listen any music (a radio is the simplest way) if it is still alive!!! If not we have to troubleshoot where we made a mistake.

If everything is ok let's continue:


Code:
cd /home/pi/peppyalsa/src
gcc peppyalsa-client.c -o peppyalsa-client

At this point let's test all the chain:

Code:
/home/pi/peppyalsa/src/peppyalsa-client /var/tmp/peppyfifo

Listening the music we should see on the putty screen a couple of bar moving with the music intensity, as the following picture:

   

Now we are closer to the end: we have, now, to install PeppyMeter

Code:
cd /home/pi
git clone https://github.com/project-owner/PeppyMeter.git
sudo apt-get install python3-pygame
cd /home/pi/PeppyMeter

Now we have to configure our PeppyMeter:

Quote:
Code:
sudo nano /home/pi/PeppyMeter/config.txt

modifying the following contents:

Code:
"screen.size = large"
"framebuffer.device = /dev/fb0"
"mouse.device = /dev/input/event0"
"pipe.name = /var/tmp/peppyfifo"

^o and Enter to save and then ^x to exit.

Now we have to modify the program to disable the double buffer:

Quote:
Code:
sudo nano /home/pi/PeppyMeter/peppymeter.py

^-142 to go to row 142 and modify the current content from:
       
Code:
self.util.PYGAME_SCREEN = pygame.display.set_mode((screen_w, screen_h), pygame.DOUBLEBUF, depth)
to the new content:

Code:
self.util.PYGAME_SCREEN = pygame.display.set_mode((screen_w, screen_h))

^o and Enter to save and then ^x to exit.

At this point we have finished. To see the meter on the default display we have to start listening music and:

Code:
cd /home/pi/PeppyMeter
sudo python3 peppymeter.py > /dev/fb0

We should see, on the display, a kind of meter that changes every 20 seconds (time can be changed in the config.txt).
On the Putty screen appears a couple of message every change.
I suggest that, once you have decided what you prefer, we have to stop the meter:


Quote:^c^c 


The available type of meter, for the "large" size we have choosen, at the moment, are:

Quote:bar

blue
vintage
dash
gas
rainbow
grunge
royal
compass
gold
black-white
white-red
orange
blue-2
emerald
red
tube

then configure our PeppyMeter:

Quote:
Code:
sudo nano /home/pi/PeppyMeter/config.txt

modifying the following contents. From:

Code:
"meter = random"

to e.g.:

Code:
"meter = emerald"

^o and Enter to save and then ^x to exit.

Then start again:

Code:
cd /home/pi/PeppyMeter
sudo python3 peppymeter.py > /dev/fb0

Enjoy listening music... and its graphic
Reply
#6
that was fast Smile 

I'm sure it will be possible to toggle between VU meter and the regular coverart/Song name/progression bar, with a remote control (Flirc) or GPIO button.
Reply
#7
May I ask the favor, everyone will perform it, to confirm (possibly with a photo).
Thanks and regards,
Francesco
Reply
#8
I did everything as instructed and unfortunately it doesn't work.

I am getting such an error

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
Reply
#9
(03-06-2021, 06:49 PM)mrudzin Wrote: I did everything as instructed and unfortunately it doesn't work.

I am getting such an error

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

hi mrudzin,
some questions:
the point:

Quote:Listening the music we should see on the putty screen a couple of bar moving with the music intensity, as the following picture:

[Image: attachment.php?thumbnail=2117]   

Now we are closer to the end: we have, now, to install PeppyMeter
- was ok? I mean are you listening the music and you see the twoo "character bars?
- what is your configuration in terms of display?
the messages you see are normal because it gives a message on each change of meter type.
Try to start the peppymeter with this :

Code:
cd PeppyMeter
sudo openvt -s -- sudo python3 peppymeter.py

Please let me know.
Best regards.
Francesco
Reply
#10
(03-06-2021, 10:59 PM)fdealexa Wrote:
(03-06-2021, 06:49 PM)mrudzin Wrote: I did everything as instructed and unfortunately it doesn't work.

I am getting such an error

libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile

hi mrudzin,
some questions:
the point:

Quote:Listening the music we should see on the putty screen a couple of bar moving with the music intensity, as the following picture:

[Image: attachment.php?thumbnail=2117]   

Now we are closer to the end: we have, now, to install PeppyMeter
- was ok? I mean are you listening the music and you see the twoo "character bars?
- what is your configuration in terms of display?
the messages you see are normal because it gives a message on each change of meter type.
Try to start the peppymeter with this :

Code:
cd PeppyMeter
sudo openvt -s -- sudo python3 peppymeter.py

Please let me know.
Best regards.
Francesco

Hello
I cannot see these signs when I am displaying them. Maybe there is a bug somewhere earlier. I have a problem setting the slave pcm type.
First things first.
I create an asound file, cof and edit the slave pcm.
Then I make a copy of this file in another directory under the name .asoundrc
Yes?
what should I enter in slave.pcm, different things get displayed after typing aplay -l.
When editing files in parentheses, is it not necessary to enter the physical resolution of the display?
- what is your display configuration?
In this question, I don't quite understand what it is.
I think we'll fire it together.
I have moodeAudio ver 6.7.1
Reply


Forum Jump: