I decided to combine my two Quartz Composer plugins (Animata OSC and Månsteri OSC Sender) into one.
At the same time I fixed a major issue that had been there since I made the plugins. I’m using the VVOSC and VVBasics frameworks from http://code.google.com/p/vvopensource/ and I finally changed the class names to get rid of some errors when using the plugin with other software that uses the same frameworks.
What is OSCeleton?
“As the title says, it’s just a small program takes Kinect skeleton data from the OpenNI framework and spits out the coordinates of the skeleton’s joints via OSC messages. These can can then be used on your language / framework of choice.”
It works straight out of the box with Animata and many other software, but the OSC formatting is not compatible with Quartz Composer. So I made a little Max/MSP patch that converts the messages to a format QC understands. I will try to write a tutorial about how to get the whole thing running pretty soon. But here is a quick rundown.
There is a new version of the Animata OSC plugin available. I’ve had the Z-axis support working for a long time, but I’ve just been too lazy to upload it here. Also added the option to change the IP address and port numbers. Useful when you need to send OSC from QC to a different computer running Animata. You really shouldn’t touch the port, but decided to throw in the option to change it just in case.
Version 1.2 Changes
– Added the Z Position port for the Layer patch. That means you can now move layers in Z-axis too. (requires the latest version of Animata 004)
– Added the option to configure the IP address and port number. (Please test this one)
I also updated the VDMX plugins to have the Z Position option.
Please test this and let me know if you run into any problems.
I finally installed Snow Leopard this week on my MBP. I had some critical projects going on and couldn’t afford breaking anything.
So the first thing I had to do was to update my Quartz Composer Plugins to support Snow Leopard. There were some issues because QC 4.0 runs in 64bit and my plugins had only been compiled for 32bit. But now they should work. I still need to sort out a few issues (check your console for details), but everything seemed to be working fine when I did some tests. Let me know if you have any problems.
I just finished an OSC plugin for Quartz Composer that allows the user to change the IP, port number and address space dynamically through the input ports.
The current version does not support sending QC Structures as multiple values, but I am looking into ways of implementing it. Please let me know, if you come up with a good solution. Download the plugin and the soure code.
I started messing with my Animata OSC plugin for Quartz Composer and trying out different kinds of data I could feed from QC to Animata. The Audio Input patch is the obvious choice, so might as well get that over with first.
The first test. Just playing various samples and seeing how the communication works. Not very exciting, since I’m not using any images in Animata.
I will probably post something more interesting tomorrow. The point with this test was more to do something I’ve been meaning to do for a long time. That is to figure out exactly what is the frequency range of the different spectrum bands of the Audio Input patch.
Please note, I think the information below is not valid anymore. Maybe it never was. (Edited 26/5/2014)
My testing method was not the most accurate, but should be fine for this purpose. I just want to have a rough idea of what is going on. They way I measured this was by generating different frequencies with the Max/MSP cycle~ object and then seeing at what frequency the maximum value jumped from one band to the next one. Here are my results. The frequency is in Hz:
Band 0: 0 – 580
Band 1: 580 – 1000
Band 2: 1000 – 1500
Band 3: 1500 – 2000
Band 4: 2000 – 3200
Band 5: 3200 – 4800
Band 6: 4800 – 6140
Band 7: 6140 – 8230
Band 8: 8230 – 10300
Band 9: 10300 – 12380
Band 10: 12380 – 15110
Band 11: 15110 – 17880
Band 12: 17880 – 20000
There was no point trying to measure Bands 13-15 since they go over 20kHz and my sound card can’t handle that. Actually, in normal use – normal use for me meaning music visualizations – there’s not much point using the bands above 8, since the amplitude at those frequencies is barely noticeable.
Let me know if you are doing something cool with Quartz Composer and Animata.
I stumbled on the VVOSC framework yesterday and started messing around with it. It seemed really simple and I had a Cocoa application that sent OSC to Animata running in no time. So I decided to try to create a plugin for Quartz Composer that would allow me to send Animata compatible OSC messages. This wasn’t previously possible, because the default OSC sender in QC didn’t allow to send messages with mixed data types. The peeps over at vidvox forum have been trying to find a solution for some time now.
After a couple of hours and with some tips on compiling from vade, I had the plugin working!
I was really happy about that, because I really thought that writing plugins for Quartz Composer would be out of my skill range. It turned out to be pretty simple actually.
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.
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.
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.
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
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.