Mike's Home Page > Jukebox Home > Our Jukebox > Plus: Monitor Screens on Our Jukebox

Plus: Monitor Screens on Our Jukebox

Monitor screenThe monitor screen in the kitchen

The monitor screens show the track currently playing (track title, artist name, and album name) in big letters that can be read from anywhere in the room. When nothing is playing, the screen is blank.

There's one monitor screen in the kitchen, one in the lounge, and one in my study.

Creating the Display

When the server PC starts up, the Mozilla Firefox browser is started automatically. I have configured Firefox so that when started it displays a page "monitor.html", which I wrote for the purpose, and resides in the jukebox root directory. I use the free Firefox plug-in Full Fullscreen, which is necessary in order to produce a 100% full screen display in Firefox. Full Fullscreen also automatically puts Firefox in full screen mode when started. The last hurdle to overcome in getting a clean-looking display is to hide the mouse cursor. For that I use Cursor Hider.

The page "monitor.html" contains JavaScript code which, with the assistance of a CGI program "monitor.cgi", creates an accurate, readable, and flicker-free display.

  • Accurate: Generally speaking the page refreshes every three seconds, but that's not good enough at the end of a track. So the code "homes in" on the end of a track and changes at exactly the right instant. But even with a perfectly timed display change, there are still problems. Many tracks fade in and/or out making it difficult to know, when glancing at the screen as a track changes, whether the display is telling you the name of the previous track or the name of the next track. So the track title turns pink for the last five seconds: if the title is pink, you know that's the track ending, and if it's white, you know it's the track starting.
  • Readable: The display uses two font sizes, automatically selecting the larger font if the text is short enough to fit, otherwise selecting the smaller font. If the text still doesn't fit with the smaller font, three dots (...) indicate the missing text.
  • Flicker-free: The display doesn't flicker when refreshing, even when the track title changes but the album title and artist don't. To make this happen the display updates itself by refreshing an invisible <iframe> rather than the main display. Because of restrictions in browsers (the <iframe> technique is often used by malware), it's necessary to refresh using the Apache server rather than directly from the hard disk.
  • Additionally, the monitor backlight is switched off a few seconds after the music stops, and switched on when it starts again. This switching is done by the free utility Commandiux, under the control of the monitor.cgi.

Here's an illustration of several of the features described above:

Monitor screen layout exampleMonitor screen layout example
(This image is shown at reduced scale for ease of viewing)
  • The composer name fits in the larger font; the CD title fits in the smaller font; the track title has to be shortened.
  • The track title is pink to indicate the end of the track.
  • Note also that for classical music the order is different from popular music, to comply with convention: the track title appears after the composer name, whereas for popular music the track title appears before the artist name.

The Screens

The image produced by monitor.html appears as a VGA (800x600) signal at the monitor socket on the back of the server PC. I use two different methods to get that signal to the rooms where the display is needed.

In each of the main listening rooms (the kitchen and the lounge) I use an LCD VGA monitor with an eight-inch screen, as shown in the illustration at the top of this page. VGA cable is bulky and expensive, and doesn't work well over long distances. So I have category 5 cable running in parallel with the audio cables from the server to the amplifiers, with VGA extenders.

Monitor TV screenMonitor TV screen in my study

My study is slightly different, because there's no convenient way to run an additional cable there. So I use a rather complicated solution with the picture transmitted over the LAN. The first step is to connect from my PC to the server using RealVNC. That gives me the server's monitor display in a window on my main PC. My PC has a dual-monitor video board, so I've written a Perl script to move the monitor window to the second monitor area, and incidentally to remove its button from the taskbar. So now the jukebox monitor doesn't appear on my main PC screen, but emerges as a VGA signal on the "monitor 2" socket on the back of my PC. On my desk I could have another eight-inch LCD VGA monitor, but I prefer a smaller five-inch screen. So I have a five-inch LCD TV (from eBay) connected using a VGA-to-AV converter. Obviously the picture quality is not as good on a TV screen as a VGA monitor, but I find it good enough.