Raspberry-PI based native MOD player to play music modules MOD,S3M,IT,XM among others.
It uses command-line player based on bass-play libraries.
Short description of music modules:
Music modules originates from Amiga computers, later were transferred to another platforms.
The main principe is the file containing sound samples and patterns containing information of when and how particular sound should be played.
As there are players for Windows, Linux and other platforms nowadays, portable players can play just mp3 files which was my motivation to construct this player.
More resources regarding music modules:
As long-time enthusiast of music modules, I've dreamed about native portable player.
Raspberry PI has allowed this.
It uses command-line player (running on default Raspbian) to be started/stopped by script.
Principe of the operation:
Buttons shorts pull-up resistors to change GPIO pins's state from 1 to 0.
Scripts checks GPIO's pins and executes particular action (play/stop/next/previous).
Raspberry Pi with default Raspbian.
Suitable casing (an old walkman in my case).
Buttons, possibly PCB and wires/connectors (depends on your design)
Micro-usb connector to power raspberry as designed.
4 10KOhm resistors
These libraries are being used:
Command-line player based on libraries above:
Default Raspbian from official website:
Control scripts to control player above via buttons trough GPIO are included in this project.
The software part is most tricky step of the project (I've made it as verbose as possible).
Wiring of pull-up resistors and buttons is simple on its own, I'd suggest to try first on bread board before soldering if you have a little soldering experience.
I've tried to make steps below as easy to understand as possible.
If you'll get puzzled and/or have any questions/tips please let me know and I'll update this project.
MANY THANKS to Aleksander Mosingiewicz for creating command-line player based on the bass-play libraries and figuring out the way to compile it on Raspberry. I wouldn't be able to finish the project without him.
Other thanks goes to Raspberry team for great piece of hardware and Un4seen Development for bassplay libraries.
I'd like to thank the guys at www.brmlab.cz and www.bytefest.org and www.praseparty.cz for encouraging me to publish this.
Last but not at least I'd like to thank my parents for supporting me.
Step 1: Hardware Part - GPIO Control
Player is controlled through Raspberry's GPIO pins (pull-up 10K resistors connected between GPIO pins and 3.3V, grounded by the button).
Source of 3.3V and ground is available on GPIO.
This changes the state of particular pin in /sys/class/gpio/gpio"$PIN"/value.
Script uses this change as a condition for particular action.
Notes about GPIO:
As Raspberry's GPIO pin-out differs around versions, I'm including just pin names as being used by the script.
Please check the documentation for your particular version to find out the location of pins.
Input (button control - mandatory):
GPIO11 - play
GPIO9 - stop
GPIO10 - next song
GPIO22 - previous song
Output (optional LEDs):
GPIO02 - player ready
GPIO03 - play led
GPIO04 - stop led
GPIO17 - unused