The new version of MondrianPM implements most of the features of MondrianLive.
Check out the paper and poster for ICMC 2006.
Most MIDI sequencers and music description languages organize music in long lines that are stacked on top of each other, like this:
This approach mimics the traditional notation, but I would like to work in a more flexible setting. To wit, I would like to create music by lining up a few notes sequentially, stacking such lines on top of each other, aligning such stacks sequentially, stacking the resulting compound objects on top of each other, etc. In other words, I would like to structure music like one of Piet Mondrian's paintings.
Mondrian is an attempt to create a language that supports the expression of such structures, as well as a set of tools for using Mondrian code when recording or performing. Some features:
Let's express a simple canon, Frère Jacques, in Mondrian. Here's the code that yields the first four notes:
2 > 2 > 2 2< 2
Here's the beginning of the second line ("dormez-vous"):
(2> 2 > 2 > 1)
The next line begins like this ("sonnez les matines"):
4> 3 > 3 < 3 < 3 < 2 2< 2
Since there's a lot of repetition in the song, let's define some macros that represent the basic building blocks:
!(2 >2 >2 2<2)!fj # frere jacques !(2>2 >2 >1)!dv # dormez-vous !(4>3 >3 <3 <3 <2 2<2)!slm # sonnez les matines !(2 3<2 3>1)!ddd # ding ding dongThe contents of macros are enclosed in exclamation marks, and the name of the macro follows the second exclamation mark. Some of the spaces that appeared above have been left out for compactness (the syntax is designed to be rather flexible that way). Comments begin with # and extend to the end of the line.
Now we express the entire melody in terms of these macros:
fj fj dv dv slm slm ddd ddd
2fj 2dv 2slm 2ddd
Let's introduce more voices; we're dealing with a canon, after all.
2fj [2dv | 2fj] [2slm | 2dv | 2fj] [2ddd | 2slm | 2dv | 2fj]The first voice starts all on its own. After the first two measures (2fj) the second voice comes in. The opening bracket [ remembers the current time t0. We enter the third and fourth measure of the first voice (2dv). The vertical bar | takes us back to time t0, such that the first two bars of the second voice (2fj) are stacked on top of the third and fourth bars of the first voice. The closing bracket ] indicates the end of this stack. The time is now the end of the fourth measure of the first voice. The remaining lines introduce more and more voices.
This example illustrates the basic idea in a nutshell: We have macros that contain sequences of notes. Then we stack such sequences on top of each other, and finally we align the stacks after one another. This procedure can be iterated indefinitely, giving structures like Mondrian's paintings.
Here's the finished product:
!(2 >2 >2 2<2)!fj # frere jacques !(2>2 >2 >1)!dv # dormez-vous !(4>3 >3 <3 <3 <2 2<2)!slm # sonnez les matines !(2 3<2 3>1)!ddd # ding ding dong 160T 2fj 2dv 2slm 2ddd 2fj [2dv | 2fj] [2slm | 2dv | 2fj] [2ddd | 2slm | 2dv | 2fj] [2ddd | 2ddd | 2slm | 2dv] [2ddd | 2ddd | 2ddd | 2slm] [120T ddd 100T ddd | 2ddd | 2ddd | 2ddd]The line 160T chooses a tempo of 160 beats per minute. The last line changes the tempo to 120 bpm (resp. 100 bpm) for a little ritardando at the end.
This example only shows the most basic features of the Mondrian language. We could now do the usual MIDI stuff, e.g., assign different instruments to the voices, use pitch bend or other effects, etc. There are also a few less obvious variations: Since we're only defining notes in relative terms, we can shift the entire thing to the key of A minor by adding the characters 2< at the top of the file. We could also switch to some entirely exotic scale.