Peppy player

Here is a new entry in the Gallery - Portable player by Dee:
https://github.com/project-owner/PeppyPlayers.doc/wiki/Gallery#portable-player-by-dee-usa

d3-1.jpg


d3-2.jpg
 
Peppy player is using the following .asoundrc file for Bluetooth devices:

Code:
pcm.!default {
  type plug
  slave.pcm plugequal;
}
ctl.!default {
  type hw card 0
}
ctl.equal {
  type equal;
}
pcm.plugequal {
  type equal;
  slave.pcm bt
}
pcm.equal {
  type plug;
  slave.pcm plugequal;
}
pcm.bt {
    type plug
    slave.pcm {
        type bluealsa
        device "$mac_address"
        profile "a2dp"
        delay -20000
    }
}

It doesn't include the entry for the peppyalsa plugin which provides VU Meter and Spectrum functionality.
Here is another file which has that entry but it doesn't have Bluetooth settings:

Code:
pcm.!default {
  type plug
  slave.pcm myequal;
}
ctl.!default {
  type hw card PCM2702
}
pcm.myequal {
  type equal;
  slave.pcm reformat;
}
pcm.reformat {
  type lfloat
  slave {
    pcm "mypeppy"
    format S16_LE
  }
}
pcm.mypeppy {
  type meter
  slave.pcm "plughw:PCM2702,0"
  scopes.0 peppyalsa
}
ctl.equal {
  type equal;
}
pcm_scope.peppyalsa {
  type peppyalsa
  decay_ms 400
  meter "/home/pi/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
}

I'm not sure how to add peppyalsa configuration to the Bluetooth file. Thanks!
 
Thank you! Tried that, got sound in BT speaker but no VU Meter activity, no data in the fifo/pipe either. Here is the .asoundrc:

Code:
pcm.!default {
  type plug
  slave.pcm myequal;
}
ctl.!default {
  type hw card PCM2702
}
pcm.myequal {
  type equal;
  slave.pcm reformat;
}
pcm.reformat {
  type lfloat
  slave {
    pcm "mypeppy"
    format S16_LE
  }
}
pcm.mypeppy {
  type meter
#  slave.pcm "plughw:PCM2702,0"
  slave.pcm bt
  scopes.0 peppyalsa
}
ctl.equal {
  type equal;
}
pcm.bt {
    type plug
    slave.pcm {
        type bluealsa
        device "30:22:00:00:2C:B7"
        profile "a2dp"
        delay -20000
    }
}
pcm_scope.peppyalsa {
  type peppyalsa
  decay_ms 400
  meter "/home/pi/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
}
 
Hmm, can't make aplay working with BT speaker. Though VLC (used in the player) works fine (w/o VU Meter).

Code:
pi@raspberrypi:~ $ aplay -v music/eagle.wav
Playing WAVE 'music/eagle.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
Plug PCM: Linear Integer <-> Linear Float conversion PCM (FLOAT_LE)
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22574
  period_size  : 3763
  period_time  : 85333
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 3763
  period_event : 0
  start_threshold  : 22574
  stop_threshold   : 22574
  silence_threshold: 0
  silence_size : 0
  boundary     : 1479409664
Slave: alsaequal
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : FLOAT_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 32
  buffer_size  : 22574
  period_size  : 3763
  period_time  : 85333
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 3763
  period_event : 0
  start_threshold  : 22574
  stop_threshold   : 22574
  silence_threshold: 0
  silence_size : 0
  boundary     : 1479409664
Slave: Linear Integer <-> Linear Float conversion PCM (S16_LE)
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : FLOAT_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 32
  buffer_size  : 22574
  period_size  : 3763
  period_time  : 85333
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 3763
  period_event : 0
  start_threshold  : 22574
  stop_threshold   : 22574
  silence_threshold: 0
  silence_size : 0
  boundary     : 1479409664
Slave: Meter PCM
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22574
  period_size  : 3763
  period_time  : 85333
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 3763
  period_event : 0
  start_threshold  : 22574
  stop_threshold   : 22574
  silence_threshold: 0
  silence_size : 0
  boundary     : 1479409664
Slave: Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: linear-interpolation
Protocol version: 10002
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 44100
  exact rate   : 44100 (44100/1)
  msbits       : 16
  buffer_size  : 22574
  period_size  : 3763
  period_time  : 85333
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 3763
  period_event : 0
  start_threshold  : 22574
  stop_threshold   : 22574
  silence_threshold: 0
  silence_size : 0
  boundary     : 1479409664
Slave: BlueALSA PCM: /org/bluealsa/hci0/dev_30_22_00_00_2C_B7/a2dp
BlueALSA BlueZ device: /org/bluez/hci0/dev_30_22_00_00_2C_B7
BlueALSA Bluetooth codec: 0
Status(R/W):
  state       : PREPARED
  trigger_time: 0.000000
  tstamp      : 0.000000
  delay       : 0
  avail       : 18811
  avail_max   : 22579
aplay: xrun:1664: read/write error, state = PREPARED
pi@raspberrypi:~ $
 
Today the number of the Peppy Player disk image downloads from GitHub exceeded 10,000 since 10.30.2018
There is no exact statistics avialable for source code downloads. Using a rough estimate (12 downloads per week) it's another 3,000 downloads.
 
  • Like
Reactions: 1 user
How many audio files do you guys have maximal in a folder?
I changed all my music on the Peppy Player and it's really slow on folders with ~300 files.
It doesn't matter if MPD or VLC.

The whole player hangs for 1 to 2 minutes before the file is playing.
Clicking on the cover to go back to the file explorer is normal, but then selecting the next file it takes long again before playing.

What i don't understand is that the file explorer is not slow with so many files. Its just playing them that takes forever.
 
Hi,

It shouldn't take so long. This is a bug. The player is trying to get embedded images from each file in the folder.
I'll fix it in the next release. To fix it now you need to replace this line:
https://github.com/project-owner/Pe...953353a47556b26b/ui/player/fileplayer.py#L152
by these two lines (use spaces for indentation):
Python:
        load_images = self.config[ENABLE_EMBEDDED_IMAGES]
        return self.util.get_audio_files_in_folder(folder, load_images=load_images)

Also you need to set this property to False if it's True:
https://github.com/project-owner/Peppy/blob/0655be5202ecfef5de712ca4953353a47556b26b/config.txt#L46

Best regards
 
Thank you, that did it. I was despairing.
Also the folders with just 10 files are now faster.

Please at a "mpc update" button into Players > Audio or Players > MPD.
It's a bit of pain that I always need Putty if I change the files.

Also Playlists would be nice.
I have a lots of files in more then one folder because I want them in different Playlist.
 
Great!

OK, I'll try to implement 'mpc update' in the next release (tentative release date - middle of September) as a button in the Players > MPD.

In the next release there will be the access to the playlists folder (/home/pi/playlists) from the file browser navigator. I've also implemented a web based file playlist editor. It will save files/playlists in that folder.

Best regards
 
How many audio files do you guys have maximal in a folder?
I changed all my music on the Peppy Player and it's really slow on folders with ~300 files.
It doesn't matter if MPD or VLC.

The whole player hangs for 1 to 2 minutes before the file is playing.
Clicking on the cover to go back to the file explorer is normal, but then selecting the next file it takes long again before playing.

What i don't understand is that the file explorer is not slow with so many files. Its just playing them that takes forever.

I left no more than 120 files. and stop slowing down
 
New version (Kandinsky Edition) of the Peppy Player was released today.

The disk images with the new release are available here:
https://github.com/project-owner/PeppyPlayers.doc/wiki/Disk-Images

Here are the main features of the new release:

- Implemented a File Playlist Editor in the Web UI.
https://github.com/project-owner/Peppy.doc/wiki/File-Playlist-Editor

playlist-3.png


- Refactored the keyboard editor - added a cursor functionality

keyboard-cursor.png


- Added new VU Meter Screensaver types

meters-6.jpg


- Implemented VU Meter screensaver in the Web UI
https://github.com/project-owner/Peppy.doc/wiki/VU-Meter

web-meter.png


- It's possible now to hide/show different Player screen elements
https://github.com/project-owner/Peppy.doc/wiki/Player-Screen

enable-player-buttons.png


  • Improved performance of the image viewer (zoom in, zoom out and pan actions)
  • Added mpd dictionary update functionality.
  • Fixed YA Streams issue
  • Fixed the Stock screensaver

The complete list of changes can be found in the Release Notes:
https://github.com/project-owner/PeppyPlayers.doc/wiki/Release-Notes#kandinsky-edition-20230924
 
I had many different issues while trying to upgrade the Peppy player to Bullseye and Bookworm. One of them was that issue with pynanosvg library and new Python version (3.11) which comes pre-installed with new OS. Another issue was related to SPI displays etc. That's the reason why all player disk images are still based on the old Buster version.

I decided that I need to move forward and sucrifice some player features as it doesn't make sense to use the old OS/Python/Pygame forever. So, I switched to new Python version, new Pygame 2 library, excluded pynanosvg library, dropped CD player support (as Pygame 2/SDL2 dropped that), dropping support for SPI displays and use only HDMI. All that was done and I'll start working on disk images pretty soon. Hopefully I'll not face any other issues like Bluetooth support or anything else.