Thank you for your donation!


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


PeppyMeter and moOde
[current]
meter = random
random.meter.interval = 20
screen.width =
screen.height =
exit.on.touch = True
stop.display.on.touch = False
output.display = True
output.serial = False
output.i2c = False
output.pwm = False
output.http = False
use.logging = False
use.cache = True
frame.rate = 30
meter.size = wide

[sdl.env]
framebuffer.device = /dev/fb0
mouse.device = /dev/input/event0
mouse.driver = TSLIB
mouse.enabled = True
video.driver = dummy
video.display = :0
double.buffer = False
no.frame = False

[serial.interface]
device.name = /dev/serial0
baud.rate = 9600
include.time = False
update.period = 0.1

[i2c.interface]
port = 1
left.channel.address = 0x21
right.channel.address = 0x20
output.size = 10
update.period = 0.1

[pwm.interface]
frequency = 500
gpio.pin.left = 24
gpio.pin.right = 25
update.period = 0.1


[http.interface]
target.url = http://localhost:8000/vumeter
update.period = 0.033

[web.server]
http.port = 8001

[data.source]
type = pipe
polling.interval = 0.033
pipe.name = /home/pi/peppyfifo
volume.constant = 80.0
volume.min = 0.0
volume.max = 100.0
volume.max.in.pipe = 100.0
step = 6
mono.algorithm = average
stereo.algorithm = new
smooth.buffer.size = 4
Reply
hi Roman,
please modify
pipe.name = /home/pi/peppyfifo
in
pipe.name = /var/tmp/peppyfifo
Regards,
Francesco
Reply
Francesco, thank you very much, that was it.
I don't understand how I could have changed it. But probably my fault.
Please also give me advice on how to make it autostart. I don't know how to copy your files. I'm using FileZilla but it says rejected.
Thanks again for being patient with me.
Regards
Roman
Reply
Hi Roman,
I normally use winscp
or you can use native windows:
.you can see and modify the SDCARD (file Manager \\IpAddress\SDCard)
.put the files there (with drag & drop windows)
.and then copy to the target directory (via putty with command cp or mv)
Hope it is clear.
Regards,
Francesco
Reply
Francesco, win scp also says rejected. I'll try the second method.
Reply
Francesco, everything works as it should. I did as you said.
Is there a backup method please? Will the one that comes with the player work?
Reply
Hi Roman,
if you reach the target configuration you can easly switch off the Rpi, take the sd away, create an image copying the sd to an .img file.
Are you happy?
Best regards,
Francesco
Reply
It was a big chore for me, but in the end I did it. I am very happy for your help and willingness. That's why I want to back it up somehow. What program do you use?
Is there any way to change the VU meters? I saw a download somewhere on another forum. But I don't have the courage to do that.
Best regards and many thanks
Reply
(01-31-2023, 06:39 PM)Patolog1964 Wrote: It was a big chore for me, but in the end I did it. I am very happy for your help and willingness. That's why I want to back it up somehow. What program do you use?
Is there any way to change the VU meters? I saw a download somewhere on another forum. But I don't have the courage to do that.
Best regards and many thanks


Hi Roman,
the program I use to write or read images on SD is win32diskimager (this is the link).
About the VU meter modification: I am not an expert on this but an easy way is to copy an exiting vumeter (3 files -bgr, -fgr, -needle) in /home/pi/PeppyMeter/wide (in your case) maintening the scale and the needle.
Much more information can be find in https://github.com/project-owner/PeppyMeter.doc/wiki (Official PeppyMeter documentation).
I saw a lot of modified vumeter in these thread:
- https://www.diyaudio.com/community/threa...ter.291010
- https://community.volumio.org/t/project-...ster/45862

Best regards,
Francesco
P.S.: please note that I am not the developer of PeppyMeter neither the owner, I just tryed to integrate it in the great moOde.
Reply
(02-10-2021, 06:55 PM)fdealexa Wrote: 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

Hi Roman, I  will do my best to follow this tutorial to activate Peppy meter for Moode Audio today and will need your support.

Quick questions at this moment to begin mysetup ---

1. In order to use Putty I remember for a tool like Volumio, we need to activate SSH by going to volumio.local/dev, my question is what is the process here for Moode audio to activate SSH ?

2. Is your tutorial valid for Moode Audio version 8 which is the latest one ?

3. I am planning to use a RPI 8GB RAM with 64GB Card and use an external DAC like iFi Audio. Hope this should be ok for the Moode Setup

Looking forward to hearing from you.

Regards,
Rajiv
Reply


Forum Jump: