The Minimal Jukebox Server

The Server Hardware

You don't need a particularly powerful PC for selecting and playing music, but adding CDs and other maintenance tasks are a lot more pleasant with a fast PC. It doesn't have to be sited near the amplifier and speakers — anywhere within cable range will do, in a separate room if desired. In day-to-day operation there's no need to look at it or touch it.

The WiFi Access Point can be sited anywhere within cable range of the server PC. Signal quality is the important criterion when selecting a location.

The Apache HTTP Server Software

There's not much to say about the Apache HTTP server software. After installation it needs a small amount of work to configure it, then it just sits there in the background quietly handing out pages in response to requests from the browser in the remote control.

An important element of server configuration is the "Document Root", which is a folder on the server PC hard disk. When the server receives a request from a browser, the "Document Root" is the directory that the server goes to for the requested page. The principal contents of the Document Root folder for the jukebox server are:

  • The Start Page for the jukebox (see below)
  • The jukebox database, which was created by the Database Converter
  • HTML files containing fixed displays such as the tabs across the top of the screen
  • Image files containing button faces and other graphical elements
  • The CGI programs

The Start Page

The Start Page (eee_jukebox.html) is requested when the remote control browser is started. The Start Page itself contains (relatively) fixed visual elements such as the player case on the left and the tabbed spiral-bound booklet to the right. See the image below. This page remains permanently in place. Minor changes to the appearance (illuminating a player control, highlighting a tab, etc) are created by modifying the HTML using JavaScript.

The fixed elements of the Start PageThe fixed elements of the Start Page (image reduced to 70% of full size)

The three large blank areas above are filled by separate pages from the server (in HTML these are iframes). See below.

The three frames of the Start PageThe three iframes embedded in the Start Page (image reduced to 70% of full size)

Each of the iframes is rendered separately as an HTML page. The sources of the iframe contents are as follows:

  • Player frame: player.html (see 'Push' frames below)
  • Queue frame: queue.html (see 'Push' frames below)
  • Info frame: varies depending on which tab is selected:
    • Search tab: search.cgi
    • Popular tab: an HTML page from the database, for example eee_pop_albumartists_albums/vwxyz.html
    • Classical tab: an HTML page from the database, for example eee_cla_albumartists_albums/level2/VivaldiAntonio.html
    • Misc tab: an HTML page from the database, for example eee_misc_albums/NoelCoward_TheCompactCoward.html
    • Lucky Dip tab: luckydip.cgi
    • Recent tab: recentlyadded.html (from the database) or recentlyplayed.cgi
    • Live tab: live.cgi
    • Lyrics tab: lyrics.cgi
    • About tab: home.html (from the database)

There further hidden iframes which are used to update the visible frames without the need to completely refresh them.

Winamp and httpQ

Winamp is the program that plays the music and maintains the queue of music waiting to be played (in Winamp this is called the "playlist").

A Winamp plug-in called httpQ provides an HTTP server that allows other programs to control and monitor Winamp functions. The CGI programs communicate with Winamp using httpQ.

Winamp uses Windows Media Encoder to decompress the music files.

'Push' Frames

The Player and Queue frames are highly dynamic. I use "push" technology, which means that they are updated by the server whenever there's a relevant change to Winamp's status, without the need for polling. I intend to write a page about the techniques used, but time doesn't allow at the moment.

CGI Frames

Some frames contain information that varies with time. These frames use CGI programs. The CGI programs create the HTML pages dynamically, using variable information such as Winamp's status or the list of previously-played music.