Alright, so most of my friends already know, I’ve recieved one of my Raspberry Pi computers!

w00t!

So being my old love is streaming radio, I figured why not get this little guy pushing out some tunes for me!

MPD To the rescue!

Now I did a post for Ubuntu 10.04 a while ago where I had custom compiled a .deb file that included mp3 support, however the new version of MPD for the pi has it already built in! Double sweet!

So here’s how to get it started.

First install a few apps. I personally prefer ncmpcpp as my local client to control my MPD stream from the cli. And of course you’ll need to install MPD.

 

Type in “Y” when it asks if you would like to install the dependencies as well, let it run and install your requested apps.

Shucks, you’re already half way done!

Now you just need to configure your server (mpd) and client (ncmpcpp) to cut down on overhead I’ll just be using the built in httpd stream as well as the alsa mixer, however the config files are much more built out with better examples then they had on my last post, so configuring them should be quite simple these days.

In order to get MPD working as your local user “pi” in this case, we’ll first need to create some directories and files. Enter in the following commands one at a time from the pi user’s home directory.

That will create the “state” and “pid” file in your .mpd folder and the “cache” and “sticker.sql” files in your .mpd/db folder.

Now let’s backup the original mpd.conf file and then edit the original file.

You can copy it straight up if you like, as your username is most likely “pi” as well. I’ve set my default music folder to “/home/pi/Music” and Playlists to “/home/pi/Playlists” if you don’t have these directories either, go ahead and make them with the mkdir command, I’ll wait.

Alright, here’s my /etc/mpd.conf file (click it to expand, it’s kinda long):

I went and left all of the default comments in there, but of course if you want to make it more readable feel free to remove what you don’t use.

So, yea. MPD’s ready. Just restart it.

Now let’s get our client up and running so we can start playing some music!

This one’s a little more tricky as the default config file is hiding and compressed.

First let’s create the local config directory like we did for MPD.

and let’s copy the example config over to our new directory.

and then extract it.

Now go ahead and edit that file.

Again, these are the settings I used, but it’s well documented so feel free to make changes as well. Here is my config for ncmpcpp (again, click it to expand it, it’s even longer…)

So yea. That’s it! You should be up and running!

Start ncmpcpp in a tty with the logical command of “ncmpcpp” This will open the client app and allow you to start playing music! Being it’s a command line app, most of the work is done with keyboard commands. Press the number “1″ on your keyboard (NOT on the 10key if you have one to the right of your normal keyboard but the numbers above the qwerty row) and you will be shown a VERY long list of keyboard commands to control ncmpcpp, however the arrow and space and enter key’s will get you through most of it easily.

Plug it in to your amplifier, or better yet, grab your android phone and grab the free app called “MPDroid” it’s the best app I’ve found to interface with MPD. Now you can control your music from your phone, and get a stream of it sent TO your phone as well! No wires needed! (however it will be significantly buffered, so be patient when you first choose to start your stream)

Not too bad right!

Enjoy and if you have any questions, feel free to post a comment, here or in our forums, or even in my IRC hangout at italktomachines.com !