How are Markov chains used in music

Flow machinesThinking melodies further

In his small office, François Pachet commutes back and forth on the swivel chair. On the right of the PC, he activates the software with a few clicks of the mouse. The researcher, a jazz musician in his spare time, twirls to the left and improvises a few bars on the midi keyboard. The PC program responds immediately to Pachet's improvisation with similar sounds.

Another example? Behind the seemingly magical interplay between musician and machine is pure mathematics. But before going into the technical details, the scientist first explains the basic idea of ​​his PC program.

"With great creators like Picasso, Paul McCartney or Marcel Proust, it is noticeable that they often play with the styles of their predecessors. They master them from FF."

Pachet sees creativity in creating something new out of the old by bending it. The first approach to achieve this creative process by means of software was a program developed by Pachet years ago, called 'Continuator', which answers musical specifications autonomously, at random. Now he went a step further. Because the researcher wanted a tool for targeted compositions, for works in the same style. This is what the Flowmachines software aims at.

The Flowmachines program can recognize different musical styles. The software works mainly with midi - from the music keyboard or from a midi database for jazz and classical music. The software can now also process audio data, but this process is far more complex.

"Among other things, the software counts the notes and chords of the music that I specify. It creates sequence data. This data is then processed into a computer model. And this serves as a framework for the software when it automatically continues the melody."

Pachet's work is based on so-called Markov chains: calculation models with which the Russian mathematician Andrei Markov ushered in probability theory in the 19th century. Thanks to Markov chains, for example, the behavior of people in the canteen queue can be assessed as well as the development of the stock exchange price. François Pachet, on the other hand, works with the so-called controlled Markov chains, Markov constraints, so that the freely developed music does not slide into arbitrariness but, for example, ends on a given note.

A piece of music or, even better, many pieces of music by a composer serves as a template for the software. Incidentally, this also works with literature. The program can further compose texts and, as a side effect, try to uncover plagiarism.

But let's stick with the music. With a few clicks of the mouse, François Pachet gives John Coltrane's jazz classic Giant Steps a completely different style. The Flowmachines program redesigns the jazz melody: with the typical style elements of Richard Wagner.