Screencast 8: Animata Scene Renderer for Processing

Michael Forrest
Thu 15 Jan 2009

Screencast 8: Animata Scene Renderer for Processing

Hi Q: box.net/shared/static/ruo8uukevb.mov

Yep. I ported the Animata rendering engine over to Java so that I could integrate the figures from Animata into a Processing applet.

The music you hear is all being played on my MicroKontrol through the 'Grimonium'. All this software is open source, and I'd be very happy if anybody wanted to collaborate with me (or you get me to do a project for you!).

processing.grimaceworks.com/animata
processing.grimaceworks.com/grimonium
processing.grimaceworks.com/microkontrol

Cast: Michael Forrest

55 comments on "Screencast 8: Animata Scene Renderer for Processing"

alba says

January 15, 2009 18:23

amazing! i'm going to use :)

Darren E Cowley says

January 18, 2009 04:54

Hi Michael,

I've downloaded all the items you've suggested, i haven't a clue what to do with them though?

I want to emulate the onscreenness of Grinomium to show the effects i have allocated to each of my pads on the microkontrol per scene (selecting them by the tempo wheel) whilst emulating the screen text changes you showed on your screen cast and the light changing when for example i press a pad it changes the led's red for the controls that are linked to that effect.....

Cheers
D

ps this is my first foray into anything more complex than bomes!

Michael says

January 18, 2009 12:23

Hi Darren, thanks for having a go at getting started, it's good to see people starting to dive in :)

Let me think...

Okay, so the first thing to understand is that the Grimonium library switches your MicroKontrol into 'native mode', which means that you no longer have access to 'scenes' as defined by the hardware - it is now entirely controlled by software.

I haven't implemented the ability to use the pads to send MIDI note data (yet) - only to trigger clips (and monitor them via LiveAPI). I will add this feature in soon though. To get started, I think you need to get the whole setup doing something, and then I can start to implement the features you want, with the knowledge that you will be able to get it to work :)

The first thing you should do is to try to get the software to run. You'll need Processing (<a href="http://processing.org" target="_blank">processing.org</a>). I've just uploaded a new release of the grimonium library (0.1.6 - <a href="http://processing.grimaceworks.com/grimonium/" target="_blank">download</a>) that includes APIMidi so you can install that into Ableton.

Once you have Processing installed, and you've added the Grimonium and MicroKontrol libraries into your (sketches)/libraries folder, when you restart Processing you should see the examples in the processing File menu. Try running the LiveSet example to start with. (It's very unlikely to work straight away, but don't give up!). You'll need to edit the example's config.xml file to listen on the right MIDI channels before you get anywhere. I've tried to make the Processing error messages relatively useful - it will list the available midi ports if it doesn't find everything it needs.

Keep replying on this thread with any issues and hopefully we can get you up and running, and I can start to work on making this whole thing a bit easier to use :)

Michael Forrest says

January 18, 2009 12:23

Oops - I don't seem to allow links on my commenting system - you'll have to copy and paste!

Darren says

January 18, 2009 14:06

Thanks Michael,

A bit to be getting on with, i'll let you know how i get on!

Cheers
D

Darren E Cowley says

January 22, 2009 15:07

Hi Michael,

Right i think i've got the things i need in the right places but when i run the Kive Set sketch it tells me that i;m missing oscP5

Where would i find that?

Cheers
D

Michael says

January 22, 2009 15:17

Cool, good work. Oscp5 is a third party library- find it via google.

Darren E Cowley says

January 22, 2009 15:23

Wow now i'm getting somewhere!

Grimomium is now on the screen but it can't find my microkontrol, where do i need to change the code to see it? I have the error message below...

ps thanks for the help i'm a complete novice as you can tell!

Cheers
D

OscP5 0.9.3 infos, comments, questions at http://www.sojamo.de/oscP5


### [2009/1/22 20:26:47] PROCESS @ OscP5 stopped.
### [2009/1/22 20:26:47] PROCESS @ UdpClient.openSocket udp socket initialized.
### [2009/1/22 20:26:48] PROCESS @ UdpServer.start() new Unicast DatagramSocket created @ port 12000
### [2009/1/22 20:26:48] PROCESS @ UdpServer.run() UdpServer is running @ 12000
### [2009/1/22 20:26:48] INFO @ OscP5 is running. you (192.168.0.2) are listening @ port 12000
Couldn't find hardware!
Available interfaces:
INPUTS:
Real Time Sequencer Sun Microsystems
OUTPUTS:
Real Time Sequencer Sun Microsystems
Java Sound Synthesizer Sun Microsystems

If you can see your device ports in the list above, do the following before instantiating MicroKontrol, substituting the correct port names (regular expressions work):
MicroKontrolHardware.input_device_a = "PORT A(.*)KORG INC.";
MicroKontrolHardware.input_device_b = "PORT B(.*)KORG INC.";
MicroKontrolHardware.output_device = "CTRL(.*)KORG INC.";

Note that you can still use the MicroKontrol class as normal even if the hardware unit is not connected.
Sending Animata stuff to 192.168.0.2
Couldn't find device matching IAC Bus 1
INPUTS:
Real Time Sequencer Sun Microsystems
OUTPUTS:
Real Time Sequencer Sun Microsystems
Java Sound Synthesizer Sun Microsystems

Michael says

January 22, 2009 15:50

Can't see your Microkontrol in the MIDI inputs- it's definitely plugged in, right? What operating system are you on, by the way?

Darren E Cowley says

January 23, 2009 02:20

Hi Michael,

I'm using 10.4.11

I've checked my MicroKontol and it's definitely connected, i can also use it in Live, it inputs on port 1,2,3 and outputs to 1 & 2.... They're also named in that manner as opposed to A,B & C will this matter? Oh and it's connected via USB if that makes any difference.....?

Cheers
D

Michael Forrest says

January 23, 2009 06:02

Should be fine over USB (mine is connected via USB). For some reason it seems that Java isn't picking up your MIDI ports - it's only finding

INPUTS:
Real Time Sequencer Sun Microsystems
OUTPUTS:
Real Time Sequencer Sun Microsystems
Java Sound Synthesizer Sun Microsystems

but that list should contain all of your other ports too!

See if you can get the basic RWMidi example to work - it's here http://ruinwesen.com/support-files/rwmidi/documentation/sketch1.html

Darren E Cowley says

January 23, 2009 18:36

Hi Micjael,

Well running RWMidi, doesn't seem to do much bar open a small blank window, but at lest there's no error messages.... is this the behaviour i should expect?


Cheers
D

Michael Forrest says

January 24, 2009 12:13

Darren
Really no idea why RWMidi wouldn't be picking up your controller -have you tried the examples bundled with the MicroKontrol library? (They're a bit more straightforward - simple mapping to faders etc)

I have been working hard on the Grimonium over the last few days, and have just put up another release. Can you try downloading the latest microkontrol and grimonium libraries?(processing.grimaceworks.com/grimonium
processing.grimaceworks.com/microkontrol)
Now it doesn't die when it can't find the microkontrol, so you might be able to play with the (limited) computer keyboard control to see if you can get the hang of the xml. Up/Down arrows switch songs, keys
1234
QWER
ASDF
ZXCV
operate the pads.

Michael Forrest says

January 24, 2009 12:15

AHA! Did a quick google and found that you have to install the Mandolane libraries from here http://humatic.de/htools/mmj.htm in order to get RWMidi to work properly..

Darren E Cowley says

January 24, 2009 14:55

Hi Michael,

Thanks for persevering with me....

I;ve now got installed Microkontrol, grinomium and oscP5 along with mmj and rwmidi into my sketchbook folder, however rwmidi and mmj don't show up when i launch processing....?

Running liveset results in the output below which is loads more errors than before so maybe i'm getting somewhere??

Cheers
D

OscP5 0.9.3 infos, comments, questions at http://www.sojamo.de/oscP5


### [2009/1/24 19:54:42] PROCESS @ OscP5 stopped.
### [2009/1/24 19:54:42] PROCESS @ UdpClient.openSocket udp socket initialized.
### [2009/1/24 19:54:43] PROCESS @ UdpServer.start() new Unicast DatagramSocket created @ port 12000
### [2009/1/24 19:54:43] PROCESS @ UdpServer.run() UdpServer is running @ 12000
### [2009/1/24 19:54:43] INFO @ OscP5 is running. you (192.168.0.2) are listening @ port 12000
OscP5 0.9.3 infos, comments, questions at http://www.sojamo.de/oscP5


### [2009/1/24 19:54:43] PROCESS @ OscP5 stopped.
### [2009/1/24 19:54:43] PROCESS @ UdpClient.openSocket udp socket initialized.
### [2009/1/24 19:54:44] ERROR @ UdpServer.start() IOException, couldnt create new DatagramSocket @ port 12000 java.net.BindException: Address already in use
### [2009/1/24 19:54:44] INFO @ OscP5 is running. you (192.168.0.2) are listening @ port 12000
Couldn't find hardware!
Available interfaces:
INPUTS:
Real Time Sequencer Sun Microsystems
OUTPUTS:
Real Time Sequencer Sun Microsystems
Java Sound Synthesizer Sun Microsystems

If you can see your device ports in the list above, do the following before instantiating MicroKontrol, substituting the correct port names (regular expressions work):
MicroKontrolHardware.input_device_a = "PORT A(.*)KORG INC.";
MicroKontrolHardware.input_device_b = "PORT B(.*)KORG INC.";
MicroKontrolHardware.output_device = "CTRL(.*)KORG INC.";

Note that you can still use the MicroKontrol class as normal even if the hardware unit is not connected.
Couldn't find device matching IAC Bus 1
INPUTS:
Real Time Sequencer Sun Microsystems
OUTPUTS:
Real Time Sequencer Sun Microsystems
Java Sound Synthesizer Sun Microsystems

Exception in thread "Animation Thread" java.lang.NullPointerException
at rwmidi.RWMidi.getInputDevice(Unknown Source)
at grimonium.MidiThing.getInput(MidiThing.java:8)
at grimonium.Ableton.<init>(Ableton.java:56)
at grimonium.Ableton.init(Ableton.java:164)
at grimonium.Grimonium.boot(Grimonium.java:55)
at grimonium.Grimonium.<init>(Grimonium.java:47)
at LiveSet.load(LiveSet.java:57)
at LiveSet.draw(LiveSet.java:63)
at processing.core.PApplet.handleDraw(PApplet.java:1406)
at processing.core.PApplet.run(PApplet.java:1311)
at java.lang.Thread.run(Thread.java:613)

Michael Forrest says

January 24, 2009 16:44

still not picking up your interfaces. restart?

Darren E Cowley says

January 24, 2009 18:57

Tried that and unfortunately nothing changed.....

Any ideas? Should i have IAC bus's set up?

Cheers
D

Michael Forrest says

January 24, 2009 19:06

You will need IAC buses set up but it seems nothing's showing up at all in your list of MIDI interfaces. Try setting them up anyway - you'll need to at some point anyway. Set up 3 Virtual Ports. You need to set up the APIMidi control surface to transmit on Virtual Ports IAC Bus 3 for any clip triggering to work.

More support on your mysterious lack of buses my be available here: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=os_libraries_tools;action=display;num=1221028175

Darren E Cowley says

January 25, 2009 04:57

Well it looks like i might have to give up the ghost on this one.... No wi can't rvrn use the microkontrol editor to change the parameters of my microKontrol, i press transmit and nothing happens!

Arrrggghhhh!!

Cheers
D

Darren E Cowley says

January 25, 2009 06:50

Having just looked in my midi preferences for Live....

mmj src appears as an input and output....?

Cheers
D

Michael Forrest says

January 25, 2009 06:54

Hmm - seems it's time to step up the support.. Darren, do you have a Messenger address (pref. google talk, but any service is fine)?

If you reply to this and put it in the email field (which nobody but me can see) then I will contact you on messenger and we can talk a bit more real-timey...

Darren E Cowley says

January 25, 2009 06:58

I'm on facebook?? Any good?

Cheers
D


Darren E Cowley says

January 25, 2009 14:41

Yes....!!!

Now i've got the microkontrol showing it's actually in the right mode, and i can use the main encoder to scroll through the songs in the .xml file....

It doesn't appear to have the on screen visuals shown in the screencast though so i'm downloading the grinomium files again as i think i deleted too much....

Where would i go to read about how to code my own set-up?

I'm hoping that per scene i can code different messages to the first 5 lcd screens (per encoder <green> and per fader <red> ) The last three encoders and faders (5 - 8 <orange>) i'm gonna have in permanent control of the control surface stuff ie what rack is in focus at the time.... (hopefully that'll still work with grinomium as it's just a matter of having microkontrol as a control surface with the correct in's and out's and then have the faders and encoders transmit the right midi messages on the right channels....

The pads on the other hand i'd like to get transmitting midi messages which change per song and their effects eg. reverse, distort, scratch, are then displayed visually on the grinomium interface....

It took me about 3 months before i was finally happy with my farmpad config so i'm expecting a long gestation period as i fiddle....

Thank you again for all the help it's much appreciated and i can't wait to get the full power out of the Micro!

Cheers
D

Michael Forrest says

January 25, 2009 14:58

Glad to hear you've made some progress!

Now... the visuals are a whole other thing.... I have just updated the animata library and uploaded it to processing.grimaceworks.com/animata

Load the 'Forest' example - that should present you with some visuals.

I would suggest doing a 'Save As...' of that set.

Now command+k to get to the data window, and then edit the set.xml file in Xcode.

As yet there is no reference material I'm afraid, you'll just have to tinker!

Also, note that I have not yet added anything other than clip triggering (via APIMidi) capabilities to the pads. I will probably need that feature sooner or later, and the best way to submit requests for improvements is to use the floating feedback link on the right hand side of this page. You can help me prioritise features by requesting and voting for them.

In the meantime, fiddle with the mappings.xml file in the Grimonium, and the set.xml file in the AnimataPlayback projects and see what you can achieve.

To create new visuals, you need to use Animata (available from animata.kibu.hu -- takes a bit of getting used to :))

Good luck!

Darren E Cowley says

January 25, 2009 15:12

Ahh by visual i meant the ones of what is linked to what pad and the encoders state etc, rather than falling leaves (i'm a long way off of that....)

I finally got xcode downloaded only to find it's for the wrong version of osx so i'm stuck with editing in the text file instead.....

I'll try and get the liveset going so i can tinker properly, are there bits you want to remove from the xml files?

CHeers
D

Michael Forrest says

January 25, 2009 15:58

ah ok... sorry - I guess that would have been pretty good going..

I am doing another release - I'd recommend starting from BasicSet intead of LiveSet now - I've just spent a few minutes adding some notes that vaguely explain the usage in the xml. You should see the pads and encoders in the visual though...

Go to here processing.grimaceworks.com/grimonium but make sure it's v0.1.8 that you end up with! (it's still uploading as I type this)

Michael Forrest says

January 25, 2009 17:14

by the way - you shouldn't need to download xcode -it comes on a disc with your mac - you should have a working version that you can install from there.

Darren E Cowley says

January 25, 2009 17:51

I'll get on diggin gout that disc tommorrow, i'll have it somewhere....

Love the new xml by the way, i'm sure i can tinker happily with that...

\I'm still getting the response belwo though when i run the basic set, should i run anything else or is it running every file i need it too already??

http://pastie.org/370577

Cheers
D

Michael Forrest says

January 25, 2009 18:01

You should be able to get rid of that last error by editing config.xml. At the top you'll see

<live_api out="IAC Bus 3" in="IAC Bus 3"/>
<ableton in="IAC Bus 1" out="IAC Bus 2" ...

Change the live_api in and out to the port names you set in the APIMidi controller settings.

Change the ableton in to the port on which Ableton is transmitting note messages (not sure that's actually used at the moment though), and out to the port from which you are receiving track and controller messages in Ableton.

I can't find the pastie with your list of port names or I'd be more specific - it gets matched as part of the string so you shouldn't have any problems.

Darren E Cowley says

January 26, 2009 04:24

Fantastic, I'll be on this when i get home.... Training salespeople to use SAP today which is fun!

Had a thought about how i'm going to fully utilise it and it came to me that having the pads transmit midi messages (and asking you to develop that!) would be limiting in that it wouldn't update as i change my live set in the way you show that the clip names come through API from Live....

Instead is it possible to having the grinomium fire Midi Clips instead of Audio? With some use of LAunch Type, trigger gate etc... I can utilise Grimonium as the ultimate Dummy Clips bank!!! And bring all of my effects control to live from the MicroKontrol!

Cheers
D

Michael Forrest says

January 26, 2009 05:43

Yep MIDI clips are exactly the same as Audio clips to the Grimonium. Just send the right track + scene values and it'll work.

Working on trigger/gate today maybe..

Darren E Cowley says

January 26, 2009 06:00

"Working on trigger/gate today maybe.."

I expect i'll find this out when i get home, i just assumed that the Grimonium would launch the clips as per their launch status within Live?

Oh and why "Grimaceworks?"

Cheers
D

Michael Forrest says

January 26, 2009 06:06

Well yeah the trigger / gate stuff works within Live like usual -but at the moment the triggering from the pads is toggle-based - ON sends a play message to a clip, OFF sends the CC message to stop that track playing (as defined within the config.xml file).

This means I need to add a retriggering mode to cover the simpler case where you just want to fire off a clip once (i.e. the current system assumes you're using loops).

It's called Grimaceworks because I scowl when I code ;)

Darren E Cowley says

January 26, 2009 06:23

I get ya (on both counts!)

I take it from my digging that the picture file type supported is .png?

If so fantastic....!

Cheers
D

Michael Forrest says

January 26, 2009 06:26

I think jpg will work too, but it's nice to have the transparency of a png. The picture gets tinted the current song colour- look at the example pics to see the format and size that works best!

Darren E Cowley says

January 26, 2009 07:48

Excellent, I've got some stylised dna pictures that i'm going to use....

https://www.dna11.com/estore/dna-portrait.asp

Cheers
D

Darren E Cowley says

January 26, 2009 15:56

Hi Michael,

I've got my APiMIDI set up in Lives preferences as the below...

<live_api out="IAC Bus 3" in="IAC Bus 3"/>
<ableton in="IAC Bus 1" out="IAC Bus 2" ...

I Still get the same error message each time though...

My microKontrol you coded for me as....

MicroKontrolHardware.input_device_a = "microKONTROL - Port 2 KORG INC.";
MicroKontrolHardware.input_device_b = "microKONTROL - Port 3 KORG INC.";
MicroKontrolHardware.output_device = "microKONTROL - Port 2 KORG INC.";

I think i'm confused....! (easily done!)

Cheers
D

Darren says

January 29, 2009 08:19

Hi Michael,

Guessing your away or i've "bugged" (get it) you too much....

Gonna have some free time at the weekend if you can help me with the above i can get down to configuring my xml....

Cheers
D

Michael Forrest says

January 29, 2009 10:59

Nah - it's just that you tried to contact me when I wasn't at the computer and this is more of a real-time help thing, so I was waiting for you to pop up on Facebook..

Darren E Cowley says

January 29, 2009 11:08

Fantastic, when iget the chance to escape downstairs i'll launch facebook chat!!

Cheers
D

Darren E Cowley says

January 31, 2009 04:13

Hi Michael,

All we've been playing with is Midi isn;t it, is there any reason why my Live is now only outputting a high pitched whine instead of music? Re-downloading it from Ableton to see if a reinstall changes anything but i haven't used it since i installed xcode etc....

Any ideas?

Cheers
D


Michael Forrest says

January 31, 2009 08:30

Seems my hacked version of rwmidi fixed the problem - get it here for now http://www.box.net/shared/8yolegmq9j

Michael Forrest says

February 12, 2009 09:18

Hmm, seems APIMidi works differently with different minor versions of Ableton 7. I get clip data back via MIDI in Live 7.0.1 but not Live 7.0.14.

I guess I'm gonna have to write some damn Python to fix this now....

Darren E Cowley says

February 12, 2009 09:21

I only recently upgraded live as well, i don't think i've got the earlier versions on the system....

Have you got a beta for 8 yet? Guessing your on line most of the time to catch it when it's open?

Cheers
D

Michael Forrest says

February 12, 2009 11:15

I don't tend to get involved in the betas really.

Here's some code to test the APIMidi connection: http://pastie.org/387155
Fix the port names and add in your OS 10.4 Java Midi import.

When you press '1' you should see the clip data from whatever clip is in track 1, scene 1.

When you press '2' you should see data coming in every time something happens with that clip.

Darren E Cowley says

February 13, 2009 19:01

http://pastie.org/388782

Is what i've pasted, i think i've got it right but i'm probably wrong as i get this error....

unexpected token: void

http://pastie.org/388789

Cheers
D

Michael Forrest says

February 14, 2009 05:51

You don't need to add the MicroKontrol-related stuff for this. Just stick

import de.humatic.mmj.*;

in the top and change where it says "IAC Bus 3 <MOut:2> Apple Computer, Inc." to the Ableton APIMidi output port name, and change "IAC Bus 3 <MIn:2> Apple Computer, Inc." to the Ableton APIMidi input port name. You'll see a list of your interfaces when you run the program that you can look at to see the exact port names.

zeni says

February 18, 2009 21:00

First, congratulations for your work. It's amazing.
I'm trying to use the renderer for processing but I always have an error (null pointer exception when I declare a new animataPlayback with the AddScene example).

If I ever can get it to work, how do I control the animation through OSC within processing ?

zeni says

February 20, 2009 03:28

Please forget about the previous message. I've re-compiled the AnimataPlayback library by removing all the things related to MIDI and added some functions such as moving the joints through OSC.
It works quite well even if I have some minor problems of display to solve.

I guess there should be a way to bypass OSC and send commands directly to the animata library inside processing? I'm totally new to java so please forgive me if my question is stupid.

Thank you again for your great work.

Michael Forrest says

February 20, 2009 04:19

Hi Zeni
Well done recompiling the lib. I'm not gonna be much help this week as my laptop broke :(

Once you've loaded a scene, use Skeleton.findBones(name) to get bone references, and call setTempo and setScale on those objects. I'm afraid most of the examples will me a bit out of date, but the code on github should me up to date

See github.com/michaelforrest

zeni says

February 23, 2009 20:44

Thank you for the reply.
I've finished to recompile the library to use with processing. It is a kind of Animata Light library. Do you mind if I make the sources available ? I'll fully acknowledge that you are the main contributor.
About this library:
- no more OSC, controlled entirely from within processing (that can receive OSC messages so there is still OSC, though indirectly).
- control of joints position, scenes position, bones tempo, bones range.
- individual control of each named skeleton part (joint or bone) even if the scene they are part of is the same animata file.

To do:
- control of the position of the layers of a scene instead of the scene itself.
- control of the layers transparency.
more ?

Thank you,
Stephane.

Michael Forrest says

February 23, 2009 20:54

I'd like it if you would fork the project on GitHub, ideally... Means I can merge back any bits I like. Do a release for download too by all means though.

zeni says

February 23, 2009 21:13

OK, I'll check github and see how it works. Thank you.

Alexwebmaster says

March 03, 2009 05:43

Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru

Attalpimi says

February 17, 2010 09:16


На нашем сайте вы можете испытать ощущения, которые присуще применению любого сильного стимулятора сознания из имеющихся в реальности, и ощущения будут в точности копировать действие счастья, эйфории или оргазма. Но больше нигде вы не сможете найти аудио стимуляторы сознания такого качества и силы, как «Чёрный свет» или «Сон ангела» - в реальности просто нет аналогов! Что вы получаете, воспользовавшись нашим предложением? Вы получаете реальный кайф от того, что приобрели по-настоящему действующий аудио стимулятор сознания, вы НЕ ПОЛУЧИТЕ ЗАВИСИМОСТЬ, это совершенно легально и безопасно. А богатый выбор не сравниться ни с одним бароном Колумбии – мы однозначно круче разбираемся в том, что именно Вам нужно для того, чтобы почувствовать вкус к жизни, или от этой жизни отрешиться и отдохнуть. Вы хотите удовольствия в полном спектре? Вы его получите. Скачайте аудио файлы на нашем сайте, и вы получите универсальный аудио стимулятор сознания, по сравнению с которым «ангельская пыль» - просто детская игрушка.

<a href=http://info.je1.ru/Loader4.html>Подробнее...</a>

Make a comment