Python, live MIDI, and the Yamaha Disklavier Mark IV Pro
The above video contains clips of a rehearsal for my piece Stengel, to be performed tomorrow in New York. It is for pianist and Disklavier, a modern interactive self-playing piano. It was created entirely using open source tools: the Disklavier (player piano) runs linux, the external computer runs linux; it was written mostly in Python; and the score was written using GNU Lilypond.
- concert information
- facebook event
- tickets (Carnegie Hall Box Office)
Program Notes:
Henry and I met at Juilliard through our mutual interest in mechanical music. I am honored to have been asked to compose this first piece for him. It is a tribute to Werner Stengel, the world’s foremost roller coaster engineer, and is inspired by his desire to extend the possibilities of human experience through technology. As with a roller coaster, this piece has a singular goal: an exhilarating ride. Unlike Risset’s work performed tonight, the software side of Stengel was not realized in Max/MSP, the lingua franca of interactive computer music. Instead it was written in Python, a general purpose programming language. Others are free to extend the work; the score is released under a Creative Commons Attribution License, and all of the source code is released under the terms of the GNU GPL. I am especially thankful for the help of Henry and Yamaha Artist Services.
The piece is in four movements: the first is a study of cellular automata, the second a study in decay, the third a set of recursive “motive extenders,” and the fourth a set of triggerable effects.
I was reluctant to use Python at first, but after tests I realized that possible latency and jitter issues were comparable to PD. There is no perceptible latency when the Disklavier plays loudly, so at full volume it is possible to double a human in perfect unison. While the Disklavier can spectacularly exceed the abilities of a human pianist, it is as yet unable to transcend the laws of physics; softer notes are considerably slower to respond because the hammer must travel slower to play them. Thus the piano’s inherent uneven latency is a source of many more tears than Python GC-related jitter.
Graphical patcher-based dataflow languages like PD and Max/MSP are well suited to music, and I ended up reimplementing many of their features (patchbay as object digraph, scheduler, handy music-related utilities) in Python for Stengel. I will release everything here GPL’d when I get a chance to clean it up after the show.
import audience
new blog
I started this blog to share python music code from these past few years.