Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random Motion Linked to an Audio Control

  • Darby Edelen

    March 23, 2007 at 3:37 pm

    So you’re saying you want the audio levels to depend on the difference in Z values between the camera and the layer? i.e. the camera is closer so the sound gets louder?

    The difference in Z value between the layer and the camera should be (layerZ – cameraZ) This complicates things only slightly as your new ‘close’ and ‘far’ values should take the camera’s potential position into account as well (if the camera varies between Z values of -1000 and -300, for example, the closest the camera could ever be to a layer would be 100 units (-200 – (-300)) and the farthest would be (1400 – (-1000)) 2400 units, in this case your new close and far assignments would be:

    close = 100;
    far = 2400;

    Your new distance formula should be:

    distance = thisComp.layer(index+1).transform.position[2] – thisComp.layer(“yourcamnamehere”).transform.position[2]; //The Z value of the layer beneath this one minus the Z value of your animated camera

    If the camera is animated in the X direction it will make the panning effect more difficult to achieve (unless the camera isn’t panning).

  • Twelvizm

    March 23, 2007 at 4:46 pm

    (SORRY STILL RENDERING)

    HERE’S THE SCENE;

    A CAMERA IS MOVING FROM LEFT TO RIGHT, TOWARD THE MIDDLE, I HAVE LITTLE OBJECTS RANDOMLY SCURRING AROUND MAKING NOISES. BUT, I ONLY WANT THEM TO BE HEARD WHILE IN FRAME.

    WHICH BINGS ME TO ANSWER MY OWN QUESTION, MAKE THE AUDIO LAYER SO THAT IT IS ONLY AS LONG AS THE OBJECTS ARE IN THE FRAME.

    NO NEED TO OVER-THINK THAT ONE…

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy