My music player project – Quarantine 19 (started during my quarantine…)

try edit the peppymeter.py file:
def init_display(self):
self.screen_w = self.util.meter_config[SCREEN_INFO][WIDTH]
self.screen_h = self.util.meter_config[SCREEN_INFO][HEIGHT]
self.depth = self.util.meter_config[SCREEN_INFO][DEPTH]

    os.environ["SDL_FBDEV"] = "/dev/fb1"
    os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen"
    os.environ["SDL_MOUSEDRV"] = "TSLIB"

    if not self.util.meter_config[OUTPUT_DISPLAY]:

        os.environ["SDL_VIDEODRIVER"] = "dummy"
        os.environ["DISPLAY"] = ":0"
        pygame.display.init()
        pygame.font.init()
        self.util.PYGAME_SCREEN = pygame.display.set_mode((1,1), pygame.NOFRAME|pygame.DOUBLEBUF, self.depth)
        return

    if "win" not in sys.platform:
        os.environ["DISPLAY"] = ":0"
        pygame.display.init()
        pygame.mouse.set_visible(False)
    else:
        pygame.init()
        pygame.display.set_caption("Peppy Meter")

    self.util.PYGAME_SCREEN = pygame.display.set_mode((self.screen_w, self.screen_h), pygame.NOFRAME|pygame.DOUBLEBUF, self.depth)
    self.util.meter_config[SCREEN_RECT] = pygame.Rect(0, 0, self.screen_w, self.screen_h)

Hello ofiras,
I have modified, I have added noframe, also I have comment the one line above. and I open the script with openvt - s - - python-3 peppymeter and it worked. How do you open it and close it ?
Now if I start music the vumeter is not updating.
I have modified the mpd.conf to use peppyalsa but no reaction. Also I have observed that on reboot the mpd.conf is rewritten.
If I execute a play - D peppyalsa /usr/share/sounds/alsa/ file. Wav the vumeter is fully functional.
Another issue that I have now if I kill the peppymeter process in display I see the vumeter, it does not switch to volumio UI.
Tu he User rpi from diy audio helo me on this and is still help me.
Thanks

Hello,
Could you please tell me how you have configured the asound.conf and mpd.conf, on my side is not working at all.
It is working only if I play a particular file with aplay…
Thanks.

run from shell : aplay -l
show me your output and also your mpd.config and asound.config files

Hello

I use an USB DAC . I have configured plughw 5.0 as my output.
My display is waveshare 4.3 inch DSI
For displaying the peppymeter I use /dev/input/event0 because I do not have a /dev/input/touchscreen

  1. aplay -l

Blockquote
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 3/3
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
card 5: E30 [E30], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0

  1. mpd.conf from /etc
    Here in the audio output I have configured peppyalsa :

Blockquote
volumio@volumio:~$ cat /etc/mpd.conf

Volumio MPD Configuration File

# Files and directories #######################################################
music_directory         "/var/lib/mpd/music"
playlist_directory              "/var/lib/mpd/playlists"
db_file                 "/var/lib/mpd/tag_cache"
log_file                        "/var/log/mpd.log"
#pid_file                       "/var/run/mpd/pid"
#state_file                     "/var/lib/mpd/state"
#sticker_file                   "/var/lib/mpd/sticker.sql"
###############################################################################

# General music daemon options ################################################
user                            "mpd"
group                          "audio"
bind_to_address         "any"
#port                           "6600"
#log_level                      "default"
gapless_mp3_playback                    "no"
#save_absolute_paths_in_playlists       "no"
#metadata_to_use        "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update    "yes"
#auto_update_depth "3"
###############################################################################
# Symbolic link behavior ######################################################
follow_outside_symlinks "yes"
follow_inside_symlinks          "yes"
###############################################################################
# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}
###############################################################################

# Decoder ################################################################





###############################################################################

# Audio Output ################################################################

resampler {
                plugin "soxr"
                quality "high"
                threads "1"
}

audio_output {
                type            "alsa"
                name            "alsa"
                device          "peppyalsa"
                dop                     "no"




}





audio_output {
    type            "fifo"
    enabled         "no"
    name            "multiroom"
    path            "/tmp/snapfifo"
    format          "44100:16:2"
}

#replaygain                     "album"
#replaygain_preamp              "0"
volume_normalization            "no"
###############################################################################

# MPD Internal Buffering ######################################################
audio_buffer_size               "2048"
buffer_before_play              "10%"
###############################################################################


# Resource Limitations ########################################################
#connection_timeout             "60"
max_connections                 "20"
max_playlist_length             "81920"
max_command_list_size           "81920"
max_output_buffer_size          "81920"
###############################################################################

# Character Encoding ##########################################################
filesystem_charset              "UTF-8"
id3v1_encoding                  "UTF-8"
###############################################################################
audio_output {
        type            "fifo"
        name            "mpd_oled_FIFO"
        path            "/tmp/mpd_oled_fifo"
        format          "44100:16:2"
  1. I have understood that Volumio overwrittes the mpd.conf at restart so I have add the config also here :

Blockquote
sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl

Blockquote
volumio@volumio:~$ cat /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl


# Volumio MPD Configuration File

# Files and directories #######################################################
music_directory         "/var/lib/mpd/music"
playlist_directory              "/var/lib/mpd/playlists"
db_file                 "/var/lib/mpd/tag_cache"
log_file                        "/var/log/mpd.log"
#pid_file                       "/var/run/mpd/pid"
#state_file                     "/var/lib/mpd/state"
#sticker_file                   "/var/lib/mpd/sticker.sql"
###############################################################################

# General music daemon options ################################################
user                            "mpd"
group                          "audio"
bind_to_address         "any"
#port                           "6600"
#log_level                      "default"
gapless_mp3_playback                    "${gapless_mp3_playback}"
#save_absolute_paths_in_playlists       "no"
#metadata_to_use        "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update    "yes"
#auto_update_depth "3"
###############################################################################
# Symbolic link behavior ######################################################
follow_outside_symlinks "yes"
follow_inside_symlinks          "yes"
###############################################################################
# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}
###############################################################################

# Decoder ################################################################

"${ffmpeg}"

"${sacdiso}"

###############################################################################

# Audio Output ################################################################

${sox}

audio_output {
                type            "alsa"
                name            "alsa"
                device          "peppyalsa"
                dop                     "${dop}"
                ${mixer}
                ${format}
                ${special_settings}

}





audio_output {
    type            "fifo"
    enabled         "no"
    name            "multiroom"
    path            "/tmp/snapfifo"
    format          "44100:16:2"
}

#replaygain                     "album"
#replaygain_preamp              "0"
volume_normalization            "${volume_normalization}"
###############################################################################

# MPD Internal Buffering ######################################################
audio_buffer_size               "${audio_buffer_size}"
buffer_before_play              "${buffer_before_play}"
###############################################################################


# Resource Limitations ########################################################
#connection_timeout             "60"
max_connections                 "20"
max_playlist_length             "81920"
max_command_list_size           "81920"
max_output_buffer_size          "81920"
###############################################################################

# Character Encoding ##########################################################
filesystem_charset              "UTF-8"
id3v1_encoding                  "UTF-8"
###############################################################################
audio_output {
        type            "fifo"
        name            "mpd_oled_FIFO"
        path            "/tmp/mpd_oled_fifo"
        format          "44100:16:2"
}
4. I have alo copy the asound.conf from /etc to /home/volumio/.asoundrc

> Blockquote
volumio@volumio:~$ cat .asoundrc
pcm.!default {
        type plug
        slave.pcm "softvol_and_peppyalsa"
}

ctl.!default {
        type hw
        card 0
}

pcm.peppyalsa {
        type meter
        slave.pcm "plughw:5,0"
        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
}

pcm_scope_type.peppyalsa {
        lib /usr/local/lib/libpeppyalsa.so
}

pcm.dsp0 peppyalsa

5.If I run the command

Blackquote
aplay -D peppyalasa /usr/share/sounds/alsa/Front_Left.wav

the VUmeter is fully functionally

Starting and stopping the peppymeter.py

1.I start the peppymeter.py with

Blockquote
openvt -s – python3 peppymeter.py

It is working only after I have added Noframe in the line you have mentioned and lso commented the line above that in peppymeter.py.

2.Stopping the peppmeter.py does not switch to Volumio UI on the display
Fort stopping the peppymeter I search for the process then kill with kill -9 PID.
But after killing the process the Volumio UI does not apper on the display . Somehow the pepymeter meter picture is hanging . If I search for peppymeter process I can not find it meaning that it is stopped

Have you configured a push button for switching the Volumio UI to pepymeter then back ?

Many thanks for your help
Florin

change in mpd.config the name peppyalsa:
:audio_output {
type “alsa”
name “peppyalsa”
device “peppyalsa”

also change in the sound.conifg the card numbers to 5

ctl.!default {
type hw
card 5
}

pcm.peppyalsa {
type meter
slave.pcm “hw:5,0”
scopes.0 peppyalsa
}

pcm.softvol_and_peppyalsa {
type softvol
slave.pcm “peppyalsa”
control {
name “PCM”
card 5
}
}

1 Like

Hello ofiras ,
Unfortunelly Is not working

/etc/asound.conf
asound.conf
pcm.!default {
type plug
slave.pcm “softvol_and_peppyalsa”
}

ctl.!default {
type hw
card 5
}

pcm.peppyalsa {
type meter
slave.pcm “hw:5,0”
scopes.0 peppyalsa
}

pcm.softvol_and_peppyalsa {
type softvol
slave.pcm “peppyalsa”
control {
name “PCM”

/etc/mpd.conf

/etc/mpd.conf
audio_output {
type “alsa”
name “peppyalsa”
device “peppyalsa”
dop “no”

Thanks for your help

Hello ,

Kindly please lets move the discussion here, because I do not want to polutte your post


Thanks

Hi Ofiras, I really like your project. I would like to do it but I’m still a raspberry neophyte. Is it possible to share your project such as construction diagram, complete material used and software installation? Sorry for my little English. Thank you so much.

Was this a genuine Cello Audio replacement case and how much did you pay for it? I would love to port my PI2AES/RPi to a similar case, but Cello Audio hasn’t been around for some time.

Your setup looks fantastic! Great job. Cheers.

1 Like

It’s just a replica from eBay . Check this thread, I think that I posted a link to the seller
Ofir

1 Like

https://tenor.com/view/not-worthy-waynes-world-bow-praise-gif-4881098

This is one of best DIY setups I’ve seen here. I wonder how hard it would to use my PI2AES hat in this enclosure?

I’m guessing that it’s possible to directly wire the hat (mounted to the rear of the case) to the rPi without having to mount it directly.

Fantastic setup though. Bravo !

1 Like

Yes I guess its possible.
thanks for your feedback !

Hello, may i please ask how is installed and configured main, big display ? I understand from picture that it is connected via HDMI, does it need also microUSB power yet ?
Could you please describe how did you install it exactly ? I am this guy from Old fashioned player, after many troubles with wiring, soldering and mechanical work i decided to replace HW VU meters with LCD screen and SW VU. I already ordered 4" IPS, it will fit exactly to galaxy box.
Many thanks, Ed

Yes, it’s a 7" HDMI display, HDMI cable connected directly to the raspberry pi and usb to 5v power

1 Like

Hello, perfect, and how is it software configured please, I would need just one VU meter.

I used the peppy meter for the vu meter graphics , take a look at this thread : VOLUMIO Project with 1920 display and PeppyMeter as screensaver there is a step by step guide how to integrated it with volumio

2 Likes

Many thanks ofiras !