MusicXML to Grasshopper
We can model a musical composition using native Grasshopper components. After the experiments with the timer component (here and here), I managed to build a definition that allows us to produce outputs in various time intervals. I converted a small part of Bach’s Bouree in E-Minor into Grasshopper as a guitar tablature.
I used Guitar Pro 5’s MusicXML export function to convert classical guitar tablature into XML data, then organized that file in Excel to suit my data tree design in Grasshopper. The Vb.net script is freaking small here just sending number “1” out again and again… The tempo of 90 (90 hits in 1 minute) and a minimum of half notes, which means there “could” be 180 beats in one minute. To be brief, I have to scale the speed of tablature at a minimum of 3 beats in 1 second. That is an excellent part of Bach’s music, solid, intended to be faster but still exploratory at varying tempos. Here is how I re-modeled MusicXML in Excel to make data understandable in Grasshopper:
Above is GuitarPro tablature (left), exported to Excel in MusicXML format (right).
and finally, the timer component flows guitar notation into Grasshopper:
Here is the Grasshopper file; [GHX: 0.8.0066] I’ll work on a geometric output along with the song. We can change the timer intervals and see the song at different speeds. And of course, the second layer of the tablature (that is the lower notes following the melody) should be added. This can now be done by copying another couple of lists containing other strings and frets. This means, we can add as many guitars as possible to the same time configuration, and they would play all together!!
Yes, I know it is not an automatic process of getting real-time audio data into Grasshopper to make it rock and roll, but in fact, design with computational methods is not just to make things faster or even better, in contrast, we need a designerly consciousness to allow us to get slower and deeper, having a different kind of crafting in a digital environment. Maybe not having audio, but the mathematics behind it is better for now.
“Music is the hidden arithmetical exercise of the soul unconscious that it is calculating.”
Gottfried Wilhelm von Leibniz
I call architecture frozen music.
Attributed to Johann Wolfgang von Goethe and Friedrich Schiller
Talking about music is like dancing about architecture
Steve Martin