In this paper we first provide a literature review about the economics of online music. Second, we then present an economical model for online music by incorporating various parameters such as the price of a legal download, as well as parameters taking into account the quality and security risk associated with purchasing or copying music form the Internet. Furthermore, we incorporate legal and technological parameters in our model, such as law enforcement and its underlying penalties, as well as rights and usage restrictions enforced through so called Digital Rights Management Systems. We then present the optimal choice for a consumer for purchasing online music with the presence of online piracy. Finally, we discuss three possible scenarios. By using empirical numerical values we establish a link between our model and practical application. Each scenario is discussed in detail and we conclude that content providers should either demand a higher price but not restrict consumers or dem...