This is only a preview of the October 2001 issue of Silicon Chip. You can view 30 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "Build Your Own MP3 Jukebox; Pt.2":
Items relevant to "Super-Sensitive Body Detector":
Items relevant to "An Automotive Thermometer":
Items relevant to "Programming Adapter For Atmel Microcontrollers":
|
MP3
Jukebox
Build your own
Part 2:
By PETER SMITH
Play all your
favourite music
by remote control
26 Silicon Chip
www.siliconchip.com.au
In last month’s issue, we described the
hardware part of our MP3 Player. This
month, we show you how to program
the microcontroller. And because we’d
hate to you keep you in suspense, below
you’ll find details on how to install and
set up the software that links the
hardware to Winamp, our chosen MP3
music player.
A
FTER READING our articles
on the MP3 music format last
month, you’ve probably converted all your CDs to this convenient,
space-efficient format, stored carefully
away on that new big-GB hard drive
ready for the Jukebox – right?
So let’s find out how to put them
to use!
The basic idea behind this project
is to enable you to control an MP3
music player (Winamp) running on a
Windows PC with a standard infrared
remote. Up until now, you’ve probably
only ever listened to your MP3s while
sitting in front of your computer. But
imagine for a moment that your PC is
actually a jukebox and that you can
control it from anywhere in the room
just like you do right now with your
stereo system!
In keeping with the jukebox theme,
we’ve included features like track
shuffle and repeat, multiple playlist
support and a liquid crystal display for
vital track information. And if you’re
a budding DJ, Winamp can be set up
for track cross-fading and other great
effects – but more on that later.
The IR Remote Receiver & LCD hardware described last month mounts up
front in an empty 51/4-inch drive bay
in your PC’s case. As it attaches to one
of the snap-in drive blanking plates,
no modifications to your PC case are
required. If you want to remove it at
some time in the future, all you need
is a spare blanking plate.
With only two plug-in connections,
hooking up the hardware couldn’t be
easier. Power is sourced directly from
the PC’s power supply via a disk drive
connector and serial data is exchanged
via a free serial port. To keep the serial
cable hidden, it is routed through the
case internals, exiting via any unused
expansion slot hole at the rear. It then
plugs into one of the standard 9-pin
serial port connectors.
On the software side, you need a
copy of our “IR Remote Control for
Winamp” program, which we describe
in detail below, as well as the current
version of Winamp.
PC requirements
The minimum PC hardware specifications we recommend are a P133
processor (or equivalent) with 32MB
of RAM. To do audio track ripping on
the same machine, you’ll need a faster
processor, say about a P233, and more
memory.
If you intend playing MP3s directly
from CD, you’ll also need a fast CDROM drive. We’ve found that “real”
CD-ROM drive speed varies from
model to model, so it’s difficult to
predict what will work OK on your
machine. A drive that’s not up to the
job will cause short pauses during
play, which can be quite annoying.
Storing your MP3 files on a hard drive
is the preferred option. Tracks typically consume about 3.5MB of disk
space each, so start saving for a big
drive if you have a large music collection!
Naturally, you’ll also need a sound
card and amplified speakers. For reasonable sound at a good price, check
out the Logitech Soundman or Cambridge range of PC speakers or even
better, hook up to your stereo system
or ghetto blaster! Note that the sound
card should be a PCI bus type (as most
will be), not one of the old ISA bus
variety. We used a SoundBlaster Live
for all of our tests.
Pentium gobbler
If you’ve used Winamp before, then
Repeated from last month, this photo shows the IR Remote Receiver & Display unit for our MP3 Player. It clips into one of
the PC’s drive-bay positions, as shown in the photo on the facing page, and is connected to a spare serial port. Check out
last month’s issue for all the construction details.
www.siliconchip.com.au
October 2001 27
Fig.1: MP3 files loaded into
Winamp’s playlist that don’t
include ID3 tags are listed by
filename, as shown here.
Fig.2: Winamp displays the artist
and track information once the
tags have been created.
you might have discovered some of
the amazing visual effects (called
Visualizations) that it provides. If you
want to run any of these (especially in
full-screen mode), then forget that old
Pentium. You’ll need a recent machine
with a fast AGP graphics card to even
get off the ground!
The Jukebox software has been
tested on Windows 95, 98 and NT4. It
Fig.3: Winamp’s ID3 tag editor. Both ID3v1 and ID3v2
formats are supported but only ID3v1 is used by the Jukebox.
should also run on Windows Me but
we haven’t tried it.
Installing Winamp
The first task is to download and
install Winamp. Point your browser
to www.winamp.com to obtain your
copy. On the download page, you’ll
see that you have a choice of three
different flavours of Winamp; “Full”,
Fig.4: this diagram
shows the key
assignments we chose
on our BC3000 remote.
Functions shown in
purple (below the line)
are accessed by pressing
the Shift key first.
Unlike the Shift key on
a keyboard, you don’t
actually hold down
the Shift key to get the
alternate function.
“Standard” and “Lite”. Any of these
will work with this project but if you
already have Windows Media Player
installed and wish to continue using it,
then you really don’t need the “Full”
version.
Winamp is often distributed on
“shareware” CDs on magazine covers,
too. Check that you have version 2.73
or later though, as older versions may
not work correctly with our software.
Installing Winamp is quite straightforward. Double-click on the downloaded file to launch the installation
program and follow the on-screen
prompts. In most cases, the default
options will be fine. Once installed,
launch Winamp and verify that you
can load and play a selection of your
MP3 files.
We doubt that you will have too
much trouble driving Winamp but if
you do get stuck, Nullsoft (the creators
of Winamp) have provided excellent
on-line documentation and support
information on their web site at www.
winamp.com
IR remote control for Winamp
The next step is to install the software that links Winamp to our IR
Receiver & LCD hardware. Go to
www.siliconchip.com.au and follow
the link on the home page to the software download section. You’ll find
the project files for this month at the
bottom of the page. All you require
is the single file called “IRRemote
28 Silicon Chip
www.siliconchip.com.au
Control for Winamp”.
Before you begin, close any applications that you have open. Next,
navigate to wherever you saved the
downloaded file and double-click on
it to launch the installation. The first
dialog box to appear prompts for an
installation directory. Click the Next
button to select the default directory
unless you have a specific need to
install the software elsewhere.
After a few moments, you will be
asked if you want IR Remote to load
at startup. Unless you are building a
dedicated Jukebox, you will probably
want to start IR Remote manually, so
click the No button. Once installation
is complete, reboot you PC so that Windows can update all necessary files.
Creating playlists
Before starting IR Remote for the
first time, you need to create at least
one playlist. A playlist is simply a
text file that lists the filenames of all
the MP3 files (tracks) that you wish
to play. Tracks are played in the order
that they appear in the list, unless you
select the track shuffle option, which
we’ll describe a little later.
One playlist file can contain up to
199 tracks. This might sound like a
limitation but it’s not; the software
supports multiple playlists (up to 99),
expanding your listening pleasure to
over 19,000 tracks!
You can create a playlist using a text
editor such as Notepad but unless you
only have a few MP3s, there’s a much
quicker way. Before we tell you about
it, we’d like to make a few suggestions
on how you can keep your MP3 files
in order.
Order, order!
Most MP3 players allow you to
dump all your MP3 files in one directory and then hit the play button. That’s
nice and easy but from our experience,
the list soon becomes so large that you
waste a lot of time searching for your
favourite tracks.
We suggest creating a directory
called “MP3” and inside that directory, create a new directory for each
album. If you download a lot of MP3s
or swap with friends, then the album
idea won’t work, so try storing them in
directories named by time (“Today”,
“This Month”, etc), by preference
(“Hot”, “Favourites”, “Party”) or
perhaps by artist name. You get the
idea?
www.siliconchip.com.au
The IR Remote Control software works with Winamp, the best freeware music
player in the universe (well, that’s our opinion anyway).
Having organised everything logically in this way, you then need to
create a separate playlist for each directory. Most CD audio rippers allow
you to create a playlist and build the
ID3 tag for each file in one operation
(see the article on rippers & encoders
in the September issue). In addition,
it’s a good idea to name each file by
track title for quick identification later.
ID3 tags
As you’ve probably already guessed
from the name, ID3 tags provide identity. The first version of this tagging
system, dubbed ID3v1, defines the
format of a small block of data that
is tacked on to the end of an MP3
file. This data contains descrip
tive
information about its host file, such
as the artist, track title, album name
and so forth.
MP3s downloaded from the Internet
will probably include the tags. However, when you create your own MP3s
you need to generate the tags yourself.
It’s not mandatory that MP3 files have
tags but if they don’t, all you’ll see
when playing them is the filename
rather than the all-important artist and
title information.
Oops!
Last month, we forgot to tell you
about the purpose of trimpot VR1 on
the IR Remote Receiver & LCD PC
board. It adjusts the viewing angle
of the LCD module.
To set it correctly, power up the
board and adjust the pot to achieve
the best character contrast from
your normal viewing position. Note
that if the trimpot is adjusted fully
clockwise, you may not see anything
on the display at all.
If you’ve already “ripped” a stack
of CDs but haven’t created the tags,
there are a number of ways you that
can add them later. As always, the Internet is a good place to start looking
for MP3-related stuff and we found
what seemed like an endless variety of
playlist and tag editor utilities. Some
of the more elaborate solutions even
include databases to make it easier to
keep track of your collection.
Note that most MP3-related software
supports several playlist and ID3 tag
formats. For our Jukebox project, you
should select ‘M3U” as the playlist
type and “ID3v1” as the tag format.
Winamp has a no-frills playlist and
ID3 tag editor built right in, so let’s
look at it next.
Winamp to the rescue
For the purposes of demonstration,
assume that we have six tracks from
an audio CD, named “Track 01.mp3”
through to “Track 06.mp3”.
Start Winamp and open the Playlist
Editor if it’s not already displayed. To
do so, click on the little “wave” symbol
in the top lefthand corner of the main
window. From the menu that appears,
select “Playlist Editor”.
All functions are accessed from
the five buttons along the bottom bar.
When any button is clicked, a pop-up
list with further choices appears. To
begin, clear any tracks already listed
in the Playlist window by clicking on
the REM button, and then clicking on
REM ALL from the list that pops up.
Next, click the ADD button. From
the pop-up list, click ADD DIR. An
“Open Directory” dialog box appears.
Find the directory that contains the
MP3 files in question, click on the
directory name to highlight it and then
click the OK button. All the filenames
October 2001 29
(tracks) now appear in the Playlist
window (see Fig.1).
To edit the ID3 tag for any track,
highlight it in the Playlist window and
click on the MISC button. From the
pop-up list, click FILE INF and then
File info. The ID3 tag editor window
appears, as shown in Fig.3. Click on
the “ID3v1 Tag” checkbox, and com
plete the “Title” and “Artist” fields.
Filling in the other fields is optional,
as they are not used by the Jukebox.
Click on the Update button to save the
changes and then repeat for all tracks
in the list. As each tag is completed,
the new information is reflected in
Winamp’s Playlist window, as shown
in Fig.2.
Note that Winamp includes many
time-saving keyboard shortcuts. For
example, you can open the tag editor
for any track simply by highlighting
it in the list and pressing <Alt>+<3>
(hold down the <Alt> key and press
<3>).
That’s all there is to creating (or editing) the ID3 tags. Creating the playlist
is even easier. Click on the LIST OPTS
button and then the SAVE LIST button
in the pop-up list. The “Save playlist”
dialog box appears. Enter a descriptive
name for the collection and click on
the Save button.
By default, Winamp saves the play
list as type “M3U” and places it in
the same directory as the MP3 files,
which is exactly what we need for
the Jukebox.
Metalists
Yes, we know it’s not a real word
but we’re following in the tradition of
other MP3 players by calling our play
list lists “metalists”. Unlike playlists
that contain lists of MP3 filenames,
metalists contain lists of playlists.
Metalists pro
vide a simple means
of organising your music into small,
easily defined groups.
For example, suppose you have
placed all your albums in sepa
rate
directories, with each directory containing a playlist. You would then
enter the full pathname of each playlist
in the metalist file, which might look
something like this:
D:\MP3\Favourites\Favourites.m3u
D:\MP3\Top of the Pops\Top of the Pops.m3u
D:\MP3\Party Hits\Party.m3u
A metalist is a simple text file that
can be created with any text editor
(such as Notepad). If you have a lot of
playlists and hate typing, you can use
30 Silicon Chip
by function and made accessible via
a series of tabs. Let’s examine each
tab in detail.
Basic settings
You can download lot’s of skins for
Winamp from www.winamp.com Of
course, you don’t need these for the
Jukebox (which can run without a
screen) but they’re lots of fun anyway.
good ‘ol DOS to build the metalist for
you by typing the following line at a
command prompt:
DIR D:\*.M3U /B /S /O-D > D:\MP3\metalist1.txt
Replace the “D” in “D:\*.M3U”
with the drive that contains your
MP3s, and if necessary change the
metalist path to suit your directory
structure. Metalist files can be placed
anywhere (even on CD-ROM); they
doesn’t need to be saved in the same
place as your MP3s. Also, notice how
we’ve used a “.txt” extension for the
metalist filename. This is so we can
easily open it with a text editor for
modification later.
If you have playlists on more than
one drive, you can add another drive’s
lists to the metalist like this:
DIR E:\*.M3U /B /S /O-D >> D:\MP3\metalist1.txt
This adds all lists on the “E:” drive
to the metalist created earlier.
Setting up IR remote control
If you’re still with us, you will have
installed Winamp and the IRRemote
software, organised your MP3s and set
up playlist(s). The final steps towards
a working Jukebox involve setting up
the IRRemote software.
Launch IRRemote from the Start
menu or double-click on the “IR
Remote” shortcut on your desktop.
The first time you run IRRemote, a
dialog box appears with the message
“Click Setup!”.
Clicking on the Setup button opens
the “IR Remote Setup” dialog box (see
Fig.5). Settings are grouped together
The area above the tabs lists a few
basic settings that relate to the operation of the system as a whole. These
settings are initialised with default
values when the software is first
loaded.
The “Enable LCD” option controls
whether or not track data is sent to
the LCD. By disabling this option, you
can run the MP3 Jukebox with the IR
receiver part of the hardware only (ie,
without the LCD module installed).
If you’ve connected the IR Remote
hardware to a serial port other than
COM2, then select the correct port
from the “Com Port” drop-down list.
If you try to select a port that is already
in use by other software, or if the IR
Remote hardware is not connected
to the designated port and powered
on, then an error message will be
displayed.
Using the “Key Timeout” settings
drop-down list, select your preference
for the time the software should wait
between key presses on the remote
before it “times out”. We’ll explain the
purpose of this setting in a little more
detail shortly.
Main tab
As there are considerable differences between remote control models, we
decided to provide a means of manually assigning each key to a particular
function.
The Main settings box lists an array of buttons, each identified by a
particular function name. To program
a particular key on your remote to
perform a listed function, click on the
associated button.
For example, to program the “play”
function, click on the Play button. The
“Program IR Remote Code” dialog box
appears, as shown in Fig.6.
Point your remote at the IR Receiver
and press the button that you want
to use for the “Play” function. The
green circle should flash to red and the
decimal value of the key code should
appear in the “Code” box. Note the Disable button; clicking it simply erases
the programmed code and therefore
disables the indicated function.
So far so good. Now program all of
your remote’s keys for the functions
you intend to use in a similar fashion.
www.siliconchip.com.au
Fig.6: all keys are
programmed via this
window. You can change
you mind as many times
as you like, as every key
press overwrites the last.
The Disable button allows
you to disable a previously
programmed function.
Fig.7: an Explorerstyle window
makes it easy to
navigate to your
playlist or metalist
file.
Fig.5: the first of five tabs in the IR Remote
Setup window. This tab allows you to
program the most-used Jukebox functions.
Fig.8: again, an array of buttons allows assign
ment of functions to keys on your remote.
Grouped on this tab are all the functions that
will allow you to navigate in a metalist.
Fig.9: the least-used functions are assigned
on the Special tab. Note the Shift button,
which is a duplicate of the Shift button on
the Playlist tab.
Fig.10: the last step involves defining the
path to Winamp.
Fig.11: the About tab shows the software
version and gives a plug for SILICON CHIP.
www.siliconchip.com.au
October 2001 31
The choices that you make can be
changed at any time, so feel free to
experiment until you get a layout that
is easy to remember and “feels right”.
Fig.4 shows the assignments we chose
for our BC3000 remote.
By the way, the software doesn’t
check that you have programmed
unique codes for each function. If you
inadvertently use the same code for
two or more functions, then only one
of them will work.
We should also mention that some
remotes have a TV-only mute key –
often called a “punch-through” mute
– that you can’t use with IR Remote.
It always transmits the TV system address, regardless of which equipment
group (mode) you’ve selected.
You may remember from our description of the RC5 remote control
system last month that all key codes
are transmitted with a system address.
This address translates to the currently selected equipment group, or
in other words, the last mode button
you pressed (TV, VCR, CD, etc). IR
Remote saves the address of the first
key that you program as its address,
allowing it to masquerade as any type
of equipment.
If you want to experiment with different remote controls, then you may
need to switch modes, say from “VCR”
to “CD”. To have IR Remote respond
to the new address, all you need to
do is reprogram a single key. During
programming, you will get the message
“System address change detected, save
changes?” Click OK and you will see
the new address appear under “Basic
Settings”.
Playlist tab
We found that after assigning the
most common functions on our remote, we had used all available keys.
We needed more keys! A simple solution was to define one key as a “shift”
key, so that pressing it first means
that the next key takes on a new, or
“shifted” function. This is analogous
to the <Shift> key on a keyboard selecting between upper and lower case
characters.
The Playlist tab includes a button
for programming the <Shift> key (see
Fig.8). The key you decide to use for
the shift function must not be defined
for any other function. On our BC3000
remote, we used the <TV/AV> key.
In use, to execute any of the functions listed on this tab, you need to
32 Silicon Chip
to wherever you saved the playlist
or metalist, click on it to highlight it
and then click the OK button. That’s
it – done!
Fig.12: the only trace you’ll
find of IR Remote after it starts
is an icon in the System Tray.
Fig.13: double-clicking on the
icon in the System Tray brings
up this window. From here you
can close IR Remote, run setup
or just examine the event log.
press the <Shift> key first followed by
the key for the particular function, all
within the key timeout period. If you
don’t press the second key within the
timeout period, then instead of getting
the shifted function, you’ll get the
unshifted function.
The important point is, of course,
that you can assign all of the functions
on this tab to keys that you’ve already
assigned on the Main tab.
So what do these functions do,
exactly? Well, “Load Playlist” allows
you to load a specific playlist number.
Playlists are automatically assigned
numbers according to the position
that they appear in the metalist. In
use, you need to press the <Shift>
key, followed by one (or two) digits,
followed by the key that you assign to
this function.
“Reload Playlist” closes and then
reopens the defined playlist or meta
list. It is intended for cases where the
playlist(s) are on CD-ROM, and you
want to swap the disc without having
to restart the software.
“Next Playlist” and “Prev Playlist”
simply move forward and back in the
metalist.
To complete the settings on this tab,
you need to “tell” the software which
playlist or metalist file to load when it
starts. If you have created a metalist,
then click on the “Metalist” option
button. Alternatively, if you want to
load a single playlist (.m3u) file, then
click on the “Playlist” option button.
Next, click on the Change button to
bring up the “Open Playlist/Metalist
File” dialog box (see Fig.7). Navigate
Special tab
All the least-used functions are
grouped on this tab (see Fig.9). As with
the Playlist tab, the functions on this
tab are “shifted”. The Shift button is
just a duplicate of the Shift button on
the Playlist tab, so if you’ve already
assigned a <Shift> key, there’s no need
to do it again here.
Apart from the “Set Equaliser”
function, which we describe in detail
later, the names of the buttons give
good indication as to what each function might do. As before, assign each
function that you want to use to a key
on your remote.
Winamp tab
Our last stop is the Winamp tab (see
Fig.10). In order for IR Remote to be
able to start Winamp, we need to “tell”
it where to find the Winamp program
(executable).
Click on the Change button and the
“Find Winamp Executable” dialog
appears. Notice how it automatically
opens the C:\Program Files\Winamp
directory, which is the default installation directory.
If you opted to install Winamp elsewhere, then navigate to that directory
now. Select the winamp.exe file in the
displayed list of files and then click
the OK button.
About tab
IR Remote Control for Winamp
was written in Microsoft Visual Basic
Professional V6 and the installer was
scripted with Nullsoft’s NSIS v1.44.
Congratulations! Click on the OK
button at the bottom of the main window to start your Jukebox!
Driving IR Remote
We’ve designed IR Remote so that
it’s virtually hands-free. In normal
operation, it starts and minimises
Winamp (shrinks it to the taskbar) and
then shrinks itself to an icon in the
System Tray (see Fig.12). You don’t
need to use your mouse or keyboard,
or even be able to see your monitor.
If something does go wrong, or you
want to run setup again, just double-click on the IR Remote icon in
the System Tray, and the status dialog
appears (see Fig.13). A small twowww.siliconchip.com.au
FIG.15
FIG.14
FIG.17
FIG.16
Figs.14 - 17: interpreting the LCD readout. The top line scrolls left, displaying the current track number, artist,
title and track length. The bottom line displays status information, except when in equaliser adjustment mode.
line text box at the bottom provides
a glimpse into the internal workings.
Up and down arrows on the right-hand
side allow you to scroll forward and
back in a list of recent events. This
list can be a useful aid in determining
why a particular playlist or track has
failed to load.
It is important to note that when
IR Remote is running, you should
not change any settings in Winamp’s
Main or Playlist windows. Although
it is possible to change a few basic
settings like the volume and equaliser
sliders, clicking on buttons such as
Play or Stop or changing the playlist
will confuse IR Remote and you may
have to restart to recover.
You can safely change plug-in, visualization and skin settings, as well as
the preamp and balance controls (see
“Setting the Equaliser” below).
Another potential problem arises if
you insert an audio CD when IR Remote is running. By default, Winamp
associates itself with audio CDs when
installed, even if you were previously
using an alternate program to perform
this function. Therefore, it automat
www.siliconchip.com.au
ically loads all the CD’s audio tracks
into the playlist and as IR Remote
knows nothing about audio CDs, the
results are unpredictable!
Interpreting the LCD readout
Fingers crossed, you’ll now have a
working Jukebox, so let’s look at how
to interpret the track data shown on
the LCD readout.
When you start IR Remote, it automatically loads the last playlist used
and from that list loads the very first
track. The track number, track title,
artist and track length are all displayed
on the top line.
As we only have 16 characters to
display all this information, the top
line continually scrolls left to make it
Where To Buy A Kit
Kits for the IR Remote Receiver
& Display will be available from
Altronics, 174 Roe St, Perth, WA.
This kit will include the LCD, the
PC board, a programmed microcontroller and all on-board parts.
all visible (see Figs.14 & 15).
When IR Remote loads a track that
does not include a valid ID3v1 tag, it
cannot display title and artist information. Instead, the track’s filename
is displayed.
The bottom line
Reading from left to right, we first
encounter the equaliser status symbol.
This is displayed whenever Winamp’s
equaliser is enabled. Next to this are
the shuffle and repeat indicators.
When track shuffling is enabled, a
small “S” is visible, and when play
list repeat is enabled, a small “R” is
visible.
Moving right along, we find the
status indicator. This indicator displays the traditional Play/Pause/Stop
symbols, as appropriate.
In the middle, we find the track
sample rate. Note that both the track
sample rate and track length (on the
top line) may not be displayed until
after playing begins.
Finally, the right corner displays
either elapsed time in seconds when
playing or paused, or the currently
October 2001 33
Blow your mind
with Winamp’s
full-screen
Visualizations.
You can use the
in-built samples,
download them
or define your
own but you’ll
need a fast PC.
loaded playlist number when stopped
(see Fig.16). If you specified just a
single playlist (.m3u) file during setup
rather than a metalist, then obviously
the playlist number will always read
“01”.
Setting the Equaliser
Winamp includes a cool 10-band
equaliser that can be adjusted with
your remote control. To enter adjustment mode, hit the <Shift> and then
<Set Equaliser> keys on your remote
(assuming you programmed this function during setup). The bottom LCD
line now displays the last selected
equaliser band and a boost/cut value
between +31 and -32 (see Fig.17).
To select a particular band for
adjustment, simply press a digit between 0 and 9, with 0 representing
the lowest band (60Hz) and 9 the
highest (16kHz). By using the <Next>
and <Prev> keys, you can boost or
cut the displayed band as desired. To
exit equaliser adjustment mode, press
<Shift> followed by <Set Equaliser>
again. To hear the results, the equaliser
must be enabled. Use <Shift> followed by <Toggle equaliser> to toggle
it on/off.
If you happen to have Winamp’s
equaliser displayed on-screen when
setting a band, you’ll notice that the
associated slider does not move in
unison. We couldn’t figure out how
to get Winamp to update it’s sliders
in real time but as the Jukebox is designed to be operated without using
the Windows interface, we weren’t too
concerned about this anomaly.
Note that we haven’t provided remote control of Winamp’s preamp or
balance controls but you can set these
34 Silicon Chip
manually in Winamp and they will be
reloaded each time Winamp starts.
Remote control hints & tips
The MP3 Jukebox gives you complete control over your playlist and
track selections. Normally, the order
that tracks appear in the playlist is the
order in which they are played and
playlist editors allow you to sort and
order these as you wish. What about
when the Jukebox is playing, though?
If you know the number of the
track you want, simply punch in its
number. If the selected number is less
than 100, then there will be a short
pause (the key timeout period) before
it is played. Alternatively, follow with
<Play> to play it immediately. If you
want to mix things up a bit, then hit
the <Shuffle> key. This plays all tracks
(that haven’t already been played in
the current pass) in random order.
You can even move forward and back
in the random list.
To hear the same song over again,
hit <Play> just before it ends. To
hear the same playlist over again, hit
<Repeat>. To load another playlist,
press <Shift> followed by the playlist
number. Optionally, follow this with
<Load Playlist> to bypass the key
timeout delay.
You can also use <Shift> followed
by <Next Playlist> or <Prev Playlist>
to skip forward and back in the meta
list.
Problems?
You might find that the Jukebox
seems to ignore the occa
sional key
press. What’s going on? Well, there
are a number of possible explanations.
Firstly, the RC5 remote control sys-
tem used here is not an “error-free”
transmission system. So if the IR
receiver gets only part of a code or
a “distorted” code (caused by reflections or interference from other light
sources), then the code eventually
passed on to the Jukebox could be
unintended.
Secondly, most remotes have “hair
trigger” buttons; one press can sometimes transmit a second (or even
third) unintended keystroke. We’ve
also noticed that the time that a key is
pressed before it automatically repeats
is extremely short, so you almost need
to “stab” a key to get just a single code.
Lastly, when we designed the IR
Remote Receiver we noticed sig
nificant differences between brands
of IR receiver chips. We specified two
alternates in the parts list, one from
Dick Smith Electronics (Z-1955) and
one from Jaycar Electronics (ZD-1952).
We found that the Z-1955 has greater
range than the ZD-1952 but at the
expense of overall accuracy. In use, it
was able to pick up transmissions reflected off the ceiling and nearby walls
but many of them were decoded incorrectly.
Food for thought
Thinking of building a standalone
Jukebox without a monitor or keyboard? We designed the Jukebox so
that once you’ve set everything up,
you can!
To run your PC without a monitor
or keyboard, you’ll probably need
to alter your BIOS settings so that it
will boot without these devices connected. Generally, the setting to look
for is titled “Halt On”; change the
associated parameter to “No Errors”.
Check your motherboard manual for
specific details.
On the Windows side, you need to
boot up at least once without a mouse
connected to disable Windows’ mouse
warning message. Of course, you also
need to make sure that the system
automatically logs-on when Windows
starts.
One way to do this is with the
“TweakUI” utility from Microsoft. It
allows you to set up auto-logon and
includes lots of other useful stuff
too. You can download it from
www.microsoft.com/ntworkstation/
downloads/powertoys/networking/
nttweakui.asp
Finally, you’ll need to place a
shortcut to the IRRemote.exe file in
www.siliconchip.com.au
your startup folder if you didn’t choose the “load at
startup” option during installation.
How do I update my music?
You’re probably wondering how you’re going to
update your MP3s without a monitor or keyboard
connected. The simplest method of all is to store your
MP3s on CD-ROM. Then all you need to do to update
is to burn a new CD, switch discs and hit the <Shift>
<Reload Playlist> keys on your remote. You don’t need
to run IR Remote Setup again as long as the metalist
file retains the same name and location on the disc.
While on the subject of CDs, we mentioned in the
introduction that you might get short pauses in play
when running from a CD-ROM drive. If you have this
problem, then try increasing the output buffer size in
Winamp. To alter this setting, open Winamp’s Preferences window. Under Plug-ins, select the “Nullsoft
waveout plug-in” and click on the Configure button.
Now change the “Buffer length” slider from the default
of 2000ms to about 8000ms. That should do the trick!
If you want to go the whole hog, then what about a home
network? Networking kits are quite cheap these days and
updating the Jukebox files across a network is a snap!
Once networked, you can control the Windows
desktop of your Jukebox from another PC on the same
network using an excellent freeware package called
VNC (Virtual Network Computing). Check it out at
http://www.uk.research.att.com/vnc/
Remote mounting
If you want a super-professional look, you could
mount the IR Remote Receiver & LCD hardware in a
small rack-mount or instrument case and stash that
old beige PC box out of sight. Power requirements
are modest (less than 100mA) and can be provided
by any 9-12V DC plugpack. The serial cable can be as
long as you like but not so the audio cable from the
sound card. Keep this down to a few metres to avoid
potential noise and signal loss problems.
We took the alternative route of fitting the hardware
to a PC which we resprayed charcoal grey.
Hey Mr DJ!
Yes, the Jukebox even has a party mode (well, almost!). The clever people at Nullsoft designed Winamp
so that it is easily expandable using plug-in software
modules, or “plug-ins” for short. One in particular,
called “SqrSoft Advanced Crossfading”, is a good
example of how useful these can be.
Once installed, this plug-in allows you to eliminate
the short gap between tracks, as well as automatically
fade out a track as it ends and fade in the next. A word
of warning, though. Make sure you are very familiar
with the operation of Winamp and the Jukebox before
you try this plug-in, as it changes the operation of
things considerably.
You can download this and other plug-ins of interest from the Winamp web site; follow the link to the
plug-ins download page. Enjoy!
Please note: WinAmp version 3 and later may not
be suitable for use with this project. Older versions are
SC
available from http://classic.winamp.com
www.siliconchip.com.au
October 2001 35
|