Music evolution: Is this the end of the composer?
You might think that creating the perfect piece of music - whether it's a classical great, jazz masterpiece or pop hit - is all down to the composer's talent, flair or even genius.
Not so, according to Armand Leroi from Imperial College London.
"What we are trying to find out is whether you need a composer to make music," says the professor of evolutionary developmental biology.
"And we don't think you do."
He believes a much more fundamental force of nature is at work.
"We don't often think of music as evolving, but everybody knows it has a history and it has traditions. But if you think about it, it really has evolved, it is changing continuously," Prof Leroi explains.
"There are all the same forces of change, variation, selection and recombination as different musical traditions join together, transmute and fuse and divide again.
"This is all the stuff that is familiar from our understanding of the biological world, but we see it here in music as well."
He adds: "We believe music evolves by a fundamentally Darwinian process - so we wanted to test that idea."
Enter Dr Bob MacCallum, mosquito researcher at Imperial College London by day, creator of DarwinTunes by night.
The idea behind it is simple: to see if music can evolve out of noise - without the controlling hand of a composer.
To begin with, the computer program randomly churned out two short loops of noise.
"The notes are in any place, in any order, and the types of sound - the instrument - is completely randomly generated as well," says Dr MacCallum.
Then, as in nature, the program let the two original loops to "breed", to recombine and mix up their material, with some random mutations thrown in for good measure, to create four new loops.
Those four went on to "reproduce" to create 16 new loops, and so on - until 100 random tunes were in the musical mixing pot.
At which point, the public were brought in.
Through the internet, volunteers were asked to rate the songs that were being produced: from love to indifference to pure hatred.
Those tunes that were detested were thrown out. But the more popular ones were kept and allowed to "breed" to create a new generation of songs.
"In the beginning, [the loops were] pretty horrible," says Dr MacCallum.
"But occasionally, one was slightly less horrible, so the volunteer would give that a higher rating, and that loop and a few others that were slightly less bad than the others would go forward and have offspring. And then as evolution proceeds the music does get better."
The team found that the quality of the music improved quickly from its discordant beginnings.
A few hundred generations down the line and the clashing chords began to vanish and better rhythms started to emerge.
A few thousand generations on, and the music improved again. But the random mutations that happened every now and again also started to give rise to some musical surprises.
Dr MacCallum says: "After about 3,000 generations had been listened to, there starts to be a kick drum or a bass drum, and that just spontaneously came, we didn't put any drum sounds into the algorithm."
But then, the standard of the songs started to plateau, according to a paper published in the journal Proceedings of the National Academy of Science (PNAS).
Prof Leroi says that this was partly because of some limitations with the program, but it was also reflective of a process that can occur in life.
"Evolution of all sorts, whether you are talking about out there in the wild or in the lab, you always find you get a rapid phase of very fast evolution, and then it slows down," he says.
"Of course it never slows down forever, it never just stays there. Eventually you will get another burst of evolution as something new comes along and breaks through a boundary, and we think that will happen here too."
He also added that the system missed out one other crucial factor: the influence of our peers.
He says: "We know from studies that when kids are allowed to see what other people are choosing, what they choose is very different from actually what they decide themselves is the best.
"And it turns out that when that happens you get very different evolutionary dynamics, and if you throw marketing into that equation, the influence of big business then it changes all over again."
However, despite some limitations, Prof Leroi says the results from DarwinTunes confirmed his suspicions.
"You can evolve music without a composer," he explains.
"It's just a matter of market forces. It tells us that market forces - consumer choice - is itself a creative force, one that is actually much more important than we appreciate."
But if musicians and composers aren't already quaking in their boots, Prof Leroi has a grand vision for the future of the Darwinian music machine.
He says: "I've no doubt that if we ran this experiment for longer, using bigger, faster computers, and millions of people rather than thousands, and for years, instead of months, we could evolve fantastic music.
"Would it be Mozart? No, I don't think so. It would have no composer behind it, it wouldn't be the act of any individual musical genius, it would just be the people's music in its purest form."