Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Wiggle at a certain volume for music.

  • Wiggle at a certain volume for music.

    Posted by George Norkilian on June 29, 2014 at 6:44 am

    Hi. I’ve been trying to create an expression for a position’s wiggle but I can’t seem to get it right

    The problem is that I only want it to wiggle at a value of audio keyframes.

    This is what I had but it just kind of moves to the lower right and doesn’t look great.

    s=thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)

    x=value[0];

    if (s < 25) x=value[0];
    else (x=x+s);

    y=value[1];

    if (s < 25) y=value[1];
    else (y=y+s);

    [x, y]

    And while I’m here, I have another question. I rendered out an mp4. I am trying to speed up the mp4 when the song gets loud and slow it down when it kind of quiet. I don’t want a twitching effect (this is what I keep coming up with)

    All help appreciated.

    George Norkilian replied 12 years, 2 months ago 2 Members · 6 Replies
  • 6 Replies
  • George Goodman

    June 30, 2014 at 1:55 pm

    This isn’t really a wiggle, but it will make what you wrote work. What this will do is stay completely still, unless the audio amplitude is greater than 25. When it is, it will then add that value to its current value. If that is what you want, than this is your solution. If not, please rephrase what you’re looking for.

    s=thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”)

    x=value[0];
    y=value[1];

    if (s < 25) [x,y];
    else [x+s,y+s];

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • George Norkilian

    June 30, 2014 at 8:34 pm

    That does pretty much the same thing is what my original expression did. The problem is that is only moves to the lower right and the upper right, upper left, and lower left remain untouched

  • George Goodman

    June 30, 2014 at 9:11 pm

    I’m not totally sure what you’re trying to accomplish. This is probably closer. Please include a screen shot with further description of how you’d like it to move if this doesn’t work. This expression will give you a diagonal motion because it is adding and subtracting the x and y values together, if you want them to act independently, you’ll need something different.

    s=thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);

    x=value[0];
    y=value[1];
    thresh=5;

    if (s < thresh) [x+(s-thresh),y+(s-thresh)];
    if (s == thresh)[x,s]
    if (s > thresh) [x+(s-thresh),y+(s-thresh)];

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • George Norkilian

    June 30, 2014 at 10:46 pm

    That wasn’t really it either.

    Watch this part of this video (linked to a specific time): https://youtu.be/CUhCGLgieQQ?t=1m7s

    that shake? it only happens at certain spots. That’s the effect I’m going for

  • George Goodman

    June 30, 2014 at 10:58 pm

    The video time didn’t work, but I think I know what you’re talking about – I’m guessing the wiggle during the big symbol crash. That would be something like this:

    s=thisComp.layer(“Audio Amplitude”).effect(“Both Channels”)(“Slider”);
    threshold=25;
    howmany=3;
    amount=50;

    x=value[0];
    y=value[1];

    if (s < threshold) [x,y]
    else [wiggle(howmany,amount),wiggle(howmany,amount)]

    The threshold controls the value the slider must be to activate the wiggle. How many is how many wiggles per second. Amount is how many pixels the wiggle can move (in this case anywhere between 1-50)

    This is untested, btw, so let me know if there is a problem.

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • George Norkilian

    July 1, 2014 at 1:20 am

    Problem. Error at Lion 0. Array piece can’t expand to more than one value.

    I keep on getting this error when I’m trying to come up with my own expressions

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