The great advantage of the digital revolution is that it allows us to repurpose data—convert it from one format to another, and alter the medium of delivery, not to mention make backup copies. Not all industries or content providers are as willing to let their users do this with data they have purchased. In Canada, however, a levy has been levied on blank recording media for many years. In exchange for paying this levy, it is broadly-speaking legal in Canada to make copies of audio recordings of music from any source provided these copies are made for private use. A detailed discussion can be found here. Many other countries have similar legislation. Remember that no site, including this one, can substitute for professional legal advice from a copyright lawyer..
Here are various tools and methods for manipulating data: