When Johann Sebastian Bach died, he took his greatest masterpiece into the grave. This was not a piece of music that he never had the chance to write down, it was more, it was, in a sense, all of his music.
If you are able to improvise music in any style, you will notice that you don’t have to construct it in a laborious process. It just comes, it flows out. You can control it to some degree, choosing to go this way or that way where there is a choice, but you do not have to think about all the rules of harmony, melody or rhythm.
It is known that Bach was able to improvise polyphonic music on keyboard instruments. So he probably did not “construct” his music, thinking consciously about every single note, he could just play or write it.
In fact we all have a similar ability in speaking or writing. When we speak, we do not have to think about the rules of the language, we do not think: “no comes a noun phrase, now I have to put an adjective”. We might do so when we learn a foreign language, but when we speak a language fluently, it is all automatic.
Obviously, the grammar of the language has been turned into something like a program that we just call and that does everything automatically. And with music, it is the same. If you have learnt to “generate” music, you don’t have to think much, there is some kind of grammar, some program that you steer but that does most of the work automatically for you.
Bach had such a musical grammar in his brain, a structure able to produce all that wonderful music. And that structure was the real work of art he created, everything else was just its output, generated half-automatically in a process of improvisation. What is left of it are its traces, the imprints it left on the paper while rolling over it.
But there was more to this work of art. While improvising music, and while listening to music, Bach added new parts to that grammar bit by bit. The music he composed was getting more complex than the music that had existed when he started his career and that he learnt from his teachers or by studying scores.
The human mind may be seen as using algorithms, programs that can be just executed, like the ones we use when we speak or when we create music, but is also creating those programs, adding information we perceive and modifying them when we use them. And there is no limit to this modification. These cognitive structures can grow into anything, and the mind, although it might start with some innate structures in infancy, might move away from them completely into new realms never thought of before. The processes doing those modifications might themselves be thought of as some kind of program, but they also may be changed, so that there are no general laws of how our mind’s processes work. In this way, we are able to create completely new ideas and completely novel works of art.
From Bach’s works, it might be possible to reconstruct his musical grammar, partially at least, in a way akin to that of a scholar reconstructing the grammar of ancient Sumerian from the inscriptions on clay tablets. It might be possible to implement this grammar in the form of a computer program and let it compose new music. Those pieces of music would not be art, they would be the automatic output of an algorithm, but the algorithm itself could be viewed as a piece of art. But it would just be a partial reconstruction, a beautiful museum piece. The original is gone.
When Bach died, the quill fell from his hand and that living masterpiece of musical art shattered into pieces.