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.
Not many people know this, but Concordia University in Montréal also has a toon department deep inside the maze that is known as the EV building. The university officials would prefer to keep this knowledge as a secret, since the brutal self torture that goes on inside the faculty would shock many people. In the same way that the Average Joe or Jane does not want to know where the meat inside his/her burger comes from, no-one really wants to know the shocking truth about the stories behind your Saturday morning dose of laughter.
When watching cartoons, people rarely think about the amount of time and dedication the cartoon characters spend on perfecting their sketches and routines. Unfortunately, consumers love to see toons getting hurt. There is just something special about dropping heavy anvils on the heads of unsuspecting cartoon characters that appeals to the majority of viewers.
Like in all fields of entertainment, the competition in the cartoon business is also very harsh. You are only as good as your last fall from a huge cliff. That´s why all the aspiring cartoon students at tooniversities across the world practice new and inventive ways of getting themselves hurt.
A group of activists from PETT (People for the Ethical Treatment of Toons) have been able to sneak a spy camera inside the Tooniversity facilities at Concordia University. Because of their brave action, all the dirty secrets inside the Tooniversity will be exposed. Please go to http://tooniversity.originalhamsters.com to find more information and sign a petition to stop this madness.
Here is a quick solution on how to get the analog inputs from an Arduino into Quartz Composer. For now, this only supports the analog values. Reading the digital input pins is not hard to implement, but I still haven´t decided what is the best way to do that.
Sending serial data from QC to Arduino is a little bit trickier, but I will definitely try to work on that also.
What do you need for this to work?
The Kineme Serial patch for Quartz Composer. Available here:http://kineme.net/release/SerialIO/20091206 (You will need to register and check the “I would like to beta test new and updated patches.” box in your user profile.)
Some people have probably tried to use my tutorial on how to use SMS text messages with Quartz Composer. There were actually some errors in the php code in my tutorial as the wordpress WYSIWYG editor is actually a IWFUYBPWC (I will f*ck up your blog post with code) editor so it might not have worked for you. It’s fixed now. Thanks to Amon Robe for pointing this out.
Next week, I will be taking part in the Mobil/And workshop in ESADSE in Saint-Etienne, France. I was planning content for my speak during the workshop and came up with a rather cheap and robust way of using SMS text messages in Quartz Composer.
Previously, I had been able to come up with a hack that involved BluePhoneElite, AppleScript and iTunes to send SMS to Quartz Composer. I used this for example in the FF>> Media Festival last fall, but it was really awkward solution and you could only have the information of the latest message. So, I had to think of some better way.
This time around, I’m using the excellent Cocoa UltraSMS to send my SMS messages to a MySQL database. Then I’m using a small php-script to convert the database into an XML file which can be easily read and manipulated in Quartz Composer. Here’s how you do it:
WHAT DO YOU NEED
Computer running Mac OSX (I’m on an early 2008 Macbook Pro)
Mobile phone with bluetooth (I’m using Nokia 6103)
Ok, let’s start. First of all, you need to create an empty MySQL database. For the purpose of this tutorial, I’m going to call my database sms_database.
2nd STEP – Cocoa UltraSMS
Then you need to download and install Cocoa UltraSMS. Setup your phone to connect with it and also insert the information of your database to the fields. Your settings will be different, of course.
After you click OK Cocoa UltraSMS will ask you if you want to create tables for your database. Click OK and and after that hit Start to connect to your phone. Now you can test the connection by sending yourself an SMS. The SMS In counter should increase and if you have Growl enabled you should also see the message in the Growl window.
3rd STEP – PHP lovin’
Now we need to somehow convert the information in the database to an XML file. I’m really far from being a PHP expert, but even I was able to do this, so if you have even a little bit of experience in PHP this shouldn’t be too hard. I used this tutorial to help me.
Here is the PHP code that you will need to upload to your server in order to make this work.
EDIT: As it seems to be almost impossible to paste any working code on WordPress as the WYSIWYG editor f*#%s it all up, I’ve decided to upload the code as a separate file. Download the .txt file here, modify the database settings and rename it to whatevernameyoulike.php. (Can anyone point me to a WordPress plugin that disables all the “intelligent” modifications the editor makes? I’ve tried a few and none of them work perfectly.)
I’m using those just to display the Scandinavian letters properly. This really can’t be the best solution to do that, but it works for now, unless you want to use smilies that is. I’ll have to see how and where I should change the encoding settings to get this display properly without this hack.
Now it’s just a matter of what to do with the data you receive from the messages. I have a bunch of different applications in mind. You will probably hear from them pretty soon. I just got this thing working today, so I haven’t had the time to test all the possibilities.
Of course, this same technique can be used to access SMS data from various other applications that can read XML files like Flash, Processing etc. I just used Quartz Composer as an example because it’s the environment I’m most comfortable with.
That’s it. Hopefully this is helpful to someone. I’ve seen many interactive installations where SMS messages are used, but I haven’t seen good documentation on how to do it anywhere. Feel free to comment here or email me if you have any improvements or questions.
Here’s some documentation of a project we finished this spring at the university. It’s a project for a course in interface design.
Our group (Aku Meriläinen, Danilo Mascarenhas, Marjukka Parkkinen and Matti Niinimäki) decided to create a multi-user interface that would allow a group of people to work together or compete in creating some sort of a moving collage. At some point in the planning process the idea of communism and propaganda came to surface, so we decided to go with that idea. We experimented with different input devices and visual styles, but eventually this is what came out of it.
I’d like you to meet The Interactive Propaganda Generator. It’s designed to have two different sides or “teams” – the communists and the capitalists – that you can control with different input devices to produce a collage of the two sides shooting different items and symbols at each other. The scene consists of three layers: a changeable background, two characters (one for each side) and the propaganda-tubes. Here are the controls explained:
Control 1 – ReacTIVision fiducial tracking
The characters are selected and moved around on the screen by using paper dolls on a glass table
You can change the bodies and heads of the characters.
Included are all your favourite capitalist and communist icons from Ronald McDonald to Che Guevara
The paper dolls have fiducial symbols attached to their backside and the camera under the table tracks the ID and the position of the symbol
You can move the capitalist propaganda-tube around the screen with the dance pad
One button turns the tube on/off
Two buttons for changing the ammunition of the tube (missiles, bibles, money)
Two buttons for changing the background image
One button for activating the speech option for the capitalist character
Control 3 – PlayStation2 Dual Shock Controller
Some controls as the dance pad, but for the communist side
Control 4 – Audio Input
A microphone picks up the voices of the users and when the speech option is activated (from the dance pad or dual shock controller) the characters on screen will open and close their mouths based on the sound input
Here’s the hardware setup. Click the image for details. All programming done with Quartz Composer. I could release the .qtz file but it’s not really useful to anyone because it depends on a very specific setup. Email me if you’re interested in details.
And finally some video. Unfortunately, we don’t have any better footage of the system in action but hopefully you’ll get some idea.