Carbon Monoxide Wallpaper

An artless nerd scribbling about nerdy art

Archive for the ‘Control Interfaces’ Category

Python and multitouch awesomeness

with 2 comments

Whilst idly procrastinating over the last couple of days I’ve come across two thing which are seperately very cool, and together even cooler.  I’ve been keeping track of the developments in homemade multitouch stuff for a while (fueled by the shocking awesomeness that is reactable), but always though it all looked like a bit of a hassle – uni work is restricting me to five minute hacks at a time currently.  That was all until I saw this video on instructables – literally a five minute ~£15 multitouch box.

Looks great huh?  It gets better – the box uses Touchlib, a c++ library for doing multitouch detection.  Touchlib does all manner of clever things (which I vaguely understand), but most interestingly it will now output TUIO messages.  TUIO is a subset of everyone’s favourite control protocol OSC (that post saying how awesome OSC is will come very soon).  It is literally a matter of running an executable and you have a webcam->TUIO  system up and running.  This lets you get x,y positions of each object, orientation data, and other fancy stuff with no hassle.

So why, as a very bad c++ programmer, am I so excited about this?  Well the second thing I found was this, a python library for interpreting the super-simple to create TUIO messages.  Now I’m no expert, but the sample code for pyTUIO looks very much to me like a Kamaelia component waiting to happen.  Stick in in a class, put in a yield statement and there you have it.  This is Webcam->Multitouch Interface->TUIO->Python->Kamaelia in very simple steps.  So simple I’m off to ebay to buy a webcam!  Hopefully you will see this working as a small aside from my Kamaelia Jam work, and see a multitouch box being used to make music with Jam!


Written by orphansandoligarchs

April 30, 2008 at 12:37 pm