Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Beat Counter based xpression gets really SLOW!!

  • Beat Counter based xpression gets really SLOW!!

    Posted by Anders Hattne on February 8, 2012 at 4:47 pm

    Hi, I used Dan Ebberts Beat counter expression to make some voice sync easier. It looks which frequences are the loudest in a soundtrack and changes the opacity of the clips accordingly.
    Problem is it gets unfeasible slow at 30 minutes (..we made them that long… well..)

    Anyway, is there any way of making this faster.. I assumed the numbers just get to high. I tried to subtract some but that didn’t work…

    src=comp(“11_03_cap”).layer(“soundkeys BOCA”); // the values from soundkeys

    offset=Math.abs(src.effect(“time_offset_inframes”)(“Slider”));

    range1=Math.round(src.effect(“Sound Keys”)(“Output 1”).valueAtTime(time+offset*(thisComp.frameDuration)));
    range2=Math.round(src.effect(“Sound Keys”)(“Output 2”).valueAtTime(time+offset*(thisComp.frameDuration)));
    range3=Math.round(src.effect(“Sound Keys”)(“Output 3”).valueAtTime(time+offset*(thisComp.frameDuration)));
    largest= undefined;

    frame = Math.round((time) / thisComp.frameDuration);

    while (frame >= 0){
    t = frame * thisComp.frameDuration;
    if (range1 >= range2 && range1 >= range3){
    largest=1;
    }

    else if (range2 >= range1 && range2 >= range3){
    largest=2;
    }
    else if (range3 >= range1 && range3 >= range2){
    largest=3;}

    frame–
    }

    largest

    http://www.ardillamedia.com

    Anders Hattne replied 14 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    February 8, 2012 at 5:13 pm

    The beat counter will definitely bog down in a long comp because at each frame it has to examine all the previous frames. You could speed it up by using a script to do the analysis and have it set hold keyframes on a slider for each beat. It should be pretty straight forward if you’ve done any scripting.

    Dan

  • Anders Hattne

    February 8, 2012 at 5:32 pm

    I have no knowledge of scripting and am very green at expressions. In the end we cut down the comps. We’ll save time on the voice syncing and spend that on editing later!

    http://www.ardillamedia.com

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