Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects “Playing” a layer…

  • “Playing” a layer…

    Posted by Royce Jacobs on June 19, 2011 at 8:19 am

    I am trying to “play” a video (16 frame animation) on command. I am using audio converted to keyframes (recording of a single note played multiple times, different rhythms), and I want to write an expression saying every time a note is played (>6.0 value would work for each note’s beginning), this 16 frame animation plays through and then freezes on the last frame (0:00:00:15). It’s important that it stops on the last frame of that layer while the rest of the timeline continues on. The effect would be that the animation is the note being played each time, in sync with the audio. But it needs to be an expression because it is too long to do manually.

    Anyone know how to do this?…..

    Royce Jacobs replied 14 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Greg Burrus

    June 20, 2011 at 4:06 pm

    I made a quick expression that I think might be what your trying to do.


    enable=effect("Enable Bounce")("Checkbox");
    soundLVL = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider");
    if( enable == 1){
    if(soundLVL >30){
    transform.position+100;}
    else{
    transform.position

    };
    }else{

    transform.position

    }

    This expression allows you to set value to occur when the key is greater then a number you set(30 in my code). Mine simply adds 100 to the position but you could do anything. If you wanted something smooth you should use the linear method or something to increment you value like a loop.

    If it doesn’t hit the value it stays the same as you have it set. I setup a switch that enables the effect or not. You could also use this to freeze it with a certain value other then the default you begin with.

    I uploaded the project I did the code in. 2465_soundbounce.zip

    Hope that helps & if not

    I would suggests that you post this in the after effects expressions forum since that’s the right forum for this question

    Or try
    https://aenhancers.com/

    Greg

    https://mogra.g2bproductions.com/ – Blog
    https://g2bproductions.com/ – Portfolio

  • Royce Jacobs

    July 15, 2011 at 10:28 am

    Greg,

    I appreciate the suggestions! Unfortunately, the part I really needed the help in was the missing part (position in your example). I need a way to “play” a layer and freeze on the last frame.

    I have re-posted this in the expression forum per your suggestion.

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