First of all let us open a putty session on our moOde system and run:
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.
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")
Copy and past the following content:
Let's create the second file:
At this point we have to patch an important file that create the configuration of moOde MPD:
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:
At this point let's test all the chain:
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
Now we have to configure our PeppyMeter:
Now we have to modify the program to disable the double buffer:
At this point we have finished. To see the meter on the default display we have to start listening music and:
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:
The available type of meter, for the "large" size we have choosen, at the moment, are:
then configure our PeppyMeter:
Then start again:
Enjoy listening music... and its graphic
Code:
aplay -l
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:
to the new content:Code:self.util.PYGAME_SCREEN = pygame.display.set_mode((screen_w, screen_h), pygame.DOUBLEBUF, depth)
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