Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Can i get a “figed time”?

  • Can i get a “figed time”?

    Posted by Fabrice Boulard on February 12, 2018 at 4:06 pm

    Hi everybody!
    I did a metronome. The vertical bar is animated by a simple expression :
    var amplitude = 32;
    var bpm = 120; (beatPerMinute)
    var f = (bpm/60)*2; (frequence)
    sin(2*Math.PI*f*time)

    Now i want to play a sound at the right time. It’s why i created a comp. Into this, a only one soundlayer with a marker at the frame number 1 (not 0).
    I commented this marker : “playSound”.

    I addded this comp in another comp to time remaptime it and add expression on it :

    var c = thisLayer.source;
    var myComment = "playSound";
    var m= c.marker.key(myComment);

    var amplitude = 32;
    var bpm = comp('metronome').layer('barre').effect("Paramètre glissière")("Curseur");
    var velocité = 2*Math.PI*((bpm/60)/2);

    var v = amplitude*Math.sin(velocité * time);

    frames = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
    iTime = framesToTime(frames+1, fps = 1.0 / thisComp.frameDuration);
    iV = amplitude*Math.sin(velocité * iTime);

    absV = Math.abs(v);
    absiV = Math.abs(iV);

    if(absV == amplitude || (absV

    I need to substract the time value when the condition begins true and i don't know how to do that...
    "m.time + time - figedTime"

    Thx for help

    Fabrice Boulard replied 8 years, 6 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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