ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Keyframing with audio problems

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex
Keyframing with audio problems
by
on Sep 19, 2005 at 7:22:52 pm

Hello,


I want to make a 2D image, set as a 3D layer, to move ONLY in the XY coordinates with audio as the keyframes. However, when I use an expression to set this up, it moves along the Z axis as well. I know there must be a way to freeze or exclude the Z-axis from being affected by the audio keyframes? Any suggestions, or line of javascript to add after the inital pickwhip selection would be a major help. Thank you very much!



Return to posts index

Roland R. Kahlenberg
Re: Keyframing with audio problems
on Sep 20, 2005 at 1:57:56 am

Once you've pickwhipped, create a variable for the pickwhipped property. For example, the following line of Expression script

AudioValue = this_comp.layer("Solid 1").position[1];

creates a variable called AudioValue for the y-position of a layer called Solid 1.

Once you've got the variable set up, all you need to do is to follow it up with another line of script such as this:

[AudioValue, AudioValue, position[2]]

That's all there is to it. HTH
Roland Kahlenberg
broadcastGEMs - customizable animated backdrops with Adobe After Effects project files


Return to posts index

Alex
Re: Keyframing with audio problems
by
on Sep 21, 2005 at 2:57:23 pm

Hello,

thank you for responding. Remember I'm new to expressions, so please have patience.

Once, I have pickwhipped, an expression automatically writes inteself onto a field. Do I DELETE this field that automatically shows up? Or do I add this to what automatically is inserted by After Effects? I tried both, but it caused the expression to become disabled. I am using soundkeys to get the keys from the audio, not "convert audio to keyframes." I also DID change the script that you gave me to add the name of the relevant layer with the audio. All of this did not bring about a resolution. Instead, I still have the same problem, where the image flies off into z space.

Any suggestions?


Return to posts index


Roland R. Kahlenberg
Re: Keyframing with audio problems
on Sep 21, 2005 at 3:13:04 pm

If you pickwhipped from the target parameter to the source layer it will automatically create the script for you. If you already have a script in the target parameter's Expression text box then ensure that the new script overwrites the old one.

[Alex] "I also DID change the script that you gave me to add the name of the relevant layer with the audio. All of this did not bring about a resolution. Instead, I still have the same problem, where the image flies off into z space."

I suggest that you perform the steps again. If you still have an issue then come back here and let us know which layers are the target and source for the Expression and which parameters are being affected.

From there, it will be much easier to sort things out.
Cheers
Roland Kahlenberg
broadcastGEMs
customizable animated backdrops with Adobe After Effects project files





Return to posts index

Alex
Re: Keyframing with audio problems
by
on Sep 21, 2005 at 6:11:43 pm



The image's position is being pickwhipped to the soundkeys keyframes. Unfortunately, as it is a 3d layer (the image, that is), once you make a pickwhip selection, the numbers turn red and cannot be tweaked by hand. As a result, the x, y, and z axes are all affected the same and all at once. I want to keep the z axis unaffected. If you would be willing to sen me your email address, I will send you the file for you to see fo yourself - I don't know how to post a screenshot into this page. my email is: fxfellow@aol.com

Thanks.


Return to posts index

Roland R. Kahlenberg
Re: Keyframing with audio problems
on Sep 21, 2005 at 6:27:01 pm

My email's been funky the last few days. I suggest that you watch Rick Gerard's 5-minute COW Tutorial. In one of them, he does a pickwhip routine - sorry I'm not sure which one.

If you think you are pickwhipping correctly then all you have to do is to add the following text, including the = sign to the front of the script that was created by your pickwhipping. Just click within the Expression textbox area and you will be able to type it.
KeyframeVal=

Then type the following line, after the first line of script.

[KeyframeVal,KeyframeVal,position[2]]

The preceeding line will ensure that only the x and y axes are affected by the keyframe values created by SoundKey and the z-axis (denoted by position[2]) is unaffected and will maintain whatever values it has.

You can perform math operations on the x and y axes independently. As an example;
[KeyframeVal/2,KeyframeVal+25,position[2]]

HTH
Roland Kahlenberg
broadcastGEMs
customizable animated backdrops with Adobe After Effects project files


Return to posts index


Alex
Re: Keyframing with audio problems
by
on Sep 22, 2005 at 12:46:25 pm

My expression looks like this:

KeyframeVal=temp = thisComp.layer("soundkeys").effect("Sound Keys")("Output 1");
[temp, temp, temp]=KeyframeVal,KeyframeVal,position[2]]


As you can see, the KeyframeVal= you mentioned is in front. After the script from the pickwhip, which ends in [temp, temp, temp] I added the =KeyframeVal,KeyframeVal,position[2]]

Once again, the expression disabled itself. I am at my wit's end, what the HECK am I doing wrong here? I don't think I'm doing anything wrong with my selection, I have Brian Maffit's After Effects tutorials DVD, and though they are great, they just show you how to do an initial setup - not how to workaround any freezes.

????????????????????????????????


Return to posts index

Steve Roberts
Re: Keyframing with audio problems
on Sep 22, 2005 at 1:37:55 pm

I think you're being recursive, saying a=b=a or something. Lose the "temp", and the = out of the second line. If I get your intention, your expression should say, in effect:

-"New Variable Name" is equal to a real value taken from another layer, then
-the position is now [ New Variable Name , New Variable Name , unchanged property ]

Your expression should really read:

KeyframeVal = thisComp.layer("soundkeys").effect("Sound Keys")("Output 1");
[KeyframeVal,KeyframeVal,position[2]]

The last line looks incomplete, but it is being applied to the position property. AE takes the last line of a script (as far as I can tell) and applies it to the property in which the expression, er, resides.

Hope it works ... I'm not at AE right now.
Steve


Return to posts index

Alex
Re: Keyframing with audio problems, progress
by
on Sep 22, 2005 at 6:29:05 pm

Hello,

to the last poster, thank you, I had some progress!

OK, now the image layer no longer moves along the Z axis, however, I need the image to move relative to where I have placed it in world space. Once I apply the expression, it moves appropriately to the audio, but, the audio starts at 0, so the image moves waaaaay to the left in world space along the x-axis to 0 and then moves appropriately from there - but it is not where I need it placed.

So, half the battle is over. It moves correctly now, but how do I get it to move as it is now, yet stay in the relatively same space and not waaaaay off to one side?

Again, your patience and assistance is truly appreciated!

Thank you.

-Alex.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]