Generative Music Algorithms and Art

Project Year: 2017-2018

The algorithm’s primary objective is not to automate composition in existing musical styles but to provide tools for exploring new musical worlds. Generative music, by its nature, offers an opportunity to create music that doesn’t begin or end.

Jackson Pollock’s Number 1, 1949 continued to be between the times I saw it, and when I saw it again, I saw something new, something different, the painting never stopped existing, playing, between the months and years that passed between my seeing it. Unlike a physical art piece, most music has a beginning and an end, whether it's a track on my favorite album or a live performance. I wanted to see if I could create a piece with no beginning and no end, and the listener could stop back in for a visit, and between those visits, the music continued. The "visit" could be months apart, or the listener could tune in and out of the piece as it unfolded in place.

At the algorithm’s core is the total rhythmic and harmonic independence of each voice. It’s the musical equivalent of the atmosphere at the beach: crashing of the waves, relaxed conversations in all directions, the occasional laugh, seagull call that cuts through the distant classical rock emanating from a small speaker. Each sound source unfolds at its own independent pace, expressing an independent musical idea, but it also has the capacity to combine with other sources into a larger, wider texture.

In my listening experience, if the disparate sources continue emitting independent musical ideas regularly and consistently, the complexity of the resulting texture is reduced over time. It's possible to pick out the various components of the piece in a way that may be similar to looking at physical artwork -- the listener can zoom in on a single brush stroke, then move back and see how it contributes to the overall texture. 

The algorithm allows for each voice’s independence, rhythmic freedom. At the core of the generative algorithm are the many component algorithms, such as a tempo algorithm, pitch algorithm, velocity algorithm, and a musical scale algorithm. Each type of algorithm can have multiple implementations. For example, one implementation of the tempo algorithm may vary the tempo from slow to fast, and another may keep it constant. When designing each independent voice of a generated texture, various algorithms can be mixed and matched.
 
The key to the generative process is the decision making, where does the next rhythmic value come from, where does the next note come from, how hard should that note be played. The algorithm generates a series of instructions like “play middle C softly for a quarter note.” When generating a melody, the algorithm relies heavily on random, but limited, choices. For example, the “next pitch” algorithm maintains the state of the current melodic contour. In one of the "next pitch" algorithm implementations, melodic contours explore the simple Plainchant melodic progressions at the heart of all western melody (Messiaen 4:35). For example, a Plainchant contour could be “one note up, and one note down” or “two notes up and one note down.”
 
Messiaen, in his Treatise on Rhythm, Color, and Ornithology, discusses musical building blocks at the heart of both western and non-western music in the most inspiring and insightful way I'd ever come across. In addition to describing the Plainchant melodic intervals as a basis for melodic movement in western music, he presents 120 deci-talas (Messiaen 1:271), the exquisite ancient Hindu rhythms, as well as the captivating harmonic possibilities provided by symmetrical modes (Messiaen 7:101). Messiaen often played independent musical ideas against each other in his music. For example, In the third movement of the Turangalîla Symphony, he composes six independent musical ideas together (Messiaen 2:204). Building the algorithm would not have been possible without learning from Messiaen’s writings a generic view into core musical structures.

Project code is available on GitHub.

Resources