- Refactor into frontend, core, backend, hardware for easier maintenance.
- Powersaving option for screen dim
- Screen response upgrade
- Better boot time and sync check time
- Independant button functions on the frontend for easy modifications
- Splash Screen
A quick and dirty MP3 player for Pirate Audio.
You must place your music in the "music" folder and run this package with python3 -m mp3
.
This fork adds a few enhancements to the UI to expand capability. Some of these enhancements come from audiobook player application (I just wanted a dumb mp3 player that can go in my kids room that they can select books (albums) and chapters (tracks)).
Case for pirate-audio with speaker and rpi zero 2 w and some funky buttons: https://www.thingiverse.com/thing:6776425
Some settings can be configured in mp3/init.py:
- Sleep time options
- Default sleep time index
- long button press duration
- auto play on startup (True/False)
- Auto sync music file to a network folder on boot if available.
- Added resources: default_cover.png; icon-list.png; icon-time-onoff.png
- Album view: Sleep Icon
- Album view: list icon instead of return
- Album view: gap between ablum art
- Album view: sleep menu (short press); on/off (long press) - top left button
- Album view: vol +/- persistant volume change and vol indicator
- Album view: auto play first track album when selected
- Album view: only draw +/-1 albums for screen (save on processing)
- Track view: fix view track as current track when go into
- Track view: persistant scroll (long press) moves in jumps of 2.
- Track view: draw only +/- 2 tracks for screen (save on processing)
- Default Album art when no cover present
- Auto play on start up (option to turn on and off) by setting "is_playonstartup"
- Auto play next track and auto switch to next album at end of album
- Auto Sync to a networked folder (i.e. pull files from a persistant media source)
- Import Sorted alphabetically for album and track NAMES (not meta title)
- Pseduo shutdown/sleep; Pseduo wake with button 'A' long press
Run this code on fresh install of Rasbian (Rasbian Lite will require 'sudo apt-get install git' first):
git clone https://github.com/RatchetHamster/pirate-mp3-enhanced_options.git
chmod +x /home/pi/pirate-mp3-enhanced_options/mp3/install.sh
sudo /home/pi/pirate-mp3-enhanced_options/mp3/install.sh
optionally to setup samba fileshare:
chmod +x /home/pi/pirate-mp3-enhanced_options/mp3/samba_setup.sh
sudo nano /home/pi/pirate-mp3-enhanced_options/mp3/samba_setup.sh
enter password for fileshare
sudo /home/pi/pirate-mp3-enhanced_options/mp3/samba_setup.sh
The install file does the following:
- Update upgrade
- Python virtual env setup, activate and install mp3/requirements.txt
- Modify /boot/firmware/config.txt file to get audio working
- Modify /etc/rc.local to start module on boot and log output to /tmp/rc.local.log
- (optionally): install samba
- configure share file
- new share file user and password
Music must be in mp3 format, arranged into subfolders and include a cover.jpg
or cover.png
album art file. If the folder does not include cover art, it will use the crappy default.
Suimilar can be done for audiobooks - each folder is the book with track chapters inside. cover.jpg adn cover.png still apply (it still sees them as albums).
EG:
music/
├── Sabrepulse - Exile
│ ├── cover.png
│ ├── Sabrepulse - Exile - 01 The Artist & The Engineer.mp3
│ ├── Sabrepulse - Exile - 02 Further To Etherworld.mp3
│ ├── Sabrepulse - Exile - 03 Familiar.mp3
│ ├── Sabrepulse - Exile - 04 Banish.mp3
│ ├── Sabrepulse - Exile - 05 Hayati.mp3
│ ├── Sabrepulse - Exile - 06 Exit Berlin.mp3
│ ├── Sabrepulse - Exile - 07 1985.mp3
│ └── Sabrepulse - Exile - 08 In The End We Are All Cosmic.mp3
├── Sabrepulse - First Crush
│ ├── cover.png
│ ├── Sabrepulse - First Crush - 01 First Crush (Featuring Knife City).mp3
│ ├── Sabrepulse - First Crush - 02 The Advantage (Featuring Henry Homesweet).mp3
│ ├── Sabrepulse - First Crush - 03 City At Speed.mp3
│ ├── Sabrepulse - First Crush - 04 Arcanine.mp3
│ ├── Sabrepulse - First Crush - 05 Paradise.mp3
│ ├── Sabrepulse - First Crush - 06 The Rapture.mp3
│ ├── Sabrepulse - First Crush - 07 Futureproof.mp3
│ └── Sabrepulse - First Crush - 08 We Were Young.mp3
This player becomes very powerful if you have wifi setup and create a networked folder on the /home/pi/pirate-mp3/music folder so that you can add/remove music from a windows device. I use this tutorial: https://pimylifeup.com/raspberry-pi-samba/
Although, where it asks you to create a new folder - you just use the one that is already there.