Friday, December 19, 2008

Select random songs for MP3 player

I recently upgraded the firmware on my old Nano Plus MP3 player. As a result, the Windows Media Player, running under Server 2008, won't detect the device any more. Since I periodically toss around 50 random songs on my player for running purposes, and the fact that I'm too cheap to buy another compatible player, I wrote a quick-n-dirty lil' C# Windows Forms application to do this.

The application will simply select n random songs given a bunch of different input and output parameters. The UI looks like:



You have a few nice options like providing regular expression filters for including or excluding certain files. Whatever settings you use will be saved in an XML file in your application data folder.

You can download the C# solution by clicking here. It's not the best code, but hey, I needed it before a race tomorrow.

1 comment:

PaulTechGuy said...

I've been using this for weeks now. One of the features that I find to be the most powerful is the ability to EXCLUDE items based on a regular expression. For most player software, you choose to what to include (e.g. playlist). I'm find it better to include everything, but then EXCLUDE certain items.

Because the exclude regular expression is applied to the entire local directory tree, and if your music is categorized by artist/album, then you can easily exclude an entire artist or album by just entering the name. Very quick and easy.

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...