Tuesday, August 12, 2014

Artificial music: The computers that create melodies

Artificial music: The computers that create melodies


Can computers compose beautiful, emotional music? Phil Ball discovers a new algorithmic composer challenging our ideas of what music itself should be.
When Peter Russell first heard the unusual music, he was pleasantly surprised. It was a “delightful piece of chamber music”, he wrote, reminiscent of French pieces written in the early 20th Century. “After repeated hearings, I came to like it.”
What Russell, a musicologist, didn’t know was that the score titled Hello World had actually been composed much more recently by a computer called Iamus. Other listeners in blind tests have been similarly fooled. (Why not listen to it yourself as you read this article?)
Iamus is the creation of computer scientist Francisco Vico and his collaborators at the University of Malaga in Spain. It also has a younger sibling, called Melomics109, which composes ‘popular’ music.
You might think that any serious composers would turn up their noses at music made by a computer algorithm. But a few are already taking Iamus’s ideas very seriously. In 2012, a CD showcasing Iamus’s compositions featured performances by some of the world’s top musicians, including the London Symphony Orchestra. One of the other musicians to appear on the recording was Gustavo Diaz-Jerez, a composer and concert pianist at the Centro Superior de Música del País Vasco, in Spain, who is even using Iamus to write an opera that premieres next year.
No previous attempts to make music by computer – and there have been many, dating back to the early days of computation – have been afforded such serious attention.
A track by Melonics109
Even a cursory listen to Iamus is likely to persuade sceptics that it has come a long way from earlier efforts at computer-composed music such as “Emily Howell”, a program devised by American music professor David Cope. The key to Iamus’s success is an algorithm that mimics the process of natural selection. It takes a fragment of music (itself generated at random), of any length, and mutates it. Each mutation is assessed to see whether it conforms to particular rules – some generic, such as that the notes have to be playable on the instrument in question, others genre-specific, so that features like the melodies and harmonies fit with what is typical for that style. Little by little, the initial random fragment becomes more and more like real music, and the ‘evolutionary process’ stops when all the rules are met. In this way, hundreds of variants can be generated from the same starting material.
In a sense, these algorithms are not doing anything so very different from the way composers have always composed. Composing fugues, for example – which has been done from the Baroque to the modern era – involves taking a small melodic idea and applying permutations and rules that extend, develop and interweave it in overlapping voices, while preserving some basic and essential rules of harmony. Forms such as sonatas and concertos were also structured by clear rules.
Alphard, by Iamus, on the clarinet
Iamus’s key works so far won’t be to everyone’s taste. They are in the atonal modernist style that many people find austere and forbidding – think Birtwistle and Berio, not Brahms and Beethoven. But Diaz-Jerez finds them much richer and more satisfying than, say, the experiments of modernists in the 1950s and 60s using the technique of “total serialism”, which results in almost random choices of pitch, rhythm and other musical parameters. Some listeners might feel that, until Iamus can show itself capable of producing more familiar kinds of melody to compare with those of Mozart, its real potential as a musical maestro remains to be decided.
Others, such as the music critic Tom Service, have suggested that Iamus’s creators are making a mistake by programming it to generate music like that of human composers, using the same repertoire of traditional orchestral sounds, rather than seeing whether it can produce music that is more genuinely novel.
But Vico insists that these are early days. The possibility of generating new forms of music, perhaps by blending the rules of existing genres, is one of the prospects that excites him most.
Ugadi, by Iamus, on violin
Iamus’s ultimate value, however, might not be so much as a composer in its own right but as a factory of musical ideas, which human composers can mine for inspiration.
“In the future I think there will be two kinds of composer”, says Díaz-Jerez. “There will be those who admit to using the [Iamus] repository and those who don’t.”
You might be tempted to call this cheating – taking the output of a computer and calling it your own. But Diaz-Jerez argues that this would invoke a false idea of how music has always been composed. As well as using the aforementioned rules rather than some free flow of arbitrary ideas, composers have long borrowed ideas and fragments from one another. Several of J. S. Bach’s fugues in The Well-Tempered Clavier, often regarded as the epitome of his genius, use themes taken from earlier works. The other arts are no different either, with their constant mimicking of styles and themes.
Kinoth, by Iamus, on violin and piano
So delving into Iamus’s repository would be simply a routine extension of old practices. The truth is, Diaz-Jerez says, that composition is less the act of divine inspiration it is commonly perceived to be, and more of a methodical craft. Like all crafts, it often has to be produced to a deadline, and Diaz-Jerez says that the ready-mades offered by Iamus speed up the process considerably. One doesn’t have to use them intact, and he generally makes changes to effect improvements – a superfluous voice deleted here, a note altered there. But he finds that Iamus can already create compositions with great invention and complexity.
In fact Diaz-Jerez often finds himself personifying the software. Describing some of the riches at a recent meeting in Malaga, called Zero music: Music after the advent of the computer-composer, he was constantly (and tellingly) correcting himself: “What he – I mean, it – has done here is…”
And the fact that Iamus fools many listeners into believing its music is human means Iamus passes the musical equivalent of the “Turing test”, devised by computer-theory pioneer Alan Turing as a criterion for assessing whether a machine shows artificial intelligence: if you can’t tell the difference between the responses of a computer and those of a human, there’s no logical reason to deny it ‘intelligence’.
If you would like to comment on this, or anything else you have seen on Future, head over to our Facebook or Google+ page, or message us on Twitter.


Related stories


The smart multitasking drones of the future




The smart multitasking drones of the future


12 August 2014 Last updated at 09:11 BST


Drones are being put to military use by an increasing number of air forces around the world. But the future suggests these unmanned aerial vehicles could have many more uses as they become ever more sophisticated.  BBC Click's Marc Cieslak met with BAE Systems, to see the potential future military uses for drones and also learn how the technology is being adapted to help rescue people from dangerous locations and even prevent poaching.  Watch more clips on the Click website. If you are in the UK you can watch the whole programme on BBC iPlayer.

Share this story About sharing
Email
Facebook
Twitter
Related video / audio

Monday, August 11, 2014

Physicists make 'tractor beam' in water


Physicists make 'tractor beam' in water


Scientists in Australia have produced a "tractor beam" in a water tank.
They can control the movement of a floating ping-pong ball just by making a specific pattern of waves.
By changing the pattern, they moved the ball around the tank in various ways, including pulling it closer like the famous beam from science fiction.
The findings, published in the journal Nature Physics, have the potential to help contain oil spills or control and retrieve other floating debris.
"No one could have guessed this result," said Dr Horst Punzmann, who led the project at the Australian National University in Canberra.
"We have figured out a way of creating waves that can force a floating object to move against the direction of the wave."
Dr Punzmann and his colleagues used a very fast videocamera to record the water movements that resulted from a range of different shapes, plunged in and out of the water at various speeds.
They also covered the surface with floating tracer particles that allowed them to see the direction of currents on the water surface, which are distinct from the patterns of the waves themselves.
Bathtub science
Simply dropping a cylindrical wave-maker - a bit like a long rolling pin - in and out of the water, gently, produces a predictable set of waves undulating away from the disturbance. The current on the water surface also travels away from the middle of the cylinder.
But if the size of the up-and-down movement is increased, that wave pattern breaks up into choppier pulses. At the same time, the central current switches direction, so that something floating near the middle of the tank can be pulled back towards the wave-maker.
As well as this relatively simple "tractor beam" effect, the team created and modelled various other flow changes that meant they could effectively move a ping-pong ball around their tank at will.
"We can engineer surface flows of practically any shape," said Prof Michael Shats, the paper's senior author. "These could be vortices, these could be outward and inward jets - it's a variety of different flow configurations."
Prof Shats explained that his team started their tank experiments after they realised just how complicated the maths involved must be.
"We realised that particle motion on the surface, determined by waves, is far too complex to handle by any existing theory."
The researchers believe their discovery could be applied in open water. "The applications could be numerous," said Prof Shats said. "For example, collecting floating objects, manipulating small boats on the surface, or maybe collecting oil spills."
"It's one of the great unresolved problems, yet anyone in the bathtub can reproduce it," Dr Punzmann said. "We were very surprised no one had described it before."
Recreating the tractor beam at bath time could prove a rather exhausting challenge, however. The machine used in the lab created waves of precise heights at a rate of between 10 and 100 every second.

More Science & Environment stories

Saturday, August 9, 2014

USB 'critically flawed' after bug discovery, researchers say


USB 'critically flawed' after bug discovery, researchers say


Cyber-security experts have dramatically called into question the safety and security of using USB to connect devices to computers.
Berlin-based researchers Karsten Nohl and Jakob Lell demonstrated how any USB device could be used to infect a computer without the user's knowledge.
The duo said there is no practical way to defend against the vulnerability.
The body responsible for the USB standard said manufacturers could build in extra security.
But Mr Nohl and Mr Lell said the technology was "critically flawed".
It is not uncommon for USB sticks to be used as a way of getting viruses and other malicious code onto target computers.
Most famously, the Stuxnet attack on Iranian nuclear centrifuges was believed to have been caused by an infected USB stick.
However, this latest research demonstrated a new level of threat - where a USB device that appears completely empty can still contain malware, even when formatted.
The vulnerability can be used to hide attacks in any kind of USB-connected device - such as a smartphone.
"It may not be the end of the world today," Mr Nohl told journalists, "but it will affect us, a little bit, every day, for the next 10 years".
"Basically, you can never trust anything anymore after plugging in a USB stick."
'Chip' exploited
USB - which stands for Universal Serial Bus - has become the standard method of connecting devices to computers due to its small size, speed and ability to charge devices.
USB memory sticks quickly replaced floppy disks as a simple way to share large files between two computers.
The connector is popular due to the fact that it makes it easy to plug in and install a wide variety of devices. Devices that use USB contain a small chip that "tells" the computer exactly what it is, be it a phone, tablet or any other piece of hardware.
It is this function that has been exposed by the threat.
Smartphone 'hijack'
In one demo, shown off at the Black Hat hackers conference in Las Vegas, a standard USB drive was inserted into a normal computer.
Malicious code implanted on the stick tricked the machine into thinking a keyboard had been plugged in.
After just a few moments, the "keyboard" began typing in commands - and instructed the computer to download a malicious program from the internet.
Another demo, shown in detail to the BBC, involved a Samsung smartphone.
When plugged in to charge, the phone would trick the computer into thinking it was in fact a network card. It meant when the user accessed the internet, their browsing was secretly hijacked.
Mr Nohl demonstrated to the BBC how they were able to create a fake copy of PayPal's website, and steal user log-in details as a result.
Unlike other similar attacks, where simply looking at the web address can give away a scam website, there were no visible clues that a user was under threat.
The same demo could have been carried out on any website, Mr Nohl stressed.
'Trust nothing'
Mike McLaughlin, a security researcher from First Base Technologies, said the threat should be taken seriously.
"USB is ubiquitous across all devices," he told the BBC.
"It comes down to the same old saying - don't plug things in that you don't trust.
"Any business should always have policies in place regarding USB devices and USB drives. Businesses should stop using them if needed."
Universal Serial Bus (USB)
  • Standard method of connecting devices to computers
  • Popular due to its small size
  • Easy to plug in and install a variety of devices
The group responsible for the USB standard, the USB Working Party, refused to comment on the seriousness of the flaw.
But in more general terms, it said: "The USB specifications support additional capabilities for security, but original equipment manufacturers (OEMs) decide whether or not to implement these capabilities in their products.
"Greater capabilities of any product likely results in higher prices, and consumers choose on a daily basis what they are willing to pay to receive certain benefits.
"If consumer demand for USB products with additional capabilities for security grows, we would expect OEMs to meet that demand."
Mr Nohl said the only protection he could advise was to simply be ultra-cautious when allowing USB devices to be connected to your machines.
"Our approach to using USB will have to change," he told the BBC.
Follow Dave Lee on Twitter @DaveLeeBBC

More Technology stories