Easy Player [ep.jpg] EASY MUSIC PLAYER
I made this as an elderly family member lost the ability to operate their
CD-Player, and lost access to all their music.
It's just a music player that is very easy to use.

A traditional approach to the problem might use touchscreen and/or a few large
buttons/knobs.
My approach employs nothing but an RFID card reader and a stack of cards with
printed song-titles and pictures on them.
Touchscreens are not intrinsically easy to use; They require fine motor skill,
interfaces lack tactile feedback, GUI elements are abstractions, and screens in
general are unable to display all available (or required) information, and must
make use of scrolling or paging which is another abstract concept (basically:
"There are more things you cannot see but must know are there and must act
correctly to show.")
Anyway, screens are not easy. Buttons are easier, but they must employ textual
descriptions of abstract functionality or even worse, icons such as
play/pause/stop/next/previous, I know people even of my own age who are
struggling with these concepts.
So, what I've done is do away with all of that, and make an always-on device
with no knobs (the "administrator" sets the volume), and the ability to play a
single song of users choice.
Playback can not be stopped, but it is generally not required. Playback can be
interrupted if another song is desired.

Instructions:
"Take the song you want to listen to, and place it on the music player."

DEMONSTRATION VIDEO
Demonstration video on youtube.com [https://youtu.be/kOa5DfmLb-Q]

BUILDING IT
If you build one, have questions or improve on the idea, drop me a message :)

STEPS
1. Prepare the hardware
2. Download and configure the easyplayer software
3. Install and configure linux on the raspberry pi
4. Transfer the easyplayer software to the rapsberry pi

REQUIREMENTS
* Raspberry pi + sd-card (any pi with audio-out and usb will do)
* Chassis (I used an old DVD-Player as it had a high-quality 5 volt
  power-supply)
* RFID-Card reader (The kind that reads serial-numbers and types them like if
  it's a keyboard)
* Simple RFID cards (they don't need data-storage, just unique serial-numbers
  are fine)
* A set of speakers with amplifier (like those used for computers)
* Working knowledge of Linux
* Workstation/SD-Card reader/Internet
* Some music

PUTTING TOGETHER THE HARDWARE
Picture of Raspberry Pi 1 in a DVD case [rpi1s.jpg] [rpi1l.jpg]Put your PI in a
case, attach power, rfid-card reader and speakers, you're done..
Sorry, but that's about it, you could buy a USB power supply and a plastic case
on E-Bay and it'd be just fine.

1. PREPARE THE RFID CARDS
Find out which songs you want to have selectable via cards, make some artwork
for them.
I found pictures of the musicians and used as background, then added text.
Picture of the RFID card art ready for printing [cardss.jpg] [cards.jpg]
I printed out the artwork in 2 copies (one for each side) and glued them to the
RFID cards, even a single-side card printer is crazy expensive.


2. PREPARING THE EASY-PLAYER SOFTWARE
Only a few steps are required to prepare the software.
I'm preparing it from my workstation, and will transfer it to the pi as the last
thing in this guide (step 4).

1. Acquire EasyPlayer script
2. Acquire music
3. Generate database
4. Code cards to songs

Download and extract easyplayer.tar.bz2 [easyplayer.tar.bz2] 678 Bytes
(SHA256:376f992f6f2ab8fc7569a692e5bfcc20adc1b4e7a4ee97862544c0aa2702ecab).

easyplayer/
├── db.json
├── music
└── player.sh

Put your music in the easyplayer/music/ directory (it's no problem to have
subdirectories, but avoid " characters in directory/file names)
Asunder [http://littlesvr.ca/asunder/] is a great CD-ripper.
Generate the database, this is easily done with a one-liner (required awk, sed,
cut and jq installed) from within the music directory:
echo "{$(find . -iname '*.mp3' | cut -c3- | awk '{ printf
"\"%d\":\"%s\",\n",NR,$0 }'| sed '$ s/.$//')}" | jq . > ../db.json

Now you have a JSON file where each KEY is the line number, and the VALUE is the
filename of the song.
Open the json file in your favorite editor and connect your RFID card reader to
your workstation.
For each of your prepared rfid cards, remove the key for the corrosponding file
and scan the card, so that the scanner inputs the id number.

Abbreviated example db.json
{"1":"./mics - Tyske schlager hits 2 cd1/20 - Roberto Blanco - Ein Bisschen
spass muss sein.mp3",
"23208196":"./mics - Tyske schlager hits 2 cd1/18 - Freddy Breck - Überall auf
der welt.mp3",
"11":"./mics - Tyske schlager hits 2 cd1/12 - Bernd Clüver - Der junge mit der
mundharmonika.mp3",
"44":"./Gustav Winckler - Hans Største Hits - CD 1/Gustav Winckler - Hans
Største Hits - CD 1.mp3.m3u",
"13220228":"./Gustav Winckler - Hans Største Hits - CD 1/03 - Gustav Winckler -
Den Mørke Landevej.mp3",
"46":"./Gustav Winckler - Hans Største Hits - CD 1/14 - Gustav Winckler - Ingen
Bryder Livets Cirkel.mp3",
"18428164":"./Hansi Hinterseer - Mine Favoritter (Ude Og Hjemme)/03 - Hansi
Hinterseer - Hey Baby Tanz Mit Mir.mp3",
"245":"./André Rieu - Live!/08 - André Rieu - Cielito Linda.mp3"}I ripped a few
CD's (that this person legally own), and added all the music to the device and
the database,
it allows me to prepare additional cards and an updated database in the future
and upgrade it in a few minutes on-site.

3. INSTALL LINUX ON THE PI
After installing the linux image [https://archlinuxarm.org/], install alsa-utils
and update /boot/config.txt
[https://wiki.archlinux.org/index.php/Raspberry_Pi#Audio].
Then create a user
[https://wiki.archlinux.org/index.php/users_and_groups#Example_adding_a_user]
called "player" and configure it to automatic login to console
[https://wiki.archlinux.org/index.php/automatic_login_to_virtual_console].
Install the required software: alsa-utils, mpg123 and jq
pacman -S alsa-utils mpg123 jq

4. TRANSFER EASYPLAYER TO THE PI
Mount your PI sd cards root partition under /mnt/
Copy everything from inside the "easyplayer" folder to the "player" users home
directory ( cp -r easyplayer/* /mnt/home/player/ )
Add "./player.sh" (without the quotes) as the last line of "player" users
bashrc. ( echo ./player.sh >> /mnt/home/player/.bashrc )



--------------------------------------------------------------------------------

Last edited: 2016-07-24 - No need for a disclaimer, I've done nothing wrong!

<‐ Back [/]