Build Your Own Game of Life Sequencer in Processing: Video Featuring rwmidi
Game Of Life Sequencer in Processing from wesen on Vimeo.
Coding-for-artists tool Processing is already popular for visuals, but MIDI and sound have been a serious blind spot. Speaking of our friend Wesen of Ruin & Wesen, he has solved that with a new library called rwmidi, which makes MIDI programming far easier and more stable. He’s also solved the lack of proper Java MIDI support on Mac with the free OSXMidiSPI. You can download both from his site, under “Software > JAVA”:
Ruin & Wesen support downloads
Wesen today shares a screencast showing how you can build a sequencer using rwmidi and the classic Game of Life. For the record, the Game of Life dates all the way back to 1970 and British mathematician John Horton Conway. I really need to do some digging to track just how many computer musicians have applied the Game of Life to musical applications, but suffice to say, they’ve been doing it for quite some time – partly because you don’t need any computing power to make it work. Most recently, we’ve seen in synth form in the wonderful Reaktor ensemble by Lazyfish, Newschool (featured in Reaktor and included with the package), and as a kind of meta-effect from Audio Damage called Automaton.
What’s great about the Game of Life is that it helps you break out of endlessly-looping sequencers. Once you get the basic hang of this code, though, you’re by no means limited to the Game of Life. You could easily create other variations – perhaps a sequencer based on the game Breakout or Tetris, for instance. And this is a great introduction to using the rwmidi library if you prefer to learn from videos. Wesen promises more such tutorials in the future.
/* Buy links if custom fields not null and not in cat or search results */ ?> /* End Buy links if custom fields not null and not in cat or search results */ ?>








28 Comments
Leave a Commentrhowaldt
i had the same problem here as i did with Tiction: when using Reason, the gate would stay open en sound would continue to play while the pattern had stopped. i do not know much of Processing (just started), but looked through the code, applied some logic and wished for the best, and added a bit of my own code to implement a note-off event. and lo and behold, it worked. so for those who have the same problem, here’s the new code: http://lab.detrucker.nl/small.cat/game_of_life_adapted_code%20-%20note-off.txt
oh i made the screen twice as big as well, but you can change that to your own liking if you wish, at the top of the code.
September 27, 2008 @ 8:08 pm
rhowaldt
oh damn i forgot, the code has also been changed to send MIDI over channel or port 2 instead of 0. this is because on my PC MIDIYoke channel 1 is number 2 here. so you can change that as well, somewhere over there.
September 27, 2008 @ 8:10 pm
Richard
Good library. Poor documentation.
This library seems like it has potential, but the documentation is really poor. I cannot figure out how to access incoming CC message. Furthermore, the source code is not posted online for finding the answer.
Thank you for the tip though.
September 28, 2008 @ 4:30 am
wesen
yup sorry i have to write a few more examples, i’ve been super busy lately. The information you need is a bit “buried” in the documentation:
http://ruinwesen.com/support-files/rwmidi/documentation/MidiInput-plug-Object.html
Here’s the list of standard messages you can register yourself to receive.
September 28, 2008 @ 4:33 am
lematt
that’s ace !
thank you wesen
September 28, 2008 @ 7:30 am
jkant
Hey thank you man!
Sadly i can’t get midi output devices with rwmidi in Tiger 10.4.11 (i’ve also installed the latest java and osxmidispi in java extensions)…
September 28, 2008 @ 8:57 am
wesen
Hi jkant,
I’ll look into this. Can you tell me if you’re using PPC or intel, and which kind of USB interface it is? Does it work if you have no MIDI interface plugged in and just have the IAC driver activated?
Regards, Manuel
September 28, 2008 @ 9:40 am
jkant
Right, with no midi interfaces plugged in, i can see the IAC bus. It work!
I’m on intel core 2 duo.
Midi interfaces:
midiman oxygen8 midi out
NI rig kontrol midi out
If you need help to debug feel free to use me :)
ciao
September 28, 2008 @ 10:07 am
4lefts
hi,
excellent work – very useful just to show us processing ignorants how to implement life.
though, i am having problems with getting midi output to work. this:
MidiOutputDevice devices[] = RWMidi.getOutputDevices();
for (int i = 0; i < devices.length; i++){
println(i + “: ” + devices[i].getName());
}
prints only
0: Real Time Sequencer Sun Microsystems
1: Java Sound Synthesizer Sun Microsystems
but not IAC busses, or the to/from max/msp ports. any ideas? i’m on ibook g4 on OSX.4.11
September 28, 2008 @ 10:12 am
jkant
4lefts
please, try to unplug your usb midi devices and then listing ports…
September 28, 2008 @ 10:24 am
wesen
Yes it seems that there is trouble with some usb interfaces, i have a few of those not working so i’ll look into this. I mostly just use my own usb midi interfaces and they worked nicely. cheers, manuel
September 28, 2008 @ 10:31 am
4lefts
thanks for the help guys – still no joy though. i have nothing plugged in to my computer at all – just me and the laptop…
September 28, 2008 @ 12:26 pm
Phil
maybe you need something like midiyoke? something to route internal midi, that did it for me. and setting the right ports.
September 28, 2008 @ 11:53 pm
Peter Kirn
Yeah, I’m going to do a Windows MIDI loopback driver round-up soon (MIDI-Yoke, LoopBe, etc.) On Mac, go with the IAC bus — go to Audio MIDI Setup and enable IAC (double-click, check “enabled”)
September 28, 2008 @ 11:55 pm
4lefts
i know this isn’t really the place for me to debug my midiness, but here goes.
i don’t have any problems using the IAC busses between Live 7 and Max 5. it just seems the RWMidi library doesn’t see them. which is a shame, because i have a major woody for some processing midi fonk.
there’s a sentence i never thought i’d type.
September 29, 2008 @ 9:40 am
Peter Kirn
If you’re not seeing MIDI drivers on Mac, you probably haven’t installed the OSXMidiSPI. This is necessary because Apple does *not* properly support and maintain standard Java APIs and dropped MIDI support in their Java implementation. You’ll find that file, as I said, on the support download site above. You need to make sure you have it in the proper folder (see the instructions included).
September 29, 2008 @ 9:45 am
Coding a Game of Life sequencer in Processing | DiyUs.com
[...] In this informative example of ‘code-maker zen’, Wesen (of Ruin & Wesen) shows us how to code a MIDI sequencer based on Conway’s Game of Life in Processing. He uses some custom code to interface with MIDI – available as a free download here. [via Create Digital Music] [...]
September 29, 2008 @ 10:57 am
wesen
I suspect there is a subtle bug in osxmidispi and some usb devices. I don’t really know what it’s about yet but I will have a closer look tonight. Some devices don’t show up even if midiosxspi is installed.
I’ll drop a comment here when I have it sorted out :)
Cheers, manuel
September 29, 2008 @ 11:08 am
Seq. Tests « A1029
[...] Game of life Based seq. [...]
September 30, 2008 @ 2:12 pm
jkant
public void hope() {
while (notSortedOut()) {
checkCdmComments();
}
thanksWesen();
}
:)
September 30, 2008 @ 2:58 pm
wesen
jkant, can you try out http://ruinwesen.com/support-files/osxmidispi-0.1c.zip ? I tried it on a G4 with 10.4.11, with a BCR2000, an oxygen, an EDIROL midisport and 2 tahorng midi links plugged it at the same time, and it listed them all (including IAC driver). If just made pretty minor changes. If it doesn’t work at your place, we have to work something else out, can you then maybe contact me per email at wesen@ruinwesen.com ?
Cheers, manuel
September 30, 2008 @ 3:56 pm
4lefts
wooooooo! that fixed it. i can now use tiction properly as well. thanks manuel!
October 1, 2008 @ 4:16 pm
cycadia
inspired! now you’ve inspired me :)
October 6, 2008 @ 9:52 pm
Jim Bumgardner
Thanks for the tutorial Peter! For another example, here’s my Whitney Music Box, implemented in Processing, using rwMidi.
http://www.coverpop.com/sfiles/whitney_music.zip
October 17, 2008 @ 9:27 pm
Create Digital Music » Sonic Life, Organic Game of Life Sequencer, Hits iPhone and iPod
[...] Previous Game of Life goodness (an incomplete list): Build Your Own Game of Life Sequencer in Processing: Video Featuring rwmidi [...]
October 20, 2008 @ 3:18 am
Daniel
This is great stuff. It inspired me to create this :
http://www.openprocessing.org/visuals/?visualID=631
If the cell’s state is not just simply on or off, but a number in a range then you get all sorts of interesting musical runs and trills. You can also clearly see the connection between the colours and the sound.
November 14, 2008 @ 10:16 am
Create Digital Music » Help! I’m Trapped in an Acid-Colored Wash of a Thousand General MIDI Pianos!
[...] Build Your Own Game of Life Sequencer in Processing: Video Featuring rwmidi [...]
November 14, 2008 @ 1:33 pm
YJ
i will take credit for bringing up Peter’s awareness of the Lazyfish Reaktor ensemble.
Thank you.
May 6, 2009 @ 6:05 am
Leave a comment
RSS feed for comments on this post. TrackBack URI