Projects

Lacrimis Ex Machina

Music Composition
Python

Script for generating algorithmic MIDI notation using Python.

Notes on pitch and harmonic organization for the Lacrimis Ex Machina script.

While taking part in a mentoring program at work, my mentor suggested I try developing my programming skills by applying it to music. I’ve been writing music by way of algorithm since grad school, and the prospect of automatic that process using scripting, while tempting, always felt daunting to me. But with her insistence, I decided to take the leap.

The result is imperfect, but interesting. I was able to create arrays of different sizes and scan through different subsets of those arrays to create notation that was both self-similar and ever-changing. There’s still much room to explore here, but there’s also a lot of promise. It also provided some insight into how I could approach other tools (like Orca or Ornaments and Crimes’ sequencers) to similar ends.

As for Python, I gained much better control of how to construct and navigate data structures in new ways. Python is already very forgiving compared to a language with strong type-casting, like C or Java, so there is plenty of room to try to push those boundaries further in this context, or to employ constraint in a client-facing setting so as to avoid an error from surfacing unexpectedly.

You can download and listen to the result here. I had to cut out a couple of empty seconds (while silence is absolutely a meaningful sonic event, even in the context of this composition, the unaltered script output provided too much too early in the piece), but otherwise, the notivic content is nearly entirely intact.