Music player with auto-crossfading

Sometimes you need to play some music and doing that with Windows® 10 Music app, the older Zune™ player or the oldest Windows® Media Player is fine, but there is no built-in or default automatic crossfading option – you probably need to install or configure an extension to have that. But it’s an essential feature if you don’t like gaps between songs, like I don’t. (WinAmp, though, probably has some built-in crossfading feature by now, as it had a very helpful extension a long time ago – you may correct me if I’m wrong.)

The remaining solution is to build your own player app. In WPF – as I already described in a previous post – you can use MediaElement to play virtually any song and to crossfade between songs it’s just a matter of having (at least) two MediaElements that have their volume values controlled in a timer dispatcher loop. I’ve prepared a proof of concept using C# – actually it can also be viewed as a very simple, but functional, Windows® music player app – MusicPlayer – on GitHub. To run it, simply configure the folder path of your music (or playlist) and extension pattern to search for in the .config file (XML based), and run the executable.

Let me know what you think of the implementation. Note that I never considered providing a fancy one, with full maintainability (i.e. right now I don’t have services split up, there are no interfaces, and no unit tests). However, feel free to use it anyway you wish: if you clone the repo and improve the app yourself, I would really appreciate if eventually you would push the changes as a contributor to the mainstream too – thank you in advance. Have fun!


About Sorin Dolha

My passion is software development, but I also like physics.
This entry was posted in WPF. Bookmark the permalink.

Add a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s