Previously, I was generating all of the data only when a song was played or stopped. Winamp would call my custom PHP script using either Brandon Fuller’s Now Playing: A Winamp Plugin v188.8.131.52 in the standard Winamp or the built-in Play Tracker POST option of WACUP. It would save the information to a static text file which my Entertainment page would include. Now, only the currently playing song is saved to a text file when a song is played or stopped. The rest of the history is generated as the page is viewed from the MySQL data. This will allow me to change the presentation of the data without the need to play a new song to update the static text file.
As many of you know, Winamp was bought by Radionomy sometime ago (announcement) and, as a result, the skins and plugins were removed from Winamp’s website. While there are various places to find these skins, I figured I would go ahead and make the ones that I have available. 🙂 I would start with Winamp Enthusiast’s site to look for other resources.
I have modified my Winamp Information page to include links to the skins I have for download. I wrote a PHP script that uploads and then parses the Winamp Info Tool’s HTML output and adds the links in. I wanted to do this so that it would be easy to update when and if I get new skins. The way I wrote it, it will only link to a skin that is able to be downloaded. 🙂
For those that might remember, my old computer system had a melt-down of sorts and I had to get a new one. This new system has Windows 7 Pro/SP1 64-bit and has a Realtek ALC892 Audio chipset in it. Regular MP3s and other digital music formats sound fine on it but MIDI files sounded like crap for the most part compared to my old system. I do still have the Sound Blaster X-Fi Elite Pro that was in my old system; however, I just never felt like going through the effort of trying to get it to work in this system due to its age and probably limited support in Windows 7 64-bit. Anyway, I knew the problem wasn’t so much the audio chipset (well, yes, it does have an impact) but the lack luster MIDI instrument samples that ship with Windows 7 which the included “Microsoft GS Wavetable Synth” uses. I also looked at the Sound Control Panel Applet and noticed that there was no option to set a default MIDI playback device like Windows XP had (which I still find rather odd.)
Anyway, since my website uses Windows Media Player to play its MIDI files with, I did need to use this software to change MIDI Mapper’s Default MIDI Out Device from Microsoft GS Wavetable Synth to CoolSoft VirtualMIDISynth:
Then, I loaded up the Soundfont my old card was using in the Soundfonts tab:
While it doesn’t sound exactly like it did before (due to the differences in audio hardware and drivers), it is now much closer because it is using better base sound samples to work with. MIDI files can sound much different simply by changing the Soundfonts used. I tried a few of the ones linked to at those sites and some of them aren’t too bad. Short of getting a new sound card that puts more emphasis on how MIDI sounds, this is a good compromise, and it’s free! LOL 🙂
Oh, for those using Firefox, the amount of memory that the associated plugin-container.exe process uses while playing a MIDI file will roughly match the size of the Soundfont(s) selected as it has to load them into memory. So, a 256MB Soundfont will cause it to use that much memory.
For those like me that also use Winamp, since the default device has now been changed for all of Windows, it will start playing MIDI files using the improved instrument sounds as well. However, you can directly change the MIDI playback device by going into Winamp’s Preferences -> Plug-ins -> Input -> Nullsoft MIDI Player -> Devices Tab and select the second midiOut / Microsoft MIDI Mapper choice (this is the one that came with Winamp v5.63):
Note: If you change the default MIDI Mapper device back to Microsoft GS Wavetable Synth in the VirtualMIDISynth Configurator then Winamp will show two entries for midiOut / Microsoft GS Wavetable. In this scenario, pick the second one. Why it doesn’t list VirtualMIDISynth specifically I do not know. I may send feedback to Coolsoft and/or Winamp about it.
Just for the heck of it, I swapped out Winamp’s current MIDI plug-in with a really old one that supported auto-loading Soundfonts. Its device listing is somewhat different and lists VirtualMIDISynth by name:
I tried the auto-load Soundfont option that this plug-in has for MIDI files that use a specific Soundfont; however, it didn’t work. Pretty sure that option only works with Sound Blasters (this did work in my old system).
Anyway, I’m still playing with different Soundfonts to get the best sound. Now I need to install a virtual MIDI keyboard so I can play specific instruments. Hope this information helps someone out there. 🙂
After upgrading Winamp to its latest version (5.57), the Now Playing v2.1.2 plug-in I was using would cause Winamp to crash every time I closed Winamp which caused none of its settings to be saved. After some googling around I came across Brandon Fuller’s Now Playing: A Winamp Plugin (site gone) which seemed to do what I needed. It would allow me to FTP a XML file containing information about the last X number of songs I played and would also let me send a HTTP post request to run a PHP script with the current song’s information contained within the $_POST variable. It calls this HTTP request a “ping”.
When this “ping” is sent, my PHP script parses the newly uploaded XML file to create the now playing images and song history (as seen on my Entertainment page), as well as a prepared Twitter message in a separate file should I choose to send a tweet out.
You can also send Twitter and Facebook updates using this plug-in. I’ve only tested it with Twitter and it seems to work; however, I use a separate PHP script to manually Tweet the song I’m currently listening to so I don’t fill my Twitter stream with song spam.
This plug-in does lack a couple things that the older one would do:
Send an album cover image along with the rest of the song’s information in a $_POST variable such as a folder.jpg located in the same directory as the song; however, it will send a link to an Amazon album image if the information matches (sometimes it doesn’t match correctly or just can’t find one). I am working on a mechanism to get around some of these pitfalls by uploading album images and having my script check for the existence of the local album image first.
Work with Shoutcast streams to extract out song information.
Even so, I will continue to use this plug-in for its compatibility and continuing support by the developer. It also seems to be a bit more reliable and stable than what I was using. Yes, I did purchase a license key. 🙂
Well, this is going to be one of those posts with a very narrow target audience and will undoubtedly make no sense and confuse others. 🙂
(Update 12/21/2009: With the release of Winamp 5.57, the Now Playing Plug-In version 2.1.2 I discuss below started to cause Winamp to crash. I found a new plug-in and discuss it here.)
I use Winamp to play my music with: MP3s, MIDI, MOD files, Internet Radio and so on. I also use the Winamp Now Playing Plug-In version 2.1.2 which interfaces with a PHP script on my website to create now-playing images, and a list of the past 10 songs I have listened to. The plug-in is rather old and it’s amazing it even still works with the current version of Winamp. It does seem to exhibit one rather odd and maddening behavior that has taken a while to track down.
The behavior manifests itself when playing a URL playlist stream (which are typically from Shoutcast) such as this one from Club 977 Music: http://www.club977.com/CLUB977HI.pls. When it first starts playing, the Now Playing Plug-in will always see the first song that is played and update the images and lists accordingly; however, it would not always recognize changes in the song title when a new song started playing. This was, of course, annoying. Over time I seemed to notice a pattern and today I tested it out and here are my findings:
If I start Winamp with a classic skin such as Bento Classified or the standard classic skin that comes with Winamp, the plug-in will recognize song title changes as the stream plays. If I then switch to a different classic or modern skin while Winamp is running, it will continue to work.
If I start Winamp with a modern skin (Winamp Modern, Bento, etc.), the plug-in will NOT recognize song title changes as the stream plays, even if I change to a classic skin.
So, the key is to always close Winamp with a classic skin loaded so that it will start with that skin and the Now Playing Plug-in will work. The work-around is simple enough but figuring out what was going on was a bit maddening. If you use this plug-in then, hopefully, you’ll find this useful.
Since Winamp does not provide tech support for 3rd-party plug-ins, I’m not going to bother to find out exactly why it acts this way. At least I now know how to keep it working. 🙂