The Random Album Chooser, now with integral playback


I know I said I wasn’t going to update the Random Album Chooser any more in my last post but:

a)  I’ve not had much time to work on the WPF version and I still haven’t come up with a new navigation model I like; and more importantly:

b) Windows Media Player can’t cope with UTF8 characters in .mu3 files.

How do I know this? Well I had an e-mail from a user (yes hard to believe I know, but it does happen) who was initially having problems installing the application, but then once that was sorted got an error when sending the playlist to Windows Media Player. I tried some albums of mine and everything seemed OK, then I realised that the user was Spanish so there was a high likelihood of there being UTF8 characters in the filenames. So I tried a file and got the following error:

Windows Media Player error

Windows Media Player error

While diagnosing the initial problem I contacted a friend to try the install and he suggested that I add integral playback. I was initially sceptical, but the playlist problem convinced me so I used the Windows Media Player library (more information on the MSDN) to implement simple playback controls.

  • Alt+P will now pause while currently playing as well as play.
  • Alt+J while playing skips back to the previous track.
  • Alt+L while playing skips forwards to the next track.
  • Alt+K stops the playback and resets back to the start of the current album.

I also implemented popup notification of currently playing track when the track changes, show the current track on right click over the cover art and automatically choose the next album when this one finishes. I didn’t implement auto play at this stage – this has just occurred to me as a possible enhancement. I can see that this might be useful I’ll add it to the “to do” list.

Currently there’s no UI on the playback controls other than clicking the cover art to play/pause. I don’t really know where these would go best so I thought I’d leave it off for now.

There are a number of other changes in this version as well:

  • Titles and Artists with “&” not displayed correctly in details popup (right click over album cover).
  • Fixed problem with Unicode characters in Tracks/Artists.
  • Application location now saved correctly if closed from minimized state.

Download it now or if you’ve already got it installed it should update automatically the next time you start the application. There was a problem with the version I uploaded last week – a simple coding error as it turned out – and nothing to do with 64 bit Window 7 at all.

So, I’m not going to promise that the next version will be the WPF version as that’s just setting myself up to fail.

© 2011, Chris. All rights reserved. If you republish this post can you please link back to the original post.

, ,

  1. #1 by Marco on 25 October, 2011 - 9:07 pm

    Hello, I just found your Random Album Chooser program through Google.

    First of; I cannot use an external media player (Media Player Classic – Home Cinema – MPC-HC + ffdshow codecs) something about the pins in the graph not right with the file extension .m3u.

    Also I want to use multiple filetypes. I barely use .mp3, but I mostly use .flac, .ape, .wv, and .m4a. (all lossless audio codecs).

    Also when skipping to another album, it just freezes; or rather it doesn’t do anything. Maybe this has something to do with ‘no support for certain filetypes’?

    • #2 by Chris on 25 October, 2011 - 9:27 pm

      Thanks for the feedback.

      Do you have files with accented characters in them? I have to do some jiggery pokery with character encodings to get them into the .m3u file at all. It could be that Media Player Classic can’t read these files.

      Multiple file types is something I’ve been avoiding to be honest. It is on my list of things to do though. The problem is I’ve stuck with mp3 for so long (inertia) I’ve got a lot of music to re-encode now.

(will not be published)

*