best of
list
buy
there
myself


blog
text
image
code
puzzles
flame

 

MUSIC
TICKER
MADNESS

PERL

CODE


What is it with netfolks and the need to tell everybody in the free world what they're doing, have done, and will (soon) be doing? LiveJournals, WebCams, and, of course, MusicTickers.

Well, I added a MusicTicker to YARK a while back. Here's how. Now you can do the same, you narcissistic bastard.


MusicTicker installation walkthrough

or

How to regularly post even more
useless info nobody cares about



Woo. I've been gunning to use a few header tags on this site for ages now.

The beast itself might be right here:
    iTunes is offline, comrade.
( The above is powered by YarkiTunes. )

If that little thingie up there says that it's powered by MusicTicker, then you're in luck, and you're seeing the real thing. If it says it's powered by YARKbox, well, then, you're seeing a reasonable facsimile. Such is life.

It keeps tabs on the five most recent songs which have played on my PC at work, and uploads a munged version of that list to YARK each time WinAmp's status changes. The setup process can be broken down as follows:

1) Get WinAmp
    Don't give me any crap about how your MP3 player is better than WinAmp. Maybe it is. If you're such a goddamn MP3 player authority, go set up your goddamn ticker yourself, goddamn it. Just get WinAmp. You'll be glad you did. Or at least I will, anyway.
2) Get the MusicTicker plug-in.
    Right here, baby: MusicTicker. Unzip the package, and copy the .dll to your WinAmp plugins directory -- probably somewhere along the lines of C:\Program Files\Winamp\Plugins.

    UPDATE! It appears that the gen_MTicker .dll is no longer available via the above site. I'll host a copy here until I'm told not to. (Mticker.zip) You'll need to unzip the .dll into your WinAmp plugins directory. Please note that this is not my code, and I claim neither responsibility nor credit for its performance or lack thereof. I don't recommend going around and downloading random .dlls off of random folks' random websites either, but, hey, it's your machine.
3) Set up your working directory.
    I made a directory in C:\ named Ticker. Your mileage may vary.
4) Install perl.
    You, of course, already have perl installed, since it's so darn useful, right? Right? Well, if not, look here for a Win32 version.
5) Check for VBScript support.
    The easiest way to do this is to get an MS-DOS window (you can always Run (as in the item in your start menu (I love nested parenthesis)) command to get one). Type wscript and hit enter. You should get a window titled Windows Script Host Settings, or something along those lines. If you don't... er... well, you don't really need VBScript support, but the ticker is going to really annoy you when it runs, and you're not going to want to use it. You'll have to find another way to suppress the DOS window which pops up every single time the song changes. Good luck.
6) Put the perl script in place.
    Slap something along the lines of this in your Ticker directory, and call it songdata.pl. You'll have to edit various things -- I think they're pretty clear, and they're all right up there at the top of the script, so have at it.
7) Put the VBScript in place.
    Slap something along the lines of this in your Ticker directory, and call it songdata.vbs. You'll have to edit C:\Ticker\ to match your local Ticker directory.
8) Put the .bat file in place.
    Slap something along the lines of this in your Ticker directory, and call it songdata.bat. You'll have to edit C:\Ticker\ to match your local Ticker directory.
9) Configure the MusicTicker plug-in.
    Run WinAmp, and go to Options -> Preferneces -> Plug-ins -> General Purpose, select MusicTicker, and click Configure. Check the Enable MusicTicker box. Set the Output filename to C:\Ticker\songdata.htm, changing C:\Ticker\ as necessary. Set the HTML Post-Process Command to wscript.exe C:\Ticker\songdata.vbs, again changing C:\Ticker\ as necessary. Check Export only track listing to HTML. Set Title History list length to 4. Click OK. Click Close.
10) #include the resulting file.
    Stick something like the following text into your web page:
      I'm listening to...
      <UL>
      <!--#include virtual="songdata.txt" -->
      </UL>
      
      ( The above is powered by
      <A HREF="http://www2.kenyon.edu/People/varmaa/mticker/">MusicTicker</A>. )
      
    The exact syntax of the #include may vary, depending upon your web server. What's more, you may have to change songdata.txt to the relative location of the songdata output file if you're not in that exact directory, but I'm going to assume you know how to do that. It lets me sleep at night.
11) Try it out.
    You might want to stop and restart WinAmp. Who knows. This is Windows. You may also have to do an explicit reload of the web page, if you've already got a browser which has cached said page.
12) Let me know how it goes.
    Good luck, compadre.

 
 copyright 1994-2008 John Toomey