IntroductionImagine you wanted access to your entire music collection all over the house and on multiple devices.
For instance, you are sitting in the kitchen and you decide to listen to some rock music whilst washing up. Meanwhile upstairs your daughter wants to practice becoming an XFactor star to her favourite tunes.
Traditionally each person would have their own media player with the songs stored on it.
If you wanted to listen to songs on your laptop and you wanted to listen to the same songs on your tablet you would need to have them stored in both places.
In this guide I am going to introduce the concept of a DAAP server. (Digital Audio Access Protocol). The basic idea is that your music is stored in one place called the DAAP server. You can connect from DAAP clients and play the songs from the DAAP server.
DAAP servers can be created using Windows, Linux or OSX but the Raspberry PI lends itself perfectly to this task.
The Raspberry PI is small and can be placed anywhere unlike a desktop computer. You don't want to use a laptop as a server either because
You can follow this guide if you are using a standard computer running Linux but this article was written with the Raspberry PI in mind.
Connect To The Raspberry PIIf you are using Windows you will need a terminal program capable of connecting to the Raspberry PI via SSH.
If you are using Linux open up a terminal and type the following:
You will need to replace the x with the relevant number which represents your Raspberry PI.
When asked, enter the password for the pi user.
Install TangerineAfter you have connected to the Raspberry PI run the following command:
sudo apt-get install tangerine
Create .tangerine configuration fileType "cd ~" to navigate to the /home/pi folder and enter the following command:
sudo nano .tangerine
Enter the following text into the window that opens:
name = <enter a descriptive name>
password_file = /home/pi/.tangerine-passwd
debug = false
max_users = <enter the maximum number of users to connect>
log_file = /home/pi/.tangerine-log
port = 0
publish = True
plugins = file,session
Press CTRL and O to save the file and then CTRL and X to exit nano.
The name is just a descriptive name which will help you find the server from a DAAP client.
The password file is a file that contains the password required to connect to the server. A password isn't mandatory and you can omit this line if you want to.
The max_users is the maximum number of users that you want to connect at one time.
The directories is the path to the music files to publish for clients to find. This is where you will need to copy your music to.
If you have specified a passwd file then you must create it. To do so type the following:
sudo nano /home/pi/.tangerine-passwd
Enter the password you wish to use in the file and press CTRL and O to save and CTRL and X to exit.
Start TangerineTo start tangerine enter the following command:
nohup tangerine &
You can now exit the ssh session.
Connecting from an Android phone/tabletYou can connect to the DAAP server using an Android phone or tablet by installing the application "Music Pump". There are free applications out there but Music Pump has a really nice user interface.
Music Pump has options to reconnect, change DAAP server, play local files and settings.
The first thing you will want to do is connect to a DAAP server and you can do this by clicking "change DAAP server".
If there are any DAAP servers available they will appear in the "Active DAAP servers" list. If you have previously connected to a server it will appear as a "cached server".
There are little green arrows next to the cached servers that are currently available.
If the server you want to connect to doesn't appear you can click the little plus symbol in the top corner and enter the IP address to your Raspberry PI in the box provided. You will also need to enter the password if you specified one. Press save and then connect. If you can't connect to the server it isn't running properly. Also make sure your phone and tablet are connected to the same wireless network as the Raspberry PI.
Other Ways To Connect To A DAAP ServerIf you are running Linux you can use Rhythmbox, Banshee or Amarok to connect to a DAAP server.
iPods and iPads can use the simple DAAP client (remember iTunes can act as a DAAP server as well).
There are dozens of DAAP clients for Windows.
How To Get Your Music Onto The Raspberry PIThe easiest way to store your music on the Raspberry PI is to use an SD card that is of a decent size in the first place.
I currently have about 20 gigabytes worth of music and so I use a 32 gigabyte SD card. I store all of my audio files on the SD card in the /home/pi/Music folder.
To get the music into that folder I plugged a USB drive into one of the USB ports on the Raspberry PI and copied the files across using the file manager within Raspbian.
This is obviously the simplest way to copy files across.
You could if you wanted install vsftpd and set up the Raspberry PI as an FTP server in order to copy the files across. If you have physical access to the Raspberry PI I don't see why you would do this over simply copying them onto a USB drive and copying from the USB drive to the Raspberry PI's SD card.
Talking of the SD card, if you have loads of music then you might want to just use a big USB drive and set the folder within the tangerine configuration file to point to the USB drive or you could use SAMBA to connect the Raspberry PI to a NAS drive to provide access to incredibly large music collections.
SummaryI have been using this method for distributing music to all of my devices for a while now and because the Raspberry PI and Linux is extremely stable it hardly ever needs to be rebooted.
I access all of my music from my phone, tablet, chromebook and other devices.
Thankyou for reading.