April 21, 2009

quick little hacks with PD and OSC

Filed under: Uncategorized — aturley @ 8:53 pm
a little PD and OSC hack

a little PD and OSC hack

This is a little PD hack that lets you set a value using an OSC message. The OSC message comes in on port 5678, and has the following form:

/cmd [receiver] [value]

where “[receiver]” is the name of the receiver, and “[value]” is the new value. The unpack and repack are necessary to convert the first argument into a symbol.

If you have Python and the simpleosc library, you can set the value connected to “jesus” to 10 like this:

>>> import osc
>>> osc.init()
>>> osc.sendMsg("/cmd", ["jesus", 10], “127.0.0.1″, 5678)

April 18, 2009

touchy feely

Filed under: Uncategorized — aturley @ 12:50 am

A little while back Apple rejected an iPhone app that would have let you use your iPhone as a TUIO controller. There was a big discussion about the whole thing over at CreateDigitalMusic, with some people supporting Apple’s decision and others decrying it. Most of those who supported Apple seemed to feel that it was their store and they could damned well sell whatever they wanted. I tend to agree with this sentiment, but I still think that it would be nice to have a way to get an app onto the iPhone without having to get Apple’s permission.

At about the same time the discussion was taking place over at CDM, I was playing with a program called OSCemote on my brand new iPhone. OSCemote lets you create interfaces for your iPhone that can send and receive OSC messages. Interfaces are created as HTML documents, with snippets of Javascript doing the work of monitoring elements on the page and sending the messages. I began to wonder how hard it would be to use web app running in Safari as a multitouch interface.

I’ve been playing around with these ideas for the last month or so, and tonight I decided to go back to the issue that got me going on this train of thought. I took a look at the TUIO protocol and took a swing at creating a web app that would talk to a web server that would in turn send TUIO messages to other programs. I’m not sure I got all the details of TUIO right, but I think I have a workable first pass at something.

I’ve packaged the system up, and you can download it here. You’ll need Python to run the web server. If you have a Mac then you already have Python. Users of other operating systems may have to install it if it isn’t already there. You will also need some sort of program that can do something with the data. I’ve just been dumping it to a Pure Data patch. And you’ll need an iPhone or an iPhone simulator.

UPDATE (4/20/2009): The link now links to the new version which uses the 2Dcur profile instead of the 2Dobj profile. Thanks to Martin Kaltenbrunner for pointing this out.

April 9, 2009

Maker Fair(e) 2009

Filed under: Uncategorized — aturley @ 4:50 pm

Last year Tim, Mike and I built some big LED panels for Tim’s band Microfiche. Tim is a graphic/industrial designer, Mike is an electrical engineer, and I’m a programmer, and the project was a great way for us to bring all of our skills together to create something cool. Here’s some pictures of us (and some dear friends) during the build phase:
Those kids, with the soldering and the cutting.
Andy, Ben, and Mike keep it real.
Tim keeps it even realer.
And in this video you can see one of the panels during a show:

While we were working on the project we started to call ourselves Tricerabot, and the name stuck. This year we aim to have a Tricerabot booth at Maker Faire. Mike will have some new versions of his shifters with microcontrolled LEDs putting on light shows. Tim will have some of his new illustrations and designs (he does the Tricks of the Trade comic strip which appears monthly in Make Magazine). I might have some new interactive goodies (maybe some games or something).

And we’re working on a collaborative project to highlight the way our strengths complement each other. One plan is to use some wireless microcontroller boards to set up a proximity detection system. The system will be able to detect how far we are from the booth, and this information will be used to control a projected image. We talked about the image representing each of us as a different colored square that moves along an path, with the paths intersecting in the the middle. As the squares get closer and overlap, new images will emerge. Here’s a mock up of what we’re talking about:
tricerabot_colors

See you in San Mateo!

Powered by WordPress

On this site: