Forums > MaxMSP

Animata anyone?

December 11, 2008 | 4:05 am

So there’s lots on the web refering to using animata with MAX. But noting specific about how to communicate between them. Anyone got some pointers or even a sample patch? Would save me a lot of time. Thanks

James


December 16, 2008 | 11:23 am

ello,

yea easy, its using osc :)

look on the forum for osc to find how to send osc message from max ;)

good luck



MIB
December 16, 2008 | 6:10 pm

have a look here:

http://originalhamsters.com/blog/2008/12/15/animata-osc/


December 16, 2008 | 7:30 pm

Thanks for those pointers – great all good.

Posting the relevant contents to make life easier for others.

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, x and y are the position coordinates as float values:
/layerpos name x y

Moving a layer, x and y control the speed that the layer is moving:
/layerdeltapos name x y

Sending 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

Very basic patch to control 2 joints.

max v2;
#N vpatcher 72 44 672 444;
#P button 217 68 15 0;
#P window setfont "Sans Serif" 9.;
#P flonum 230 48 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 186 48 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 186 101 54 196617 pack 0. 0.;
#P message 186 135 88 196617 /joint arm $1 $2;
#P button 111 68 15 0;
#P flonum 124 48 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 80 48 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 80 106 54 196617 pack 0. 0.;
#P newex 44 163 32 196617 print;
#P message 80 135 90 196617 /joint neck $1 $2;
#P newex 80 163 120 196617 udpsend 127.0.0.1 7110;
#P window linecount 4;
#P comment 312 64 100 196617 this controls an animata file with two joints named neck and arm.;
#P fasten 2 0 3 0 85 156 49 156;
#P connect 5 0 4 0;
#P fasten 7 0 4 0 116 94 85 94;
#P connect 4 0 2 0;
#P connect 2 0 1 0;
#P fasten 8 0 1 0 191 156 85 156;
#P connect 6 0 7 0;
#P connect 6 0 4 1;
#P fasten 12 0 9 0 222 92 191 92;
#P connect 10 0 9 0;
#P connect 9 0 8 0;
#P connect 11 0 12 0;
#P connect 11 0 9 1;
#P pop;


December 17, 2008 | 3:50 pm

ello,

/layervis messge doesn’t work for me, you get it working??


December 18, 2008 | 8:35 am

No cant make any of the layer messages work! Checked on originalhamsters.com and they say this about PD –

"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. "

further down they say

"The /layervis doesn’t work here either. This was fixed in the svn version (>36)."

that maybe the problem – not sure what version im running but guess its not the snv as I cant see osc send box in the skeleton window.

Download it and try! Let me know how you get on.


Viewing 6 posts - 1 through 6 (of 6 total)