Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions changing interpolation —

  • changing interpolation —

    Posted by Nicholas Toth on October 24, 2007 at 3:13 pm

    Hi everyone!

    I’m trying to change the interpolation of this expression so it doesn’t jerk between positive and negative numbers, but so its a nice soft bezier interpolation.

    period = 1
    holdTime = 3;

    seed = Math.floor(time/period);
    t = time%period
    seedRandom(seed,true);
    if ( random() > .5 && t < holdTime) 1 else -1; Any suggestions?

    Nicholas Toth replied 18 years, 6 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    October 24, 2007 at 4:45 pm

    I think you’ll have better luck if you tell us what you’re trying to do.

    Dan

  • Nicholas Toth

    October 24, 2007 at 7:55 pm

    Soundkeying a bend-it effect to a character, who’s phonemes have been applied. So it bends when it talks, but so it doesn’t bend in the same direction, so it moves to the other side periodically.

    I was multiplying the bend it effect which is based around the soundkey data by either a 1 or -1 to have it change direction.

    am I making sense?

  • Dan Ebberts

    October 24, 2007 at 8:18 pm

    If you want to add a smooth, random multiplier, you could use wiggle() to calculate the multiplier like this:

    freq = 5;
    mult = wiggle(freq,1)-value;

    or, if you wanted it to be periodic you could do something like this:

    freq = 5;
    mult = Math.sin(freq*time*Math.PI*2);

    Then you would just multiply your Sound Keys value by “mult” and adjust “freq” to the frequency you want.

    Dan

  • Nicholas Toth

    October 25, 2007 at 2:37 pm

    Thanks dan!

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