Versions of a song

Versions of a song

Versions of a song

When listening to a song, would you like to know if there is another version or part of this song in your library? O!MPD can find it for you and it does it in a smart way.

Let’s say you’re listening to Mike Oldfield’s Taurus II from album Five Miles Out. While you are listening, O!MPD works: first it finds core of song title, which in this case is Taurus. Then it tries to find all songs, which titles begin at Taurus. If more then one result is found, then track title (in Now Playing section) is turned into link:

song-versions-1If you click this link, you will see the list of other version or parts of Taurus II. For my collection it gives the following:


How O!MPD knows where core part of title ends? It searches specific string from the list defined in file include/ in section Songs separators in track title as long, as any of those strings appears. For Taurus II: first matching string from list is " II", so this string and text after is cut off from title. What’s left is Taurus. There is no more occurrences of strings from list in this text, so Taurus is assumed to be the core name. Then O!MPD searches all of the tracks with title begining at Taurus and displays them. I hope it’s clear enough 🙂

Predefined list looks like this:

$cfg['separator'][] =     " (";
$cfg['separator'][] =     " [";
$cfg['separator'][] =     " {";
$cfg['separator'][] =     "(";
$cfg['separator'][] =     "[";
$cfg['separator'][] =     "{";
$cfg['separator'][] =     "/";
$cfg['separator'][] =     "\\";
$cfg['separator'][] =     "-";
$cfg['separator'][] =     ", part";
$cfg['separator'][] =     ", pt";
$cfg['separator'][] =     ", vol";
$cfg['separator'][] =     " part";
$cfg['separator'][] =     " pt";
$cfg['separator'][] =     " vol";
$cfg['separator'][] =     " część ";
$cfg['separator'][] =     ", część ";
$cfg['separator'][] =     " '";
$cfg['separator'][] =     "?";
$cfg['separator'][] =     "!";
$cfg['separator'][] =     ":";
$cfg['separator'][] =     " 1";
$cfg['separator'][] =     " 2";
$cfg['separator'][] =     " 3";
$cfg['separator'][] =     " 4";
$cfg['separator'][] =     " 5";
$cfg['separator'][] =     " II";
$cfg['separator'][] =     " III";
$cfg['separator'][] =     " IV";

You can customize this list, naturally.

Of course accuracy of this process is not 100% – but is good enough to discover some interesting relations.

Hope you like it.

Leave a Reply

Your email address will not be published. Required fields are marked *