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

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:


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.

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.


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
<p>Made it work with omxplayer for all music files (the software that is):</p><p><a href="https://github.com/iugamarian/bshplyr/tree/master" rel="nofollow">https://github.com/iugamarian/bshplyr/tree/master</a></p><p>Thank you.</p>
<p>It's nice to see that my project has been inspirative.</p><p>Can OMXplayer play MOD,S3M,IT,XM too? I cannot find this infromation.</p><p>It's good that it runs as service, too.</p><p>Do you plan to publish the final onstruction when it's done?</p>
<p>I don't have .mod files, test yourself with bshplyr-no-gpio my new smaller script (it seems I don't need gpio fo myself, just happy with automated play)</p><p>To play .mod you can also install timidity++ and change playerbin to /usr/bin/timidity++</p><p>If I have more time or someone else does we can make conditionals to change playerbin according to filetype (github allows changes, remembering history).</p><p>My final construction is just a Raspberry Pi in a cardboard case, adapted for battery pack according to </p><p><a href="http://www.daveakerman.com/?page_id=1294" rel="nofollow">http://www.daveakerman.com/?page_id=1294</a></p><p>with headphones and no buttons as GPIO's don't work for me for some unknown reason (they are always &quot;0&quot; ).</p>
Good Job! :) <br>Went to my Blog post: <br>http://faz-voce-mesmo.blogspot.pt/2013/01/prusa-i3-mais-rhinonest-cera-de.html
In case you didn't save your junky old electronics from the 80's you can still find an old cassette player on Amazon for dirt cheap... <br><a href="http://amzn.to/TxyvKx" rel="nofollow">Cassette Player on Amazon</a>
Could you add some information in the initial step explaining what MOD is and why a portable player is desireable?
Thank you for sharing your point of view. <br>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. <br>I'll add a brief description with links to further resources. <br>Thanks again.

About This Instructable


62 favorites


More by Mr.Holub: Portable native MOD player based on Raspberry PI (plays MOD,S3M,IT,XM etc...). Uses BassPlay library.
Add instructable to: