Peppy player

This works:
Code:
server.start.command = --aout=alsa --alsa-audio-device=hw:1,0 --verbose=-1

From reading through the web i thought
Code:
pcm.!default {
    type hw
    card 1
    device 0
}

ctl.!default {
    type hw
    card 1
    device 0
}
in /etc/asound.conf and/or /home/pi/.asoundrc should to it but it does not.

I'm new to this sound stuff and i'm not a linux god :(
Took some time to figure out what i need to install in Armbian to make it work on the Odroid.

I was looking for a player that does not need to index all the files and found Peppy. I just want to browse my folders without the need for updating/waiting.
I also like the old school look of the interface.

Volumio and the others are all to restricted and i want to do certain things.
Also response in the Volumio forum is not the greatest.

I'm German and the Peppy thread at forum-raspberrypi.de is bigger.
But since I'm not using a RPi i thought its better to ask here.

Will play around and then i will have some questions to see if it can be done what i have in my mind :)
 
OK, good to know that it works on Odroid too.

I was also frustrated by the fact that many players are trying to update their database when you don't ask them to do that (sometimes it's not so obvious to find a way to switch updating off). That can take a lot of time if you have a large audio files collection.

Actually in the next release I'm going to introduce the metadata database as well. But the player will not do automatic auto-update. To create the database you will need to create database by running the script on any machine where your hard/flash drive with audio files is connected. That's to eliminate thousands of disk I/O operations which you would need to execute if you would run that script on Raspberry Pi or Odroid. When database file is created you can just copy it to RPi and use for browsing through the collection and selecting albums/tracks for playback.

It will take about 10 minutes for the script to create database for 1TB collection. The time is linear. So for 4TB collection it will take about 40 minutes and so on. You will be able to create as many database files as you want. For example you can make separate files for rock, jazz etc.

Regarding UI, I have several ideas which I hope to realize in one of the next releases. It will make UI more customizable and visually attractive.

German raspberry forum is very active and helpful one. It's up yo you where to post messages. I regularly check all forums where I post messages about the player.

Good luck
 
It will make UI more customizable and visually attractive.
Noooo, its visually attractive as it is.
I love it. It looks like my old Windows mobile phones :D

I'm building a 80's Ghettoblaster and also a portable router.

What i want to do:
1. Play the files through a HAT DAC and also through HDMI.
It doesn't matter if simultaneously or if i have to switch.

The idea is that I than can connect it via HDMI to a amp/receiver and send maybe multichannel/SACD/bit perfect or whatever...

2. It needs to run standalone.
That means it needs a hotspot so i can control it with my phone.

So switching between: 1. hotspot, 2. connecting to a WLAN and 3 LAN.
I guess it can be done with a switch on the GPIO pins and a script that is checking which pins are low/high and than goes into that mode?

3. I have a 4TB drive in my home server and one in that portable router.
They are in sync and have the same files.

The idea is to connect a USB stick or SSD to the Odroid where i have a selection of my files for standalone operation.

At home i want to play the files from my home server.
If i'm out and have the portable router with me from the router.

I never did that but i guess you have to mount the network shares (SAMBA) in fstab on boot?
But what if the share is not there? Booting will take longer?
So i guess it would be the best to use another GPIO switch to tell that thing if to mount or not?

---

Than i wonder how that down/upsampling works.
Do i need to tell ALSA when to do it?
Lets say your DAC can play 192KHz but not 352.8KHz.
So you need to tell it to only change the sampling rate if the DAC can't handle it...

The reason i want to use a Odroid C1+ is that it can go up to 384kHz and does multiples of 44.1 kHz and 48kHz.
 
Hi MrGlasspoole,

It sounds like interesting project. Just some comments regarding your requirements.

I've never tried to use hotspot but I guess it's not that much different from a regular Wi-Fi functionality. If this is the case you can switch between WLAN and LAN using Peppy's Network screen.

I think OS should properly handle missing shares. It shouldn't increase startup time too much.

I believe how DACs handle not-supported sample rates depends on a particular DAC. For example HiFiBerry DAC just didn't output signal in such cases. It didn't try to resample the signal.

There are some DACs which support 384KHz even on Raspberry Pi. Though you need custom OS kernel in this case as far as I know. Some "audio" OSs provide those kernel changes.

Please let me know if you will need any help with Peppy player or you will need some changes in the player which could be also useful for other users.

Good luck
 
The Odroid DAC does 384kHz :)
HiFi Shield 2 – ODROID

I need to ask there about DSD...

It was more a question of curiosity.
On a Windows PC the samplerates are up/down converted by your settings.
Especial if you use JRiver Media Center you can control it how you want it.

For example HiFiBerry DAC just didn't output signal in such cases.
That is exactly what i not want.
If the DAC does not support it the signal needs to be converted so you can listen.

I remember i did some hotspot on a Banana Pi some time ago.
Need to check how i did it. Cant remember.

--- So now more Peppy specific ---
I don't want fetching of stuff from the internet except radio.

All my files have a 1080x1080 image in the ID3 or Vorbis tag and i have folder.jpg pictures for albums and artists/bands.

I also don't need audio books. I only listen to audio drama's :D

So how can i disable it and what parts do i not need to install.
For example discogs_client...

Then i realized that if i go back to my browser window (Web UI) that the counter is running even when the file is not playing. After clicking somewhere and it goes from dim to normal...

And there is that power button at the left top when you play a file.
I think a stop button would make more sense?
So you can stop a file and play it again.

attachment.php
 

Attachments

  • peppy.jpg
    peppy.jpg
    54.8 KB · Views: 290
I believe you can up/down sample the signal using ALSA plugins. That should be done before the signal enters DAC. As I mentioned already ALSA manual configuration is pretty complicated and some kind of UI could be very helpful here. phofman is the expert in this area and he could shed more light on this subject.

You can disable any player mode either editing the player’s config.txt file manually (section [home.menu]) or using the Configuration Web UI in section Configuration/Home Menu:
Configuration * project-owner/Peppy.doc Wiki * GitHub
The size of the libraries used by those modes are so small that you will not save too much space by not installing them.

Do you use touchscreen to control the player or you use Headless mode with Web UI? When screensaver starts (in 1 minute by default) the Web UI becomes greyed out and all components become frozen including track time. When you click somewhere on screen the screensaver stops working and all screen elements start working as usual. You can disable screensaver especially if you don’t use touchscreen. You can switch off screensaver on the screensaver screen:
Screensavers * project-owner/Peppy.doc Wiki * GitHub
If you face some issue then please let me know the sequence of steps so that I could reproduce it.

The images embedded into audio files (mp3, FLAC) have precedence over folder.jpg images. So if you have both then the embedded images will be displayed in the player screen instead of the folder image. In the next release I’ll add a flag which will allow to avoid displaying embedded images. That can save time when you browse through folders with many audio files (>100).

Having shutdown button on player screen is very convenient - you don’t need to search for it. Also it’s the recommended way to switch off the player as only in this case the player saves its current state. For example it saves current track time for audio file, audio book, podcast, CD track etc. Next time you switch the player on it starts playing from the saved time. Stop button can be “simulated” by the Pause/Play button.

Best Regards
 
I made a short screen capture:
https://skulltronics.net/share/fixed/peppy_1.mp4

This is in Firefox.
The counter is at 03:00 and the file is not playing.
Then i go out of the screensaver by clicking the title and the counter starts to run without the file playing.
Then at 03:10 i start to play the file and the counter jumps to 03:00 (where the file was paused originally).

I don't have a LCD yet by will add one.

You can disable any player mode either editing the player’s config.txt file manually (section [home.menu]) or using the Configuration Web UI in section Configuration/Home Menu.https://github.com/project-owner/Peppy.doc/wiki/Configuration
The size of the libraries used by those modes are so small that you will not save too much space by not installing them.
Its not about space, its about background tasks or trying to connect to the internet.

With the Mixer you said config.txt does only hide it from the UI.
Lets say a flac has no image then peppy will connect to Discogs?
No way to disable that?

Having shutdown button on player screen is very convenient - you don’t need to search for it. Also it’s the recommended way to switch off the player as only in this case the player saves its current state. For example it saves current track time for audio file, audio book, podcast, CD track etc. Next time you switch the player on it starts playing from the saved time. Stop button can be “simulated” by the Pause/Play button.
I don't see how Pause/Play can be a stop button?
How do you start the file from the beginning without using the slider?
 
Hi,

Thank you for the video. Can you describe all steps which lead to the issue from the very beginning? That will help to identify and fix the issue. Thanks in advance.

The player connects to the Discogs only for Radio and CD-player modes (it doesn't do that for Audio files). You can disable that by setting property 'album.art' in section 'usage' to False.

The player can work without the Internet connection. In this case all player modes which depend on the Internet will be disabled/greyed out in the Home menu. You can test that by disconnecting the network cable and rebooting the player.

There are some screensavers which also connect to the Internet (Weather and Lyrics). But they don't connect if you don't select those screensavers.

To start the same track from the beginning just select it in the menu. It's one click away.

Best Regards
 
Last edited:
Hmm, actually it should not override the files changed locally.
You can backup the current folder:
mv Peppy Peppy.bak
and then install new one from github. It will have the fixed files. The configuration can be transferred from the Peppy.bak folder.
 
Last edited:
I got the Odroid C1+ and the latest thing that works is Ubuntu 18.04.4 LTS.

So i thought its a good idea to install the latest stuff and found out about pyenv.
The problem is that i get a message on boot that module pygame is not found.

What i did:
Code:
~# sudo apt install python-dev python-numpy python-openssl
~# sudo apt install python3-dev python3-numpy python3-openssl

~# curl [url]https://pyenv.run[/url] | bash

~# nano /home/pi/.bashrc
Added:
export PATH="/home/pi/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

~# exec $SHELL
~# pyenv update
~# pyenv install -v 3.7.3
~# pyenv global 3.7.3

~# sudo apt install python3-pip
~# pip3 install --upgrade pip
~# pip3 install --upgrade setuptools
~# pip3 install wheel
~# pip3 install pgen
~# pip3 install pygame
~# pip3 install python-vlc
~# pip3 install cython
~# pip3 install pynanosvg
~# pip3 install tornado==4.5.3
~# pip3 install discogs_client
~# pip3 install oauth2
~# pip3 install feedparser
~# pip3 install mutagen
 
I don't use either pyenv or vitrualenv. It's not required. Well, at least for the player. How do you start player? Do you use python3? You installed pygame for python3 (using pip3). Is it possible that you start player using 'python' instead of 'python3' ?

The easiest way to make sure that this or that library was properly installed is to start Python interpreter from command line (e.g. python3) and run import command at prompt:
Code:
>>> import pygame
If there is no exception thrown it means the library was properly installed and found by the interpreter. In this case it will be found by the player code as well.
 
I start Peppy with:
Code:
su pi -c 'cd /home/pi/Peppy; openvt -s -- python3 peppy.py'
in /etc/rc.local

But I'm back to the Odroid C2 with Buster because after hours with old Ubuntu/Debian releases I'm tired.

But just found out VLC does not play dsf files.
So mplayer is the only option because mpd does not work without updating every time you add new files.

Is there a reason you use mplayer and not mpv?
Seems like there is more development on mpv.