Sometimes we do feel to have an application which can arrange our music library according to their genres as the library comprise of thousands of songs,we certainly do not want to sort them manually one by one.
A supposed working follows as:
First it will integrate with the media player you want to use it with.
Then the following algorithm may work:
1.Calculate the differences between high and low sounds.
2.Calculate noise levels of all the distinct sounds.
3.Filter voice and measure it's intensity.
4.Filter music and try to find out the different musical instruments used like a bass guitar is usually used in heavy metal or rock genres while a saxophone in jazz or classical.
Some more points can be added to achieve more accuracy and finally sort the music library.