ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Wiggle at a certain volume for music.

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
George NorkilianWiggle at a certain volume for music.
by on Jun 29, 2014 at 6:44:38 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.


Return to posts index

George GoodmanRe: Wiggle at a certain volume for music.
by on Jun 30, 2014 at 1:55:00 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


Return to posts index

George NorkilianRe: Wiggle at a certain volume for music.
by on Jun 30, 2014 at 8:34:03 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


Return to posts index


George GoodmanRe: Wiggle at a certain volume for music.
by on Jun 30, 2014 at 9:11:09 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


Return to posts index

George NorkilianRe: Wiggle at a certain volume for music.
by on Jun 30, 2014 at 10:46:52 pm

That wasn't really it either.

Watch this part of this video (linked to a specific time):





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


Return to posts index

George GoodmanRe: Wiggle at a certain volume for music.
by on Jun 30, 2014 at 10:58:45 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


Return to posts index


George NorkilianRe: Wiggle at a certain volume for music.
by on Jul 1, 2014 at 1:20:58 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]