Friday, May 2, 2014

Set up a cheap wireless server for your song collection.

 http://archive.makezine.com/13/upload_musicsystem/

WINDOWS

Recycle Your Old Computer into a Jukebox

Like many before me, I had spent hours and hours ripping all of my CD
collection to my computer. If I could just plug my computer into my
receiver, then I could hear the music all over the house. Unfortunately,
that would also mean listening to YouTube video sounds all over the
house. Since I couldn't stand that, I figured out a way to dedicate an
old computer as my music server and make it do dual duty as a web
server, so that I could access it via a wi-fi connection from my laptop.
This way, I can see my music library as if it's on a web page, and
click the song I want to hear. Now when I have a party, my friends and I
can build a playlist of songs to set the mood, and I can even save
those playlists for later. Additionally, I was not finding any system
for doing this within my price range: under $50. Using mostly on-hand
stuff and free software downloaded from the internet, the price point
was easily achieved. The only things I had to buy were a nice long audio
cable and an adapter to connect it to my Intranet Music Control System.



1. DESIGNATE SERVER PC

I happened to have a very old Packard Bell PC, which I retired from
being my home desktop. To play music and serve a web page, you don't
need much computing power. Hopefully you already have a PC, which you
can use. You can use your everyday desktop for this and it won't really
add any load. The only drawback to using the same computer you surf on
is that the sound of those YouTube videos will go out the same sound
card that will be connected to your home stereo system, which could be
an odd experience. If you have only one computer, you could install a
second sound card that would play the music over your house speakers,
and then have one reserved for your local speakers.
For this, we will assume one Windows XP computer with all updates
applied from Microsoft update to be dedicated as the server. We will
also assume you have a desktop PC with your music living on it, and that
you have a home network already in place. Having a wireless home
network really adds a great dimension to this project.





2. CONNECT AUDIO

I wanted my server-player to live in the basement, well away from my stereo receiver, which is in my living room, so I went to RadioShack and got myself a long audio cable. They have a 20-footer
for $15. It has RCA connectors on both ends, but my PC needs a stereo
headphone jack to connect speakers to it. I happened to have one on
hand, but you can get one at RadioShack while you are picking up your cable.



On the back of your server-player, you will see your sound card
connections. Generally the green one is the speaker out connection; it
usually has an icon with an arrow pointing away from (out) the plughole,
with radiating sound lines across the arrow. Your server may also have a
headphone jack. Generally, the headphone jack is amplified internally
and the lineout connection is not. If you have trouble with the sound
quality from one, try the other. I have had good luck with both.



Just plug the other end of the cable into your stereo receiver. It's a
good idea to label the front of the receiver to indicate which selector
to choose in order to listen to the music from your server-player. I
attached mine to the Tape-2 input RCA jacks on my receiver, and then put
a piece of tape next to the Tape-2 button on the front. This way my
kids can listen to Abba anytime they want without wondering which button
to select.





3. SET STATIC IP ADDRESSES

Since you will need to put an address into your browser to get to the
controls of you new music player-server, you don't want that address to
change. This means you will need to set a static IP address on your
server. Also, in order for the server to always be able to connect to
your shared music, you will need to set a static IP address on your
desktop with the music files as well. Since neither computer will ever
leave your network, this will not cause any problems.
Choose IP addresses that you can remember. For this project, use
192.168.0.10 for the server-player and 192.168.0.15 for your music
sharing desktop PC. I sometimes find that it is helpful to make little
labels on your computers with their IP addresses noted for future
reference.



The properties of your "Local Area Connection," which you find in the
network section of the control panel, contains the IP settings. Click
Start, choose control panel, double-click on Network Connections, and
that opens up the window containing a list of network connections.
Right-click on the connection that is plugged into your home network and
choose Properties. Select the Internet Protocol (TCP/IP) and then click
the Properties button. This brings up the dialog where you choose to
have a static IP address; set it and also choose to set the DNS servers
manually.



Click the radio button marked "Use the following IP address:" and
fill in the following information with details to match your network:

IP address: 192.168.0.10

Subnet mask: 255.255.255.0

Default gateway: 192.168.0.1



Then choose the radio button marked "Use the following DNS server addresses:"
and fill in:

Preferred DNS Server: 192.168.0.1

Alternate DNS Server: 208.678.202.202



A brief overview of DNS might be in order. DNS stands for "Domain
Name System". While computers require IP addresses to determine the
locations of other computers, humans require names. For example, in our
home network you will be able to remember that 192.168.0.10 is your
music server. You would not want to remember the numbers for google.com,
yahoo.com, makezine.com or cnn.com. We humans can much better remember
names, and DNS allows for mapping or translating names to the numbers
that our computer overlords require. To get your DNS action, just set
your DNS server address to your gateway's IP address. That is the
address of the computer through which all your internet connections go.
Usually your DSL modem or your cable router is able to service DNS
naming requests; in most home networks, that is 192.168.0.1. I like to
use "opendns", which is a very nice, free DNS service that works anywhere.



Click OK and then OK again to save your changes and reset your IP
address. Make sure you can still reach a web page to test that you set
everything correctly and that your network connection is still active.





4. CONNECT TO YOUR MUSIC LIBRARY

You already have your music ripped and presumably use Songbird
or it's equivalent to play it. Let's leave the music where it is. We
can just share it out to the network, and the server player can pick it
up from wherever it's already living.



The easiest way is to find the folder that contains it all and share
that. Let's imagine yours is in your "My Music" folder. If your username
is Bob, then your "My Music" folder lives at this address on your hard
drive:

"C:\Documents and Settings\Bob\My Music"



Open up Windows Explorer by right-clicking on "My Computer" and
choosing "Explore" (keyboard shortcut: If your keyboard has a Windows
key, hold that down and press the letter "e" to open Windows Explorer).
Navigate to the above-mentioned folder and right-click on it. Choose
Properties and then click on the Sharing tab. Check the box called
"Share this folder on the network" and put a Share name in the field
there with no spaces. I prefer to call mine "music".



If you have not already enabled sharing on your computer, you will
get prompted to read more about sharing and security. For now, just
click where it says that you know about the risks, and want to go ahead
and share this folder.
Next, you will need to tell the player-server where the music is.
Assuming you set your music-sharing PC with an IP address of
192.168.0.15, open a command prompt on the player-server and issue this
command:

>net use M: \\192.168.0.15\music



You should get:

The command completed successfully



That command will map the letter M:\ as a drive on the server-player
system (M for Music, right?). Then you can set that as your music
library on your server's music-playing software, and it will actually be
pulling the music from your desktop music repository. Being able to do
this kind of thing is what makes computer networks really useful.



5. TURN OFF WINDOWS SYSTEM NOISES

Since you are going to connect your house's speakers to your windows
computer, you will probably not want to hear every bonk and click that
happens when Windows wants you to know something, and I have grown tired
of that little tune it plays when it boots up. So open up the Windows
control panel and click on the "sounds and audio devices" icon. Choose
the "sounds" tab and change the sound scheme from whatever it is set on
to "no sounds".




6. INSTALL AND CONFIGURE PLAYER AND WEB CONTROL CENTER SOFTWARE

Winamp is a very nice, free,
full-featured media player. It has a large user community and one
generous member of that community has created a plugin for us to use
called "AjaxAMP".



Here is what you need to do:

Download and install Winamp and AjaxAMP.

During install, Winamp wants to install some "extras". These we do not
need, so unselect the Winamp toolbar, free extras, and free music.

After installing Winamp, run it. It will prompt you to add music the
first time you run it. Click "Don't show this again" and click the
Cancel button. Close Winamp.

Install AjaxAMP and then open Winamp again, then click options > AjaxAMP preferences:



  • Change the server port to 80
  • Click Library and then Add Directory to choose the M:\ drive that we connected earlier.
In order to have Winamp start every time the computer boots, some
trickery is required. Since Winamp won't behave when run as a service,
you must enable auto logon for your user and also put a shortcut to
Winamp in your startup folder.
Enable automatic logons by following these instructions from this page:
http://windowsxp.mvps.org/Autologon.htm Click Start, Run, and type CONTROL USERPASSWORDS2,
then click OK. Select the user account from the list (the account to
which you want to automatically logon). Uncheck "Users must enter a user
name and password to use this computer" option, and click OK. Type the
user account password and complete the process.



For Windows XP Home, don't try to auto-login as the built-in administrator because you'll receive an error message.
Put a shortcut to Winamp into your startup folder like this:
Open Windows Explorer, and navigate to the Winamp program folder, which by default is in C:\Program Files\Winamp. Right-click on winamp.exe and choose create shortcut. Right-click on the new shortcut and choose cut. Navigate to your startup folder, which is located at C:\Documents and settings\Bob\Start Menu\Programs\Startup (where Bob is your username) and right-click in that folder and choose paste.



This procedure will make the system automatically login using your
username and password, and launch Winamp without requiring any
interaction from you.



Autologon can be a security vulnerability because if someone sits in
front of your player-server, they will be logged in as you without
having to know your password. To mitigate this issue, run your
player-server "headless," which means unplug the keyboard, mouse, and
monitor. Most computers from the last few years or so are able to handle
this configuration. You may hear a series of beeps upon boot, which is
the BIOS saying that there is no keyboard connected. An additional level
of security that you should add is to turn on the screen saver. Choose
one like the blank, which is not too processor-heavy, and check the box
which says on resume, password protect, and you will have locked your console from curious visitors.







7. ENABLE REMOTE ADMINISTRATION

You will want to connect to your server-player from time to time.
Things like Windows updates, troubleshooting, and general hacking will
be desirable. You have 2 choices: Remote Desktop or VNC. Unfortunately
Microsoft decided that in Windows XP if you are logged in via remote
desktop, you cannot be trusted to reboot your PC, and so removed the
option from the start menu. Thanks, Bill.



Because of that you should use VNC.
UltraVNC is a powerful, easy-to-use, and free software that can display
the screen of another computer (via internet or network) on your own
screen. The program allows you to use your mouse and keyboard to control
the other PC remotely. It means that you can work on a remote computer
as if you were sitting in front of it, right from your current location.
That is just what we want.
Download the installer from here:
http://www.uvnc.com/download/index.html
http://prdownloads.sourceforge.net/ultravnc/UltraVNC-102-Setup.exe?download
Download the same installer to both your server-player and your desktop PCs.



Server-player install notes:

When you get to the select additional tasks part, choose


  • Register UltraVNC server as a service
  • Start or restart UltraVNC service
  • Configure Admin properties
The Default properties window will come up at the end. The only thing
you need to do there is set a password in the VNC password box.

The same package contains both the server and the viewer. You need
the server on your server (duh), and the viewer is what you use to see
the desktop on the server. During the installation on your desktop PC,
just accept all of the defaults. Once installed, open the client on your
desktop PC. It is in Start > All Programs > UltraVNC > UltraVNC Viewer. Put your server-player's IP address in the Server Address field and click connect.
You will be prompted for the password, and once you enter that, you
will be shown your server's desktop. To click Ctrl+Alt+Del, you will
need to click on the little CAD icon in the upper left end of the menu bar.




8. CONFIRM FUNCTION

Go to your wi-fi-enabled laptop on your home network and open a web
browser. Enter the server-player's IP address into the address bar like
this: http://192.168.0.10
If all went as planned, you should see the AjaxAMP web page with the
controls and the playlist on the left hand side of the screen, and your
library on the right side. Choose a song and click play to get music to
flow from your stereo receiver's speakers.

No comments:

Post a Comment