MusicTicker Plug-In v0.271b By Atul Varma, 1999 varmaa@kenyon.edu --------------------------- MusicTicker is a general-purpose plugin for Nullsoft WinAmp which enables you to output the name of the currently playing song and recently played songs to an HTML file ready for publication on the World Wide Web. This is very useful for SHOUTcast servers. In addition, MusicTicker can monitor WinAmp's playlist so that tracks are played in a structure similar to that of a radio station's playlist--i.e., one in which different songs by the same artist should not be played consecutively, the same song should not be played twice in the same hour, and so on. With MusicTicker, if someone is listening to a SHOUTcast server and hears a song they've never heard before and would like to know more about, they can just go to the server's webpage and access the file that this plug-in creates and find out exactly what song is playing, or what that great song that played ten minutes ago was called. In this way, it helps the listener learn about great new music, and it promotes the artist as well. In my opinion, that's what radio's about, whether it's on the net or the air: learning about great new music that you've never heard before. I hope MusicTicker will help SHOUTcast servers do this. SYSTEM REQUIREMENTS ------------------- The MusicTicker Plug-In requires WinAmp 2.05 or higher. If you can get WinAmp working, then this plug-in should work as well. WHERE TO GET IT --------------- The latest version of MusicTicker can be found at: http://www2.kenyon.edu/People/varmaa/mticker MusicTicker can also be downloaded from Winamp's website (www.winamp.com) in the "General Plug-Ins" section, though it might not have the latest version. INSTALLATION ------------ To install MusicTicker, just copy the gen_mticker.dll and mt_subs.inf files to your winamp\plugins folder. Then copy the mticker_pow.gif file to the directory in which you want to put the output HTML file (the file that shows the currently playing track and recently played tracks). CONFIGURATION ------------- Start WinAmp (or restart it if it's currently running), and go to the Preferences dialog box (type Ctrl-P at the main WinAmp window). Go to the "Misc Plug-Ins" tab, and then under the "General Purpose" section select "MusicTicker Plug-In" in the drop-down menu. Then click the "Configure" button next to it. The options in the configuration dialog box are described below. Enable MusicTicker Activates or deactivates the plug-in. SHOUTcast HTML Output: ---------------------- Output Filename This is the file which the MusicTicker plug-in outputs its HTML to. You can output the file to any location on your computer or a network drive. HTML Post-Process Command This is the command that MusicTicker will run immediately after it outputs to the HTML file. You can set this to launch an FTP program that uploads the HTML file to a server (such as Geocities or XOOM.COM), or several other things. For more information about uploading the HTML file to a server via FTP, see the "Posting MusicTicker's HTML output" section of this document. If you don't understand what this means, think of it this way: every time MusicTicker writes the name of the currently playing song/recently played songs to HTML, it goes to the Windows Start Menu, selects "Run...", and puts in whatever is in this field and selects "OK". If this field is blank, then it doesn't run anything at all. If you select "Browse..." you can pick the executable or batch file using the standard Windows open file dialog box. If the file you select has a space in its name or its path (e.g., C:\Program Files\someprogram.exe), YOU MUST put quotes around its name before you specify parameters for it! Proper syntax would be: "C:\Program Files\someprogram.exe" parameter1 parameter2 ... Also, there are some symbols you can use to pass information about the currently playing/recently played songs to the command line. %f -- inserts the name of the HTML output filename you selected. So if you selected "C:\Status.html" in the output filename field of the configuration dialog, "c:\ws_ftp.exe %f" would translate to "c:\wsftp C:\Status.html". %0 -- inserts the name of the currently playing song. %1, %2 ... %n -- inserts the name of the song played %n songs ago (e.g., %15 would be the title of the song played 15 songs ago). %% -- inserts a %. Export only track listing to HTML If you're just using MusicTicker for "normal" purposes and don't know what ASP is, don't mess around with this option. Checking this box makes it so that when MusicTicker exports to HTML, it will not include any information such as the ,
, or tags. It will only write the table of the song playing and songs recently played to the file. This is useful for ASP and other dynamic HTML scripts which want to paste MusicTicker's output into an already existing HTML file. It can also be used in conjunction with a DOS batch file (executed by the HTML Post-Process Command) to make customized status pages. For example, the HTML Post-Process Command could be set to "C:\command.com /c copy begin.htm + musicticker_status.htm + end.htm > newstatus.htm". Title History list length This is the number of recently played tracks the HTML file will display. I.E., if this is set to 5, then the HTML file will list the last 5 tracks played (not including the currently playing track). Playlist Monitoring Options: ---------------------------- MusicTicker has the ability to "monitor" what is being played in WinAmp and change what is being played if certain conditions are met. I implemented this feature because I'm somewhat dissatisfied with WinAmp's random/shuffle playmode. I think it's because Nullsoft makes WinAmp record the songs that have already been played as their indexes in the playlist rather than as their actual names--this means that if you have a playlist and insert a song in the beginning of it, all the songs that WinAmp thinks that it's already played will not necessarily have already been played, and this means that songs you haven't heard yet will never play, and songs that have already played will repeat themselves! Well, at least that's how I *think* the shuffle mode works, but I could be totally wrong, because I haven't messed around with the shuffle playmode much. In any case, I implemented these features. They probably should not be used for very small playlists, however, as they are meant for a "radio station" sort of usage in which there is a library of at least several dozen songs, several of which are by the same artists. These songs should be played in such a way that songs by the same artist should not be played consecutively, and a song should not be played twice in the same hour, and so on. If you don't want these kinds of features, then you should probably disable all the settings in this section. It should be noted that there are currently a few "pseudo-bugs" in this section. For one thing, it's impossible for MusicTicker to monitor and change the currently playing track without having the currently playing track play for at least a few milliseconds. That is, if something is about to play and MusicTicker tells WinAmp to skip the track, the track will actually play for a few milliseconds before it is skipped. For songs that have a second or so of silence before they start playing, this is not a problem, but for others, their first few milliseconds of audio will be heard. This is an annoying bug that can only be fixed by using a different method for "monitoring" the playlist, which I'm still trying to figure out. If you do use any of these options, they are meant to be used with the "shuffle" and "repeat" modes enabled on WinAmp. Same Artist Check limit Whenever a new track is about to play, MusicTicker will search through the recently played tracks to see if the track that is about to play is by an artist that has recently been played. This value is the depth to which MusicTicker will search the recently played tracks list. For instance, if a song by an artist named "The Softies" was played 3 songs ago and another song by The Softies was about to play, MusicTicker would check back through the recently played tracks to see if a song by The Softies was recently played. So if the value of "Same Artist Check limit" was 5, then MusicTicker would search back through the last 5 tracks to see if a song by The Softies has already played, and if so, then it will skip the current track. Setting this value to 0 will disable it. MusicTicker currently checks the title of the MP3, which can be in a number of formats depending on how you configure your version of WinAmp. By default, WinAmp will check to see if the MP3 has an ID3 tag. If it does, it will format the title in the way defined in the Nitrane MPEG Audio Decoder preferences; by default, this is "Artist name - Title name". If WinAmp finds the ID3 tag, it will send the formatted title, but if it doesn't find an ID3 tag, it just sends the name of the file sans its extension. MusicTicker assumes that the title of the song is going to be in the default "Artist name - Title name" format. All of my MP3's have this file name format by default (e.g., "Cake-The Distance.mp3"), so whether the MP3 has an ID3 tag or not, the title gets sent to MusicTicker in the "Artist name - Title name" format, and this is how MusicTicker expects the song title to be formatted. Same Title Check limit: This is similar to "Same Artist Check limit", except that it checks to see if the entire song title matches, instead of the first three letters. You should probably set the two above values to fairly conservative settings, because if they are high (in comparison to the size of the playlist), then MusicTicker will make WinAmp skip through a LOT of tracks to find one that is acceptable, and this will cause a lot of delay. I have a playlist of about 100 songs and I set the "Same Artist Check limit" to 10 and the "Same Title Check limit" to 50 and it seems to work pretty well. DO NOT set any of the above values to numbers that are greater than or equal to the number of tracks in your playlist! If you want to see what this does, try it out. :) Other Plugin.ini variables -------------------------- There are also a few more config options in the plugin.ini file located in your winamp\plugins directory which aren't accessible through MusicTicker's configuration dialog box. Note that before you go about changing these options, make sure that MusicTicker's configuration dialog box is closed. After making changes to this file, open the configuration dialog; as soon as you do this, the configuration will be re-loaded from disk and the changes you made to the plugin.ini will take effect. EnableHTMLOutput - set this to 0 if you don't want MusicTicker to output to HTML at all. Note that the HTMLPostProcessCmd is not executed if this is set to 0. HTMLTitle - this is what goes in between the