Copy link to clipboard
Copied
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!!
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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??
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Hi Dan, thank you so much for responding. Please excuse my poor workings out, I'm only really just tapping into expressions and this stuff just bends my mind. Whilst I can see the magnitude of benefits expression offers, I'm struggling to get my head around it. The reason for the slider was I couldn;t work out away of effecting just one of the values of the mouth position. The slider allowed me to pick whip to just one of those values and link to the audio slider that is how little I know about this at the moment lol.
Thank you so much for your response, that done the trick!!
Copy link to clipboard
Copied
I'm sure you figured out that there's a typo in the expression I posted. I left out the closing quote on "Slider".
Dan
Find more inspiration, events, and resources on the new Adobe Community
Explore Now