It took me almost a year to complete my current project. Some months ago I started a project to create a Jukebox for myself capable of playing my mp3’s. Today mp3 jukeboxes are a dime a dozen but I wanted one that would mimic a 1950’s jukebox employing
a mechanical controls (of a type) and be coin operable. Initially I tried using two readily available programs DWJukkebox and Arcade Jukebox 8 (AJ8). I ultimately tried Arcade Jukebox 8 –I could not get DW Jukebox working with a coin machine– but with the development of AJ8 closed some years ago and no documentation I was limited to customizing it with external programs like AutoHotKey in the Windows OS environment.
Last summer I decided to write my own Jukebox –with the features I wanted– from scratch using Python. I chose Python because I was told it was easy to learn and it’s cross platform. I did the initial development on Windows and placed a fully functioning Windows OS Convergence Jukebox beta version in the field within the last two weeks. Convergence Jukebox 1.0 contains the following features.
- No limit to the number of MP3’s in its library.
- Display of 16 songs on each Jukebox screen featuring both title and artist. The GUI was created using TK.
- Clear indication of current song title/artist at the top of the Jukebox Display
- Ability to search song selection by Artist or Title.
- Ability to jump between letters of the alphabet during song search
- A side status screen that displays sort mode, information on song playing (title, artist, year released, song length and album/release information), up to 18 upcoming song selections, credits, cost barker line and number of songs available on the jukebox.
- Integration with a Weavefuture Coin Acceptor AK5 System via a Weavefuture USB Jukebox Interface Board
- An X-keys® XK-24 Programmable Keypad to operate the Jukebox
- A log that monitors and records when the Jukebox is turned on, the playing random, skipped and user selected songs.
- Remote maintenance access employing LogMeIn.
Today I managed to complete the initial port of the python software to my Raspberry Pi. It only took me about four hours total to configure the code for the Pi version. Primarily it involved changing the code slightly to accommodate the mpg321 mp3 player and changing the filepaths between the Windows OS and Raspian Wheezy OS.
Here is how the initial port looks on the Raspberry Pi;
The Raspberry Pi Tkinter GUI (shown above) had no problem duplicating the look and feel of the Python code developed on a Windows 7 PC.
how the Programmable Keypad Interface Design for the X-keys® XK-24 Programmable Keypad; to the Windows OS Jukebox looks;
OK. Here is my recipe for working with Python on my Raspberry Pi and ensuring proper set-up with a USB soundcard.
1. First follow my previous blog post Back In The Raspberry Pi Business Today. Starting To Port My Python Based Jukebox To Wheezy to set up a remote desktop.
2. Install WinSCP on windows machine for file transfers and Putty to the Pi. http://winscp.net/
3. Using WinSCP create a python folder in the /home/pi directory. This is where python projects go.
4. Using WinSCP create a folder (my current project) in the /home/pi/python directory. This will be the folder for my current project.
5. Install pip. https://pypi.python.org/pypi/pip
6. Install idlex. sudo pip install idlex http://sourceforge.net/projects/idlex/
7. Install mpg321. sudo apt-get install mpg321 http://mpg321.sourceforge.net/
8. Install hsaudiotag sudo pip install hsaudiotag. https://pypi.python.org/pypi/hsaudiotag
9. Install Python Imaging Library. sudo apt-get install python-imaging http://www.pythonware.com/products/pil/
10. sudo apt-get install python-imaging-tk. sudo apt-get install python-imaging-tk http://www.raspberrypi.org/phpBB3/viewtopic.php?t=7758&p=94280
11. Setup the USB soundcard by following instructions at http://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions Start at Updating alsa options on that page.