Instructables

Linux command line audio.

Step 4: MPD.

Picture of MPD.
Can control music on a remote machine.  Use this for botht he nexus 7 and other computers around the network. allows on computer to be a sort of stereo.

Love MPD. It is both a music player and an internet radio player. You can install this on a really old machine or a new arm based linux device. Just add an amp and  speakers and you have a new age stereo that can be controlled remotely..
Make your directories where you want your music to be and then copy them there if they are not already there. Now to inbstall the basic software. You have the program itself (mpd)and a command line player to test it.(mpc)

$sudo apt-get install mpd mpc.

Sure sure your stero and or speakers are attached to the sound card and they work. Now to test it. We will do it with a radio station if you do not have any music to t4est with.

$ mpc add http://relay3.slayradio.org:8000/
adding: http://relay3.slayradio.org:8000/

$ mpc play
You should hear the radio station out of your speakers now.

Now let’s edit the config file for file location and to allow the server to be accesed from other systems. Warning this is not secure, as your better off sshing into the machine to control it.

$ sudo vim /etc/mpd.con
Change the directory where you files are (uncomment  the line also
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon’s online database. This
# setting defaults to the XDG directory, otherwise the music directory will be
# be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol.
#
# music_directory               “/var/lib/mpd/music”

If you want to access the machine remotely you will need to change the hostname to the nmae of the michine, Warning: people will be albe to telnet into the machine unless you password protect the system.
#
# This setting sets the address for the daemon to listen on. Careful attention
# should be paid if this is assigned to anything other then the default, any.
# This setting can deny access to control of the daemon. Choose any if you want
# to have mpd listen on every address
#
# For network
# bind_to_address               “localhost”

Permissions:

# Permissions #################################################################
#
# If this setting is set, MPD will require password authorization. The password
# can setting can be specified multiple times for different password profiles.
#
#password                        “password@read,add,control,admin”
#
# This setting specifies the permissions a user has who has not yet logged in.
#
#default_permissions             “read,add,control,admin”
#
###############################################################################

There are other settings, but I will let you check that out your selves..

Now to access the system form other machines. There is a client for about every system known to man. You can check them out yourself at:

 

http://mpd.wikia.com/wiki/Clients

To ad a radio station, you most likely yhave to an a url.

 
Remove these adsRemove these ads by Signing Up