[WIP] AI Variation on the Devil's Trill

May. 16, 2022

The Devil’s Trill Sonata was the piece that got me seriously interested in classical music. If the piece intrigued me, the story surrounding it ensnared me.

The complete story is told by Tartini himself in Lalande’s Voyage d’un François en Italie: One night, in the year 1713 I dreamed I had made a pact with the devil for my soul. Everything went as I wished: my new servant anticipated my every desire. Among other things, I gave him my violin to see if he could play. How great was my astonishment on hearing a sonata so wonderful and so beautiful, played with such great art and intelligence, as I had never even conceived in my boldest flights of fantasy. I felt enraptured, transported, enchanted: my breath failed me, and I awoke. I immediately grasped my violin in order to retain, in part at least, the impression of my dream. In vain! The music which I at this time composed is indeed the best that I ever wrote, and I still call it the “Devil’s Trill”, but the difference between it and that which so moved me is so great that I would have destroyed my instrument and have said farewell to music forever if it had been possible for me to live without the enjoyment it affords me [(shamelessly stolen from wikipedia)](https://en.wikipedia.org/wiki/Violin_Sonata_in_G_minor_(Tartini).

This story has captivated many who tried to come up with their own interpretations of the piece from Kreisler, Pavanello, Manze, Benedetti and so on. I don’t think anyone has any reasonable expectation that they’ll find the original version that Tartini heard but the exercise itself is very interesting because there’s no ground truth. There was a talk by a mathematician (that I can’t find anymore) who mentioned that math was a lot like playing chess with the devil. You know you’ll lose, but every time you lose, you tease out the truth and learn something.

So how do we proceed? How much should we maintain from the piece that was originally published? Should we try to mix in different styles? Should we try to combine the above interpretations? I’m thinking about procedurally generating new pieces largely because I’m curious to see how we can stretch the limits of AI (todo link to blog post about work with reinforcement learning in minecraft) and consequently learn more about our brains in much the same way that the engine taught us more about thermodynamics.

For the first question: How much should we maintain from the piece that was originally published? We can keep the timbre or the rhythm.

I will continue this blog in a bit. I don’t mean to publish something unfinished but it would be nice to get feedback on this while I work on it.