John Stuart Mill was brought up by a father of inhuman rectitude and energy. He started to learn Greek at three. By the age of eight he had read all of Xenophon and was started on Latin. As well as his own studies, he had to teach his younger sisters, and was punished with them if they made a mistake. For the whole of his childhood, he studied for eight or nine hours a day - not just the classics, but philosophy and economics as well; and when, in his twenties, he suffered a prolonged depressive episode, this too took an intellectual form.

He became - he says in his autobiography - "seriously tormented" by the thought that music would run out: "The octave consists only of five tones and two semi-tones, which can be put together in only a limited number of ways, of which but a small proportion are beautiful: most of these, it seemed to me, must have been already discovered, and there could not be room for a long succession of Mozarts and Webers, to strike out, as these had done, entirely new and surpassingly rich veins of musical beauty."

He also worried that mass affluence would remove the savour from life. "The question was, whether, if the reformers of society and government could succeed in their objects, and every person in the community were free and in a state of physical comfort, the pleasures of life, being no longer kept up by struggle and privation, would cease to be pleasures."

Well, we've got there now. Almost every person in the community is free, and in a state of physical comfort unimaginable by the standards of the 1820s. Most of the pleasures that he would have recognised have ceased to be pleasures. But is music really running out?

It might seem that we have more resources to make more noises than any previous humans can dream of. Electronic instruments can make any sound we are capable of hearing, and these can be layered and replayed in ways that escape the bounds of merely human competence. I couldn't play Liszt to save my life, but given time I could make a recording of even his most difficult pieces that ought to sound indistinguishable from a real pianist.

But we have certainly run out of music that would have seemed beautiful to Mill. The store of conventional melodies seems entirely depleted. To hear something fresh, we must scour ever more exotic sources of world music. Everything else one can hear sounds nasty, familiar or both.

But suppose we really had exhausted musical novelty. What would the world be like then? One way to answer the question is Quinn's Prank, a thought experiment, or work of conceptual art, called after its inventor the journalist Quinn Norton. She wants to write a computer program which will generate all the possible melodies in the world, on the principle of the monkeys and Shakespeare, but some filters to ensure that the results are not too hideously discordant. Then - and this is the point - she publishes, and so copyrights, the resulting score. We might as well call it "The Finished Symphony", since it would contain all possible tunes. Any piece of music written or published from then on would infringe her copyrights unless it were wholly unoriginal, in which case it would infringe on someone else's.

Her copyright might not be onerously applied. She could, for example, release the whole thing under a Creative Commons licence, which allowed anyone to reproduce any part of it. But she could just as easily use a more restrictive form of the same licence, which would allow anyone to reproduce it providing they made no money from the result.

Technically, the idea may now be feasible. No new musical notes have been invented since John Stuart Mills' time. There is enough computing power in the world to combine them all and if there isn't, there shortly will be. To put it another way, the internet has finally given us enough monkeys to generate Shakespeare.

Legally, of course, the prank would never be allowed. Some way would be found to show that music which quoted from the Finished Symphony was actually the property of the record companies. Actually, I think this is a good thing. A world in which anything could be freely copied would not encourage originality very much. But neither does a world in which nothing may be copied without royalties, and the point of Quinn's prank is to show how close we have come to that - closer, at any rate, than to the end of music that Mill feared.

* Andrew Brown has a blog.