1.) Find formatted music in x format.
2.) Decode the music in x format into PCM data by using the correct libraries for x format.
3.) Encode the given PCM data into something else using another library.
That's about it as far as I know.... Any steps I missed?