Moode Forum
PeppyMeter and moOde - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9)
+--- Thread: PeppyMeter and moOde (/showthread.php?tid=3484)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40


RE: PeppyMeter and moOde - Pappece - 05-05-2024

@fdealexa Newbye installation :
Hi,to everybody.
I'm a newbie and dummy....i don't know linux but i like moode and peppymeter.....!!!!!
I ask ,during intallation of peppymeter on post #5 you say :
"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
}"
Where is slave pcm "hw:1,0" what i have to change to write my usb device dac?
This is my aplai -l configuration
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 0: b1 [bcm2835 HDMI 1], device 1: bcm2835 HDMI 1 [bcm2835 HDMI 1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 2: AUDIO [SMSL USB AUDIO], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
I'need more and more help !!!!


RE: PeppyMeter and moOde - fdealexa - 05-06-2024

(05-05-2024, 10:33 AM)Pappece Wrote: @fdealexa Newbye installation :
Hi,to everybody.
I'm a newbie and dummy....i don't know linux but i like moode and peppymeter.....!!!!!
I ask ,during intallation of peppymeter on post #5 you say :
"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
}"
Where is slave pcm "hw:1,0" what i have to change to write my usb device dac?
This is my aplai -l configuration
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: b1 [bcm2835 HDMI 1], device 0: bcm2835 HDMI 1 [bcm2835 HDMI 1]
 Subdevices: 4/4
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
card 0: b1 [bcm2835 HDMI 1], device 1: bcm2835 HDMI 1 [bcm2835 HDMI 1]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
 Subdevices: 4/4
 Subdevice #0: subdevice #0
 Subdevice #1: subdevice #1
 Subdevice #2: subdevice #2
 Subdevice #3: subdevice #3
card 2: AUDIO [SMSL USB AUDIO], device 0: USB Audio [USB Audio]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
I'need more and more help !!!!

Hi Pappece,
your configuration is different from mine (with SMSL on the USB):
Code:
pi@PEPPY-Test-HDMI:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
 Subdevices: 8/8
 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
 Subdevice #7: subdevice #7
card 1: AUDIO [SMSL USB AUDIO], device 0: USB Audio [USB Audio]
 Subdevices: 0/1
 Subdevice #0: subdevice #0
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
 Subdevices: 7/8
 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
 Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
 Subdevices: 8/8
 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
 Subdevice #7: subdevice #7
pi@PEPPY-Test-HDMI:~ $

then the line in my "/etc/alsa/conf.d/_sndaloop.conf"
contains:
Code:
a { channels 2 pcm "plughw:1,0" }


while yours should be:
Code:
a { channels 2 pcm "plughw:2,0" }

Let us know, please.
Best regards,
Francesco


RE: PeppyMeter and moOde - fdealexa - 05-06-2024

@Pappece
for a complete and updated guide to PeppyMeter installation on moOde, please refer to this LINK.
Best regards,
Francesco


RE: PeppyMeter and moOde - kuyadreiph - 05-09-2024

(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

It seems like not working on a latest version of moode.


RE: PeppyMeter and moOde - Tim Curtis - 05-09-2024

@fdealexa - I have some extra time (rare) before r900 release and so maybe we could look at integrating PeppyMeter into moode. Something like a "Peppymeter" selection from the "Display mode" option in the CoverView section of Preferences.

[attachment=3763]

So basically its an alsa plugin + some alsa configs + some peppeymeter configs?


RE: PeppyMeter and moOde - fdealexa - 05-09-2024

(05-09-2024, 12:18 PM)Tim Curtis Wrote: @fdealexa - I have some extra time (rare) before r900 release and so maybe we could look at integrating PeppyMeter into moode. Something like a "Peppymeter" selection from the "Display mode" option in the CoverView section of Preferences.



So basically its an alsa plugin + some alsa configs + some peppeymeter configs?

Hi Tim,
I have just tested the procedure reported on this GITHUB with the pre5 of 9.0.0 everithings is ok excluding that the running command needs a 

Code:
export DISPLAY=:0.0

before the current command

Code:
sudo python3 peppymeter.py

Please do not hesitate to contact me by PM, due that the moOde alert does not recognize my email (I have to controll the status every time).
Best regards and thanks,
Francesco


RE: PeppyMeter and moOde - fdealexa - 05-09-2024

@kuyadreiph
Hello,
as reported in one of the recent post  #323, for a complete and updated guide to PeppyMeter installation on moOde, please refer to this LINK.
I have tested it several times (up to the 8.3.9).
Pease try it and let us know.
Best regards,
Francesco


RE: PeppyMeter and moOde - Tim Curtis - 05-09-2024

(05-09-2024, 03:40 PM)fdealexa Wrote:
(05-09-2024, 12:18 PM)Tim Curtis Wrote: @fdealexa - I have some extra time (rare) before r900 release and so maybe we could look at integrating PeppyMeter into moode. Something like a "Peppymeter" selection from the "Display mode" option in the CoverView section of Preferences.



So basically its an alsa plugin + some alsa configs + some peppeymeter configs?

Hi Tim,
I have just tested the procedure reported on this GITHUB with the pre5 of 9.0.0 everithings is ok excluding that the running command needs a 

Code:
export DISPLAY=:0.0

before the current command

Code:
sudo python3 peppymeter.py

Please do not hesitate to contact me by PM, due that the moOde alert does not recognize my email (I have to controll the status every time).
Best regards and thanks,
Francesco

Ok, sounds good.

Does peppymeter take over the display or can it run in a section of an HTML page?


RE: PeppyMeter and moOde - fdealexa - 05-09-2024

(05-09-2024, 05:26 PM)Tim Curtis Wrote:
(05-09-2024, 03:40 PM)fdealexa Wrote:
(05-09-2024, 12:18 PM)Tim Curtis Wrote: @fdealexa - I have some extra time (rare) before r900 release and so maybe we could look at integrating PeppyMeter into moode. Something like a "Peppymeter" selection from the "Display mode" option in the CoverView section of Preferences.



So basically its an alsa plugin + some alsa configs + some peppeymeter configs?

Hi Tim,
I have just tested the procedure reported on this GITHUB with the pre5 of 9.0.0 everithings is ok excluding that the running command needs a 

Code:
export DISPLAY=:0.0

before the current command

Code:
sudo python3 peppymeter.py

Please do not hesitate to contact me by PM, due that the moOde alert does not recognize my email (I have to controll the status every time).
Best regards and thanks,
Francesco

Ok, sounds good.

Does peppymeter take over the display or can it run in a section of an HTML page?
Hi Tim,
I am not able to answer to you: as you know I just cared the installation in the moOde environment, but I have not idea of the detailed architecture. Please note that the designer of PeppyMeter is always available on this thread on the diyAudio Forum that you know very well.
A very nice documentation has been produced on PeppyAlsa and PeppyMeter.
Please note that the meter and the background can be modified, but I don't know if it takes the display control, but I know that an HTML option exists.
Thank you very much and best regards,
Francesco


RE: PeppyMeter and moOde - Tim Curtis - 05-09-2024

(05-09-2024, 07:09 PM)fdealexa Wrote:
(05-09-2024, 05:26 PM)Tim Curtis Wrote:
(05-09-2024, 03:40 PM)fdealexa Wrote:
(05-09-2024, 12:18 PM)Tim Curtis Wrote: @fdealexa - I have some extra time (rare) before r900 release and so maybe we could look at integrating PeppyMeter into moode. Something like a "Peppymeter" selection from the "Display mode" option in the CoverView section of Preferences.



So basically its an alsa plugin + some alsa configs + some peppeymeter configs?

Hi Tim,
I have just tested the procedure reported on this GITHUB with the pre5 of 9.0.0 everithings is ok excluding that the running command needs a 

Code:
export DISPLAY=:0.0

before the current command

Code:
sudo python3 peppymeter.py

Please do not hesitate to contact me by PM, due that the moOde alert does not recognize my email (I have to controll the status every time).
Best regards and thanks,
Francesco

Ok, sounds good.

Does peppymeter take over the display or can it run in a section of an HTML page?
Hi Tim,
I am not able to answer to you: as you know I just cared the installation in the moOde environment, but I have not idea of the detailed architecture. Please note that the designer of PeppyMeter is always available on this thread on the diyAudio Forum that you know very well.
A very nice documentation has been produced on PeppyAlsa and PeppyMeter.
Please note that the meter and the background can be modified, but I don't know if it takes the display control, but I know that an HTML option exists.
Thank you very much and best regards,
Francesco

The diyAudio thread is interesting. It's clear that the overall expectation is that the meters need to reflect the final PCM output after any DSP (ALSA, Camilla, etc) thats applied and from both MPD and renderers.