Portable native MOD player based on Raspberry PI (plays MOD,S3M,IT,XM etc...). Uses BassPlay library.

 by Mr.Holub
Featured
portable_mod_player_0850.jpg
portable_mod_player_0851.jpg
portable_mod_player_0852.jpg
portable_mod_player_0853.jpg
portable_mod_player_0854.jpg
portable_mod_player_0855.jpg
Description:

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:

http://en.wikipedia.org/wiki/Module_file
http://modarchive.org
ftp.modland.com

Motivation:

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).

Used parts:

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

Necessary files:

These libraries are being used:

http://www.un4seen.com/stuff/bass24-linux-arm.zip
http://us.un4seen.com/files/bass24-linux.zip

Command-line player based on libraries above:

http://sourceforge.net/projects/almos666.u/files/bassplay-0.1.tar.gz/download

Default Raspbian from official website:

http://www.raspberrypi.org/downloads

Control scripts to control player above via buttons trough GPIO are included in this project.

Construction notes:

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.

Final notes:

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.

Thanks:

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.
 
Remove these adsRemove these ads by Signing Up

Step 1: Hardware part - GPIO control

button_GPIO_scheme.jpg
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
Edgar says: Jan 3, 2013. 2:03 PM
Good Job! :)
Went to my Blog post:
http://faz-voce-mesmo.blogspot.pt/2013/01/prusa-i3-mais-rhinonest-cera-de.html
yoyology says: Dec 27, 2012. 9:43 AM
Could you add some information in the initial step explaining what MOD is and why a portable player is desireable?
Mr.Holub (author) in reply to yoyologyDec 27, 2012. 1:32 PM
Thank you for sharing your point of view.
I was driven by the logic that MOD enthusiast wouldn't need an explanation and people not knowing what MOD is wouldn't need MOD player.
I'll add a brief description with links to further resources.
Thanks again.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!