PDA

View Full Version : Using Soundkeys to drive Xpresso!


Zendorf
04-25-2005, 05:36 AM
In bobtronic's sound shader thread, I mentioned that I had worked out a way of using Soundkeys in AE to drive Xpresso parameters. Since there seemed to be some interest, I have a quick how to here, along with a scene file.


1) Bring your sound file into AE. Create a composition size of 320 x 240 at whatever frame rate you will need. All we are after is the greyscale value of each frame so I will later change the comp size to 4x4 to render out at.

2) Create a solid layer at the comp size and add the Soundkeys effects to it. Tweak the sound keys parameters to taste (I am assuming you know how to use this plugin). In this example, I am after the kick drum to drive parameters, so I have the SK range in the bass spectrum with exponential falloff.

3) Hit apply and Sk will go through and generate a keyframe for every frame of your chosen frequency. Now create another solid white layer and mute your sound keys layer. On this new white layer, twirl down to the opacity parameter and highlight it. Select Animation>add expression and then pickwhip the output parameter of soundkeys (range 1 output1 in my case as I was using the bass range) to the Opacity of the white layer. You may want to attenuate this expression to change the range of these values. In my example I have added a *2 at the end of the expression to boost all values.

4) Now change the comp size to something small to keep file sizes down, although this is not necessary. I changed it to 4x4 (as low as ae will go) and rendered out a targa sequence.

5) Now create a new Cinema scene file and create a new material. In the colour channel, bring in the file sequence you just created (just select the first image). On the animation attributes for this channel, hit calculate and then change the frame rate to 1. Create a null and an xpresso tag. Open this tag up and drag the bitmap shader you just created into xpresso.

6) Ok, now to the meat of the matter! Create a time node in xpresso and hook the frame output to the movie start input of the bitmap shader node. You will now create a Ch Sampler (from Ditools) and hook the real output from the time module into the time input of CH Sampler. Also drag the material that you created into the corresponding material slot in the AM. I also like to hook the sample out of the CH Sampler into the Ditools Colour node so that I can see the greyscale value as I scrub the timeline.

7) Ok it is all hooked up for you to abuse as you would like! The sample output from CH Sampler can be used to drive any parameter in xpresso directly, or by attenuating the value with math nodes or change range nodes, etc. In this example I am driving the light intensity and colour, as well as the position on spline of the spheres, the amount of explosion on them and the displacement of the ground. It can be easy to go overboard with this stuff...lotsa fun!

This does seem like a lot of effort but is quite simple after you do it a few times, and it gives so much more control and accuracy than the inbuilt sound node. But of course you also need Soundkeys, AE and Ditools. Without Soundkeys/AE, this can still be useful to use, as CH Sampler will allow you to sample any Colour sequence or even animated procedural textures. For instance you can use any of the animated noises in Cinema to drive a parameter by using this, as opposed to just the 4 inbuilt ones that are in the noise node.

In the zip file I have included the sample scene file (pretty cheesy, but will serve as a decent example). As I just found out, I can't attach any zip larger than 79k on here, so I can't give the sound file or the image sequence used (unless someone else can host it?).
You will have to generate your own sequence as described above to test it out.

Enjoy....

esokanod
03-31-2006, 07:26 AM
bobtronics sound shader??? where? can i have that?!
thanks

AkaKico
03-31-2006, 03:02 PM
Looks like a reference to this thread. (http://forums.cgsociety.org/showthread.php?t=233173&page=1&pp=15&highlight=sound+shader) In it Renato mentions he was working on something? I wonder what became of this?

4dthieves
03-31-2006, 03:53 PM
I used to do this all the time a couple years ago, but it's really a bloated solution and only useful if you have an ever changing music track that needs to have a workflow for constant updates.

It's much simpler/faster to just create a track inside Cinema to hold the sound data, then import the soundkeys via ASCII Import. From there you can pipe the data to wherever you like via Xpresso.
Much tighter.

-m

basilisk
03-31-2006, 04:03 PM
It's much simpler/faster to just create a track inside Cinema to hold the sound data, then import the soundkeys via ASCII Import. From there you can pipe the data to wherever you like via Xpresso.
Much tighter.

-m
sorry to sound dim - how do you export Soundkeys ASCII from AE?

soccerrprp
03-31-2006, 04:47 PM
...and would the ascii be read using a READ text node for example? Sorry, i'm completely new to xpresso... how would you then read the ascii to drive animation?

4dthieves
03-31-2006, 05:29 PM
sorry to sound dim - how do you export Soundkeys ASCII from AE?
After you've generated your soundkeys...

Select Keys
Copy
Open Text editor
Paste

You need to delete the first couple of lines of AE garbage, but the rest is raw data.

You could use a text node to read through Xpresso, but I prefer to embed the information in the scenefile. That can be done with Plugins > Cinema4D > ASCII Animation Import.

-m

Zendorf
04-01-2006, 04:37 AM
You could use a text node to read through Xpresso, but I prefer to embed the information in the scenefile. That can be done with Plugins > Cinema4D > ASCII Animation Import.





Cool..this is good to know. Would love to try and get some midi data in via this method. The "ASCII Animation option" is greyed out on my 9.52, do you know why this is?

4dthieves
04-01-2006, 08:28 AM
Cool..this is good to know. Would love to try and get some midi data in via this method. The "ASCII Animation option" is greyed out on my 9.52, do you know why this is?
You need to have an object selected so it knows what it's adding an animation track to.
I often just create a Null and call it "Sound Data". You can store as many data tracks as you want on it, but I find that (as a general rule) more than 4 different soundkeys tracks gets visually distracting.

-m

flingster
04-01-2006, 05:45 PM
please repost this on ditools forum for me...please...please...
i keep begging for remo to think about sound features...i need fuel for me little fire..thankie.
also all suggestion on this very welcome or how to add additional functionality to do the sort of things you're trying..how can it be improved by remo etc..we are all ears (no pun intended).

soccerrprp
04-05-2006, 05:04 PM
Please, please forgive this, what must be a newbie question!!!

I have been playing around with the sound node and driving animation with it. What is the best way to synchronize the animation with the sound/music?

I know that I have to eventually combine the two in a program such as Adobe Premiere or something similar, but is there a tut or some help that will help me synchronize the .wav file with the actual animation created using it with a sound node?

Thanks!

BTW, love the sound node and the potential of it.

Okay, should have done this in the first place. Did a search and found out a way to synchronize. Sorry to bother you all.

flingster
04-05-2006, 10:55 PM
Please, please forgive this, what must be a newbie question!!!

I have been playing around with the sound node and driving animation with it. What is the best way to synchronize the animation with the sound/music?

I know that I have to eventually combine the two in a program such as Adobe Premiere or something similar, but is there a tut or some help that will help me synchronize the .wav file with the actual animation created using it with a sound node?

Thanks!

BTW, love the sound node and the potential of it.

Okay, should have done this in the first place. Did a search and found out a way to synchronize. Sorry to bother you all.

the link the link he yells across space and time...the link......

dunno if you also saw this one as ref
http://www.bonkers.de/download/downloads.html

CGTalk Moderation
04-05-2006, 10:55 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.