Go Back   Home > Forums > >

PC Based Computer music servers, crossovers, and equalization

PeppyMeter
PeppyMeter
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools
Old 27th November 2020, 08:09 PM   #331
lintbf is online now lintbf
diyAudio Member
 
Join Date: Nov 2020
HI ,
When I ran the first command it gave me this error on the display :
openvt: invalid option -- '-'
Usage: openvt [-c vtnumber] [-f] [-l] [-u] [-s] [-v] [-w] command_line

Then I have tried with adding the /dev/input/event0 to peppymeter.py because I do not have /dev/input/touchscreen and execute sudo puthon3 peppymeter.py The Display changed from Volumio UI to blank screen .
How can I get back to volumio UI without a reset ? It appears that the pygame is working but I do not see the picture .
To summarize the steps from Wiki:
1. I have created the named pipe
2. Configure peppyalsa plugin Done
3.Configure Audio Player :
When I execute volumio@volumio:/usr/share/sounds/alsa$ aplay -D peppyalsa Front_Right.wav I hear sound. For this step Do I need to perform any configuration?
4. Configure peppymeter. Here I have the error from initial post

I want to thank you for your great support
  Reply With Quote
Old 28th November 2020, 12:17 AM   #332
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
Hmm, either you run that command without space after '--' or the version of the 'openvt' in volumio is different.
You need to run the command with spaces around '--'. That double minus means the end of parameters for the 'openvt'.
Try to run one of the following commands as is without changing it:
Code:
openvt -s -- python3 peppymeter.py
sudo openvt -s -- python3 peppymeter.py
If it will complain again about '--' try to run without '--'.

You can exit from the player by pressing Ctrl-C in your SSH session.
I don't think you need any other configuration.

Best regards
  Reply With Quote
Old 28th November 2020, 10:35 AM   #333
lintbf is online now lintbf
diyAudio Member
 
Join Date: Nov 2020
Hello again ,

Now the command openvt -s -- python3 peppymeter.py it is working but the Volumio UI has changed to a black screen . I am expected to see at least the meter picture but it is black .
I can not exit from this because on the SSH terminal it looks like this:
PHP Code:
volumio@volumio:~/PeppyMetervolumio@volumio:~/PeppyMeteropenvt --- python3 peppymeter.py
volumio
@volumio:~/PeppyMeter 
As you can see If I press Ctrl+ C nothing will happen because on SSH terminal the script is finished and I need to perfom a reboot to comeback to volumio UI on the display I have tried with command top to kill the process but I do not know what it is .

In the peppymeter.py I have configured :/dev/input/event0.
If I ran the above command with /dev/input/touchscreen then the Volumui UI from display is changed with a terminl window which shows the error : Can not open terminal .

I am thinking that the peppymeter.py is correctly switching the display to pepymeter (pygame window) but why does not show the meter picture , it is strange . What is blocking to show the meter pciture ? I have configured to show the bar or blue , random but nothing .

If you need any info please let me know

Best Regards,
Florin
  Reply With Quote
Old 28th November 2020, 04:59 PM   #334
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
Hi,

I think you cannot exit from the meter because it's hanging. Whenever it works properly it should react to Ctrl-C.

You can find the meter PID either searching for 'python' (assuming volumio doesn't use python) or 'peppymeter':
ps -elf | grep python
And then kill the process using that PID

Start the meter using the command which changes UI to the black color. Before that comment out (add # at the beginning of the line) this line:
PeppyMeter/peppymeter.py at 1f1a6e93762cc0edd2805a8af2ad409beae3a06e * project-owner/PeppyMeter * GitHub
Also change this line:
PeppyMeter/peppymeter.py at 1f1a6e93762cc0edd2805a8af2ad409beae3a06e * project-owner/PeppyMeter * GitHub
either to this:
Code:
self.util.PYGAME_SCREEN = pygame.display.set_mode((screen_w, screen_h), pygame.NOFRAME)
or to this one:
Code:
self.util.PYGAME_SCREEN = pygame.display.set_mode((screen_w, screen_h))
Hopefully it helps.
Best regards
  Reply With Quote
Old 28th November 2020, 05:43 PM   #335
lintbf is online now lintbf
diyAudio Member
 
Join Date: Nov 2020
Hi rpi ,

I see the meter finally . thanks but :

1. I have commented the line that you have said
2. I have add NOFRAME to second line .
3. I have run
Code:
openvt -s -- python3 peppymeter.py
4. On display I see the meter that I have configured
5. The Vumeter is not udpated with the song being played .
6. If I go to /usr/share/sounds/alsa and I run
Code:
 aplay -D peppyalsa Front_left.wav
the VuMeter is updated and it is fully functional.
7. Kindly please tell me what I need to configure in order that Vumeter is udpated with Webradio or Qobuz , tidal etc.. Do I need t start those services with aplay and peppy alsa comand like above ?

8. Even if I kill with -9 the pepymeter python process teh display still shows the meter . If I check again the process , the peppymeter proces is gone .

The display looks realy nice with that Vumeter . The kids love it

Many thanks
  Reply With Quote
Old 28th November 2020, 06:14 PM   #336
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
Huh, finally

To make any player working with the meter you need to define 'peppyalsa' as the output device. As far as I know Volumio is using 'mpd' as the audio player. So you have to define 'peppyalsa' in the mpd.conf. I have no idea how you can do that in Volumio. Probably it has some UI for that or you can do that manually. Just find the mpd.conf file which used by Volumio (if it doesn't rename it to something else). But eventually you should have something like this in the mpd.conf:
Code:
audio_output {
    ...
    device "peppyalsa"

    ...

}
After stopping the meter the other program should redraw the screen. I don't think the meter blocks it.

Best regards
  Reply With Quote
Old 28th November 2020, 06:46 PM   #337
lintbf is online now lintbf
diyAudio Member
 
Join Date: Nov 2020
Hello,

Yes , Volumio uses mpd. I have edit the mpd.conf like this :

Code:
audio_output {
                type            "alsa"
                name            "alsa"
                device          "peppyalsa"
                dop                     "no"
The asound.conf from /etc looks like this :
Code:
ctl.!default {
        type hw
        card 0
}

pcm.peppyalsa {
        type meter
        slave.pcm "plughw:5,0" # this is my external DAC device 
        scopes.0 peppyalsa
}

pcm.softvol_and_peppyalsa {
        type softvol
        slave.pcm "peppyalsa"
        control {
                name "PCM"
                card 0
        }
}

pcm_scope.peppyalsa {
        type peppyalsa
        decay_ms 400
        meter "/home/volumio/myfifo"
        meter_max 100
        meter_show 0
        spectrum "/home/pi/myfifosa"
        spectrum_max 100
        spectrum_size 30
Regarding the UI not switching back I will get in touch with plugin creator .
I guess we are close to make it work on my sistem

Regards,
  Reply With Quote
Old 28th November 2020, 06:54 PM   #338
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
OK, so I believe it's working now after modifying the mpd.conf.
Which display model do you use? Does it have resolution 480x320? I hope you know how to switch to a different resolution if you need it.

Best regards
  Reply With Quote
Old 28th November 2020, 07:49 PM   #339
lintbf is online now lintbf
diyAudio Member
 
Join Date: Nov 2020
Hello ,

No it is not working I forget to tell you . only from /usr/share/sounds it is working ..
I use waveshare 4.3 inch DSI, 800x480. An HDMI one will be integrated much easier ? without so many modification ?
Regarding the resolution change I will change from config.txt screen size :
  Reply With Quote
Old 28th November 2020, 08:05 PM   #340
rpi is offline rpi  United States
diyAudio Member
 
Join Date: Apr 2015
Location: San Francisco
I hope you restarted the whole player after changing the mpd.conf.
The device name is the only thing which you have to change.

Try to copy that ALSA configuration file to the user's folder 'volumio' by running the following command (assuming the username is 'volumio' and you are in the folder 'volumio'):
Code:
sudo cp /etc/asound.conf .asoundrc
Then restart.

You can change the resolution by changing the following parameter to small (320x240), medium (480x320), large (800x480) and wide (1280x400) in the config.txt:
PeppyMeter/config.txt at 1f1a6e93762cc0edd2805a8af2ad409beae3a06e * project-owner/PeppyMeter * GitHub

The modifications for the HDMI would be the similar ones.

Best regards
  Reply With Quote

Reply


PeppyMeterHide this!Advertise here!
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 09:49 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
Copyright ©1999-2021 diyAudio
Wiki