December 15, 2008
How to Control Animata With OSC from Max/MSP and Pure Data
NOTE! I am moving my website over to http://mansteri.com/. The commenting has been disabled on this site. You can find this same article with commenting and everything by clicking this link: http://mansteri.com/2008/12/animata-osc/.
If you haven’t heard of Animata yet, you should head over to http://animata.kibu.hu/index.html and educate yourself. Download the software and go through the tutorials. I also recommend reading through the mailing list, it has tons of useful information.
Controlling Animata with a mouse and doing real-time animations is pretty cool by itself, but Animata really shows its true potential when you control it with OSC. Then you can start doing something like this:
There is a Processing example available from the Animata site that controls Animata with sound input.
HOW DOES IT WORK?
Unfortunately, the Kitchen Budapest guys are busy improving the software and there isn’t really good documentation available about the OSC messages needed to control Animata. I’ll try to go through all of the available messages and give you some examples in Pure Data and Max/MSP
I assume that you know something about OSC, Pure Data and Max/MSP, because I don’t want to write a huge post explaining everything from the beginning. I’m also assuming that you have spent some time learning the basics of Animata.
One more important thing. I’m using revision 35 of Animata compiled from the svn repository. NOTE! YOU WILL NEED TO COMPILE ANIMATA FROM THE SOURCE CODE TO MAKE THE /LAYERPOS MESSAGES WORK. IT IS NOT AVAILABLE IN THE BINARY VERSION ON THE ANIMATA WEBSITE. All the other messages I’m showing here do work with Animata 003 that is available from the site. OK, let’s start.
DOWNLOAD MY EXAMPLES. Contains the Animata Scene + Max and PD patches.
FORMATTING THE OSC MESSAGES
All incoming messages to Animata must be sent through port 7110. The “name” in the message refers to the name of the joint, bone or layer.
Moving a joint, x and y are float values:
/joint name x y
Control the length of a bone, value is a float between 0 and 1:
/anibone name value
Switch on and off a layer, on_off is 0 or 1:
/layervis name on_off
Set the transparency of the layer, value is a float between 0 and 1:
/layeralpha name value
The next two messages require the svn version:
Moving a layer in absolute mode, x and y are the position coordinates as float values:
/layerpos name x y
Moving a layer in relative mode, x and y is the amount of pixels you want the layer to move from it’s current position:
/layerdeltapos name x y
PURE DATA TO ANIMATA
I’m not really comfortable with Pure Data, but I was able to get all of the messages working except /layervis. I believe this is because Animata is very picky and is looking for real boolean values and Pure Data is sending integers when sending 0 or 1. This was just fixed by the Kitchen Budabest guys. The /layervis message works now. I have updated the code so please download the .zip again. You need to compile Animata again from the svn for this to work.

Pure Data to Animata with OSC from Matti Niinimäki on Vimeo.
There is a little problem, because Animata needs float values in the messages and Pure Data doesn’t have a separate number box for floats, so have to make sure the number you are sending is never an even number. I did this by multiplying the values by 0.999. If someone knows a better way, let me know.
MAX/MSP 5 TO ANIMATA
It’s pretty much the same deal with Max/MSP. The /layervis doesn’t work here either. This was fixed in the svn version (>36). My Max-patch has been updated so please download again.

Max/MSP to Animata With OSC from Matti Niinimäki on Vimeo.
I didn’t add the /layerdeltapos to the example patches, because it’s really easy to lose your layers somewhere outside the window.
SENDING OSC FROM ANIMATA
There is also an option to send OSC messages from Animata. For this you need the SVN version. It simply works by clicking on the small OSC tick box on the Skeleton tab. The messages are sent through port 7111. The message format is: /joint name x y

QUARTZ COMPOSER
I’ve made a plugin for Quartz Composer that makes it really easy to control Animata from Quartz Composer. Check it out over here.
HOW ABOUT OPEN FRAMEWORKS, PROCESSING ETC.
Basically, any software or programming environment that is able to send OSC messages should be able to communicate with Animata.
Processing works perfectly and you can download the Sound Input example from the Animata website that will get you started. I’ll see if I can find the time to do a similar sample file for Processing also.
I’ve also had luck testing OpenFrameworks. Download the FAT version of OpenFrameworks and modify the oscSenderExample.
WHAT CAN YOU DO WITH THIS?
Whatever you want! Hook up audio input, MIDI controllers, sensors or computer vision to control real-time animations.
Check out my Mickey Mann project for an example on how to control Animata with an Arduino.

I updated the Animata scene. It was missing the arm and the mouth. So please download again if you are having problems.
Comment by Månsteri — December 15, 2008 @ 6:03
I updated the .zip once again. The Animata svn version was updated with a fix to the /layervis issue. So download and compile the svn version again if you want it to work.
Comment by Månsteri — December 15, 2008 @ 20:04
[...] How to Control Animata With OSC from Max/MSP and Pure Data [Original Hamsters] [...]
Pingback by Create Digital Motion » Demos and Tutorials: Live Control of Open Source Animation in Animata, even with a ViewMaster — December 15, 2008 @ 21:39
[...] Todo completito en Original hamster [...]
Pingback by animata gehioo « teKnotRaKiTanA — December 16, 2008 @ 21:18
[...] read more at createdigitalmotion.com and originalhamsters.com [...]
Pingback by temporary Very Important Things » Blog Archive » animata - real time animation editor — December 19, 2008 @ 11:49
I’m used with motion apps but don’t know anything about programming… Can you explain what do you mean with compiling from SVN version and how to connect the patch to Animata? (just open the 2 apps?) I opened your OSCTutorial in Animata and tried to control trough your patch in Pd Extended but seems not to work. I also had some system crashes! (Tiger) when trying to trigger some messages… Moreover I think that a iPhone connection (trough Oscemote/Mrmr/OscTouch..) tutorial would be also appreciated.
Thanks for your work.
Comment by Adler — December 27, 2008 @ 18:26
Compiling from the SVN version means that you would need to download the Animata source code from http://code.google.com/p/animata/source/checkout
And then you would need to compile it according to these (rather limited) instructions http://animata.kibu.hu/doxygen/
It should work with the version downloadable from Animata. Just open the 2 apps and then in PD click the message box that says “connect 127.0.0.1 7110″ I think you need to modify all the number boxes to get rid of any initial error messages.
With system crashes I can’t be really much of use. What is causing the crashes? PD or Animata? Check your console log for some information.
I was thinking about doing an iPhone/iPod Touch tutorial also. Or maybe even writing a custom iPhone app for working with Animata.
Comment by Månsteri — December 30, 2008 @ 15:02
Have you got this working with Oscemote on the iphone/ipod touch? I’ve been trying to figure out osculator but I can’t get it set up right.
Comment by thescreamingdrills — February 16, 2009 @ 2:50
So I gather if FLTK is needed to compile animata (which seems to be mac & Linux only) I can not compile and thus run your example on windows???
Comment by Combover — February 19, 2009 @ 2:03
Combover, as far as I know, fltk is available for windows also. Don’t know anything about compiling Animata with a Windows machine, though. You could also just use the Animata 003 binary available on the Animata website and it works with most of the stuff I have on the PD and Max patches.
thescreamingdrills, I have used the multitouch controls of OSCemote with Animata. I set up Max/Msp to convert the messages. I’ll try to see if I can use make it work with osculator. I’m crazy busy right now, so I can’t promise to upload anything soon.
Comment by Månsteri — February 19, 2009 @ 6:36
[...] http://originalhamsters.com/blog/2008/12/15/animata-osc/ [...]
Pingback by interesting links « Digital Art & Technology — March 4, 2009 @ 18:15
Hey thanks so much for all the help with Animata and MaxMSP. Things work like a charm. I wanted to know if there is a patch for Eyesweb which sends out OSC Data between MAXMsp and Animata. I’m a student and working on a GOD Project similar to the Reverse Shadow Puppet Theatre.
Would really be grateful if you could help or point me in the right direction… Thanks in Advance.
Comment by Sahal Merchant — March 7, 2009 @ 18:54
I have never used Eyesweb, since I don’t have a Windows machine, but this link came up on the Animata mailing list. http://animata.kibu.hu/download/oscman_WDM_video_input.eywx
This might need something in between Eyesweb and Animata to reformat the OSC messages. I think I’ve read from somewhere that Eyesweb isn’t able to send the proper messages straight to Animata.
Comment by Månsteri — March 7, 2009 @ 19:07
[...] on a local udp port. I already have a Processing example running (by using the commands from http://originalhamsters.com/blog/2008/12/15/animata-osc/) so I’ll probably write about it in a next post.. [...]
Pingback by Real time animation with Animata « Kr3l’s Turf — March 12, 2009 @ 23:45
[...] all kinds of goodness from his secret Finnish “ninja hideout,” working on projects like controlling real-time animation with Mickey Mouse’s head with the aid of [...]
Pingback by Create Digital Music » Beat Blender: Actual Osterizer DJs with Real Fruit, Max, Ableton Live — March 18, 2009 @ 16:16
Any way to use animata with the Processing program?
Comment by comeswithfries — May 5, 2009 @ 2:02
@comeswithfries Sure you can use Animata with Processing. You need to download the oscP5 library for Processing though http://www.sojamo.de/libraries/oscP5/
The Animata website has a sound input example for Processing in the downloads section.
Comment by Månsteri — May 5, 2009 @ 4:30
when i try and load that eyesweb patch i get
ERR> Error loading patch “C:\downloads\oscman_WDM_video_input.eywx”: The item specified was not found in the collection.
ERR> Class identifier (ClassID) of the searched item was “{3897339F-60B4-11D4-A28A-CF461A886A4A}”.
any ideas?
Comment by Leon Trimble — June 12, 2009 @ 15:36
@Leon
I have no idea. That’s just a link I got on the mailing list. Never tested it. I saw your post on the list. Someone else might be able to help you there.
Comment by Månsteri — June 12, 2009 @ 15:58
[...] from hungary. which is about creating a tool for realtime animation. now long time after i read a post connecting this to the use of osc. OSC or open sound control is something ive already briefly [...]
Pingback by animata - a new link in the face projection project - antima55 — December 4, 2009 @ 0:46
[...] Controlling animata with OSC from Max/MSP and pure data. [...]
Pingback by Beautiful Motion Graphics Created With Programming: Showcase, Tools and Tutorials | Web Design Cool — February 9, 2010 @ 4:29
[...] Controlling animata with OSC from Max/MSP and pure data. [...]
Pingback by Beautiful Motion Graphics Created With Programming: Showcase, Tools and Tutorials « Top 10 Web Hosting — February 10, 2010 @ 1:25