Translation of Stephen Wolfram's post (Stephen Wolfram) " Music, Mathematica, and the Computational Universe " about the wonderful resource WolframTones , whose work was recently resumed on the new Wolfram Cloud site (the website created in 2005 was unavailable for a couple of years because solutions not supported by modern browsers).
I express my deep gratitude to Kirill Guzenko for his help in translating.
How difficult is it to create human music? To pass the musical analogue of
the Turing test ?
Although music usually has a certain
formal structure , as noted by the Pythagoreans 2500 years ago, in its essence it is very
human : a reflection of pure creativity, which is the essence of a defining characteristic of human abilities.
But what is creativity? Is this what was necessary during the whole biological and cultural evolution? And can it also exist in systems that have nothing to do with people?
')
In my work on the book
A New Kind of Science (
A New Kind of Science ), I explored the computational universe of possible programs and found that even very simple programs can show remarkably rich and complex character, along with, for example, what can be found in nature. And, based on the developed
principle of computational equivalence , I came to the conclusion that there can be nothing that fundamentally distinguishes our human abilities from any processes that occur in nature, or even in very simple programs.
But what about music? Some people, speaking out against the principle of computational equivalence, used their belief that “
simple programs that can produce serious music ”
cannot be used as an argument.
And I was curious:
is music really something special and exclusively human? Or is it still possible to perfectly create it automatically, using calculations?In 2003, after a dozen years of my reclusive work on
A New Kind of Science , worldly problems gradually ceased to be alien to me, and one of them was that the ringtone on my cell was like everyone else. So I thought:
if some kind of original individualized music can actually be created automatically, then you could just change all the tunes on your mobile, and everyone would have their own .
After some time, we decided to experiment with the possibilities of creating music using programs.
It turned out a long history of attempts to create music by the rules. Most of the results seemed too “ robotic ” or random. But what I came to in A New Kind of Science seemed to give us new opportunities, because there it was convincingly shown that even with the rules of simple programs you can create such complex and living things that we observe in nature and which we admire .
We started with the simplest experiment: we took cellular automata so familiar to us ( Wikipedia article ) and used fragments of the patterns they produce to form a score. I had no idea what we would get as a result. And, of course, some cellular automata with simple behavior patterns produced absolutely boring music. However, to my surprise, there was no need to go far in the computational universe behind a cellular automaton, generating very rich and pleasant fragments of music.
The fact is that behind logic in music there is always some kind of simple program. But the key to A New Kind of Science is that the main program can be simple, but produce a rich and complex picture .
But will this be aesthetics? As for the visual part, I have long known that cellular automata can produce something very entertaining and interesting. And given the fact that we knew about cellular automata, it was not particularly surprising. Because I knew that they could catch the essence of many processes in nature. And since we find aesthetic nature, the same should be true for cellular automata.
But while nature uses only a few certain kinds of rules, the universe of cellular automata is infinite. In a sense, the computational universe summarizes our real universe. It contains the basic mechanisms, but allows for an infinite number of variations, each with an aesthetic that generalizes the aesthetics of our world.
In the early 90s, Mathematica acquired support for sound generation . And, with all the power of a symbolic language, Mathematica becomes the ideal platform to implement our algorithms and start creating music. The results significantly exceeded even our highest expectations. We used ideas from the theory of music to dress the still “naked” cellular automata, and very soon we created orchestral musical passages, and they sounded surprisingly good.
People passing by our office, hearing the music being played, often stopped and asked: “ What song are you listening to? ” We made music that was good enough for people to consider it made by people; we can say that we have successfully passed the analogue of the Turing test for music.
Well, we recently finished making the Wolfram Tones site. And many began to use it. I have to say that I thought it was just an interesting experiment, and maybe a good way to create simple melodies, that is, nothing serious was expected from the point of view of music.
But I was wrong. Pretty soon, various composers began using the site. They tell us that they found it useful as a source of ideas and inspiration for their compositions. It was a bit strange. We began with the fact that we questioned the inability of computers to achieve something close to human creativity. However, people experienced in their field turned to our automatic system to search for something that, one might think, is exceptional for a person: creative inspiration .
I considered this a good test of the principle of computational equivalence. As one researcher put it: " It is worth hearing the music produced by simple programs, as they begin to look much more like us ."
In the computing world, each program actually defines its own artificial world - whose sounds and logic we perceive in the music it reproduces. Some of these worlds are boring, barren lands that breed dull and monotonous music. Others abound in randomness and noise. However, one of the hundreds or thousands of programs carries something beautiful: rich, textured, sometimes familiar, and sometimes exotic musical forms.

( Listen to the audio corresponding to this cellular automaton)
On the Wolfram Tones website, you can click on all sorts of buttons, looking for music at random, which fits into the concepts of the various musical genres we define. The site also gives the opportunity to gradually change the rules for musical fragments, giving the opportunity to send music by artificial selection in the right direction. When you use Wolfram Tones , it feels like you are photographing nature. We explore the computational universe in order to find the very places, the very programs that carry the meaning and aesthetics that we need.
The Wolfram Tones site was launched on September 16, 2005. And so, since then he is on the Internet and with the help of Mathematica creates music. I must confess that I have not watched its logs for some time. However, looking there now, I discovered that it was used tens of millions of times to create tens of millions of musical compositions.

( Listen to the audio corresponding to this cellular automaton)
By the standards, for example, using Wolfram | Alpha is nothing. But for musical compositions, this is a huge number. Itunes currently contains about 14 million songs and represents the majority of what has ever been released. But in just a few years, Wolfram Tones has created more tracks. Using only computation, he in some sense surpassed our view in creating musical production, alone creating more original music than all the time before him.
In order for the result to be output instantly, the site encodes the music in MIDI (what Mathematica now supports directly in symbolic form ). Many Wolfram Tones tracks in MP3 format were created. A complete redistribution of roles can be called a case when I went to a concert a few years ago, where people played violins, a piece completely created with the help of Wolfram Tones .
Can simple programs completely create a whole symphony? The compositions in Wolfram Tones tell us some stories from the computing world, which have a duration of perhaps no more than a minute. Judging from my experience, in order to create a larger fragment — one that tells us a longer story — we will need higher-level structures. However, we do not have any obstacles in creating a simple program that would provide such a structure. The main story can be absolutely complete, like many other stories that sound the music of nature in our world.
However, how much can you get from so small? What is the shortest program that creates some interesting piece of music?
It is very easy to start creating programs in Mathematica :
Sound[ Map[ Function[ SoundNote[DeleteCases[3 * Range[21] * Reverse[

( Listen to the audio corresponding to this cellular automaton)
Sound[ Map[Function[SoundNote[#, 1 / 6, "Warm"]], Map[Pick[{0, 5, 9, 12, 16, 21}, #, 1] &, CellularAutomaton[30, {{1, 0, 0, 0, 0, 0}, 0}, 13, {13, 5} ] ] ] ]

( Listen to the audio corresponding to this cellular automaton)
And we plan to have a competition to see how good results can be achieved, especially using various modern algorithmic tools like image processing , which are available in Mathematica. But ultimately, we cannot rely here on human creativity alone. After all, we want, in essence, to automate creativity, to go beyond what people could imagine, and not just explore the computational universe in search of interesting programs and ideas.
When creating music, we can work at the level of notes, a combination of notes or even sound signals, summarizing the ways of constructing pleasant for humans signals that traditionally used physical music devices (or their digital counterparts).
Of course, creativity in the computational universe is not limited to music. There was, for example, quite a lot of research about fine arts and architecture. Can we create a building using just one simple rule? If so, then the very logic of the structure of the building will be able to tell us a lot about ergonomics.
Could automatically created things, such as music or whatever, be truly valuable to us? Or do we always need a story linking what we see with the whole body of human culture? Returning to the above, our understanding of nature makes it clear that there is no need for human history. Instead, it seems necessary to link with a certain all-encompassing logic, which, in essence, is precisely what the concept of the computational universe provides.
When I look at Wolfram | Alpha, I am thrilled by the joy of realizing how much human knowledge can be captured and made computable. A new frontier - to capture not only knowledge, but also creativity. To be able, for example, to achieve a certain goal, to understand the creative way to achieve it. Music is the essence of pure creativity, and what we have learned, as the principle of computational equivalence suggests, that even in this area, things like Wolfram Tones are amazingly good at getting a creatively rich result.
We want to embody a higher level of automation, thereby dramatically expanding creative possibilities, which, without a doubt, will add many exciting new opportunities.