Skip to main content
Participating Frequently
October 22, 2011
Answered

Expression needed!! Any help appreciated. Using audio converted keyframes

  • October 22, 2011
  • 1 reply
  • 1408 views

Hi all,

I'm hoping this isn't to much of a complicated issue. I use after effects regularly but the expression stuff does have me baffled. I can convert the audio to keyframes with out an issue. What I'm trying to achieve is this - I have a talking head with the bottom mouth part cut on a sperate layer. i'd like the mouth layer to move up and down being driven by the audio. I can pick whip to the audio no problem but then I need to ensure it only effects one of the position values and also 'fine tune' how the audio effects that value.

Please help!!

Thanks!!

This topic has been closed for replies.
Correct answer Dan Ebberts

I'm not sure what you're doing with the slider, but I think this is all you need for the mouth:

aud = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider);

y = linear(aud,0,36,1492,1547);

[1001.5,y]

If you already have the mouth positioned at [1001.5,1492], you could just do this:

aud = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider);

y = linear(aud,0,36,0,55);

value + [0,y]

Dan

1 reply

Participating Frequently
October 22, 2011

OK, so I'm thinking the expression on the audio layer needs to start with 'linear' followed by '(' then audio value low (O) then highest audio value (eg 28), then starting postion for X value then the max move value for X so it would look something like this linear(0,28,342,328)   does this sound correct? How do I then ensure this only effects one of the postion values (like X) of the mouth rather than both X&Y? I'm thinking a slider is involved?

Any help appreciated.

Participating Frequently
October 22, 2011

OK, I have managed to get it to do pretty much what I need to do. the only problem i have now is changing the value representation on the slider. i know you can right click the slider to change the value but when i link with the expression, the slider value changes back to 0-100. I can get around the problem by changing the anchor point but surely there must be away to 'control' the value representation in the slider??

Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
October 22, 2011

I'm not sure what you're doing with the slider, but I think this is all you need for the mouth:

aud = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider);

y = linear(aud,0,36,1492,1547);

[1001.5,y]

If you already have the mouth positioned at [1001.5,1492], you could just do this:

aud = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider);

y = linear(aud,0,36,0,55);

value + [0,y]

Dan