Is that Mozart or a machine? Software can compose music in classical, pop or jazz styles

Dec 16, 2011 by Kurt Kleiner

(PhysOrg.com) -- Steve Engels clicks on a file on his desktop and a classical piano piece flows out of his computer’s speakers. He lets it play for a minute or so, and then clicks on a different file. After a short wait, another very similar piece begins to play, echoing but not replicating the original.

The first piece was composed by Johann Sebastian Bach. The second was composed by a computer imitating the Bach piece.With time, a classical aficionado would be able to detect differences between the two: the computer piece lacks an overarching structure and there’s no sense of a musical idea being developed. But it is a surprisingly good imitation – and that’s exactly what Engels, a senior lecturer in the Department of Computer Science, and recent alumnus Daniel Eisner designed the to do.

“This tool allows people to find a piece of music they enjoy. They feed it into the software. It analyzes it and generates music in the same style in real time, forever,” Engels said.

To accomplish this, the program makes a statistical analysis of the original piece of music. Then, for each note it plays, it can predict the likely value of the next note – including its pitch, duration and where it falls on the beat – and choose the next note based on those odds. That note becomes the basis for the next note, and so on until the program is stopped. Similar rules allow it to choose appropriate chords, and even to make sure two musical “voices” – equivalent to the different parts played by two hands on the piano – don’t clash.

Eisner, who plays piano, saxophone and bassoon and also composes, says that the resulting music lacks the structure that a human composer or improviser would provide. But the music retains the flavour and character of the original. So far the program has reproduced ragtime, classical, jazz and pop, and it can do it either as a solo or as an ensemble of different instruments.

The two made a presentation about the program to the Game Developers Conference in San Francisco in March, figuring it might be useful for generating background music for video games. One of its advantages is that it can segue seamlessly from one type of music to another, which would be useful when a character transitions from one part of the game to another.

Eisner says other programs have used similar methods. But all those that he’s aware of have tried to generate music by programming in higher-level concepts, such as scale and chord construction, and by using pre-set rules rather than by letting the program simply predict one note at a time. But Eisner and Engels say the simple approach seems to work best.

Eisner isn’t sure if computers will ever make music to rival human composers: Music obeys mathematical rules, which computers are good at, but music is also an emotional expression, and machines are poor at mimicking that.

See if you can determine whether the musical samples are computer-generated or composed by a human:

Sample 1
Sample 2

Explore further: Microsoft beefs up security protection in Windows 10

add to favorites email to friend print save as pdf

Related Stories

Composing Music For the Next Generation

Nov 01, 2006

Georgia Tech professor and composer Jason Freeman is bringing his musical passion to the Internet and letting his audiences shape the music they’ll hear in performance. The Graph Theory Project is an online ...

Virus takes memories from cellist but leaves music

Nov 15, 2011

(Medical Xpress) -- At a recent meeting at the Society for Neuroscience in Washington DC, researchers revealed a case of herpesviral encephalitis that had destroyed areas of a 71-year-old cellist’s brain. The man, known ...

Physics strikes the right note with classical musicians

Dec 15, 2011

The combination of physics and music might usually prompt images of Brian Cox playing keyboards for D:Ream, but a new trio, consisting of a professor of physics, an internationally renowned composer and an ...

Music in the air

Aug 22, 2011

The days of sitting at keyboard with a pencil and a sheet of manuscript paper to compose music could be long gone with the development of software by researchers from Monash University’s Faculty of Information ...

Recommended for you

Microsoft beefs up security protection in Windows 10

18 hours ago

What Microsoft users in business care deeply about—-a system architecture that supports efforts to get their work done efficiently; a work-centric menu to quickly access projects rather than weather readings ...

Team infuses science into 'Minecraft' modification

Oct 24, 2014

The 3-D world of the popular "Minecraft" video game just became more entertaining, perilous and educational, thanks to a comprehensive code modification kit, "Polycraft World," created by University of Texas at Dallas professors, ...

Microsoft's Garage becomes an incubator of consumer apps

Oct 24, 2014

For five years now, The Garage has served as Microsoft's incubator for employees' passion projects, an internal community of engineers, designers, hardware tinkerers and others from all different parts of the company who ...

Students win challenge for real-time traffic app

Oct 24, 2014

Three University of Texas at Arlington Computer Science and Engineering students have won a $10,000 prize in the NTx Apps Challenge for a smart traffic light network that adjusts traffic light schedules to ...

User comments : 10

Adjust slider to filter visible comments by rank

Display comments: newest first

Isaacsname
not rated yet Dec 16, 2011
I'm going to say the first is the computer-generated track. The walking bass line accompaniment stands out aesthetically in stark/discordant contrast to the mood of the song as a whole.

rawa1
1 / 5 (1) Dec 16, 2011
It's rather sorta Photoshop modification of master canvas. The difference is minute and the original music piece still sounds more harmonically, at least for me.
finitesolutions
not rated yet Dec 16, 2011
I would be surprised if the first sample is algorithm generated.
The second sample sounds more robotic and seems to play on endlessly.
Or could be both computer generated and I would say the first sample is a better algorithm.
Husky
not rated yet Dec 16, 2011
ragtime is inherintly more breakbeat/jazzy than the other classical part, so the same algorhythm could have been used, the next level would be to not only make prediction on statistics based on the previous note, but combine that with weighted statistics of the original compositions over progressions over say 4 notes weigted with progressions over 8 notes, or maybe another set of notes, say 6 and 12, depending on the BPM statistics of the originals, also the BPM should be taken not as the average of the hole but as progressive sets, as to include the sudden dramatic tempo twists that many of the greater composers use.
vlaaing peerd
not rated yet Dec 16, 2011
They're both midifiles!!?

How am supposed to recognise a human if all has been quantised down to values of 128?

then again, computers will eventually be more precise in all expressive elements in music, we just have to learn how to use it.

Now invent a piece of software that can improvise in a sensible fashion. That would surprise me more then a good interpretation of a Bach piece.
Isaacsname
not rated yet Dec 16, 2011
So when are they going to tell us which is which ?

*drums fingers impatiently*
jan_tangring
not rated yet Dec 16, 2011
Very funny! They are both machine generated. The reason I am sure is that is some really funny stuff going on occasionally in both of those tracks. Seven seconds into the first there is a disharmony, at 30 seconds there is a syncopation oddly placed. The second track is disharmonuous at 1.09, and then everything goes haywire for a while. If you would edit those passages out? I still believe I would suspect both of being non-human. But I am not sure.
Deesky
5 / 5 (1) Dec 16, 2011
I concur, I think that they're both synthetically generated.

But this is far from surprising. Isn't most of the crap that passes for popular music these days generated robotically?
cartourt
not rated yet Dec 16, 2011
The first one is erratic and terrible, full of dissonance. The second one is CLEARY recognizable AND beautiful.
The fact that people in these comments can't tell the difference makes me sad for humanity.
You are mostly a bunch of musical idiots.
howarddavis3
not rated yet Dec 16, 2011
Cartourt: I hope that you are joking. I'll admit that I liked the first entrance of the fugue in the second example much more than the whole of the first. However, I recognize that that was not music generated by computer, but rather old JS Bach, himself. But then it goes quickly downhill when the second entrance of the fugue is generated by the computer. Well, this sure is encouraging. Its going to be awhile before computers take over the writing of music. (Except for those who can't tell the difference.)