ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Audio Amplitude + Time Remap problem

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Vlady Gerasimov
Audio Amplitude + Time Remap problem
on Nov 16, 2015 at 4:07:36 pm

Hi there,

I'm relatively new to expressions and I flat out suck at time remapping, but I've been trying to make an animation based on those two things + the audio amplitude effect. Essentially, I have a 1sec. long video, where I want to animate between the beginning and the end (let's call them 1 and 2), based on the amplitude of my audio track.

Now, for my audio track, I have used the following expression:

linear(value,50,90,2,1)

which is intended to give me a value of 2 for every keyframe generated by audio amplitude above 50 units, and a value of 1 for every keyframe above 90 units.

For my video layer I've enabled the following expression:

key(clamp(thisComp.layer("Null 2").effect("Slider Control")("Slider"),1,2))

Null 2 being the slider control I've tied to the audio amplitude layer. The problem is that it only animates between the values of 1 and 2, with no values in between. Is there a workaround for this? Can the video layer be animated between two keyframes using intermediate values as well? Matt Webber has posted a similar question in this thread:
https://forums.creativecow.net/thread/227/27699#27702 but me being bad with expressions - I don't understand how I can adapt this to my situation. Any help would be greatly appreciated. Thanks,

Vladimir


Return to posts index

Walter Soyka
Re: Audio Amplitude + Time Remap problem
on Nov 16, 2015 at 5:46:38 pm

key() refers to a specific keyframe by its index, which must be an integer.

Use valueAtTime() instead, which refers to a time (in seconds).

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Vlady Gerasimov
Re: Audio Amplitude + Time Remap problem
on Nov 17, 2015 at 10:00:39 am

Thanks! That works great, but now I have another problem :D

Using valueAtTime, how should my expression in the brackets look like? For now, it is

valueAtTime(clamp(thisComp.layer("Null 2").effect("Slider Control")("Slider"),1,2))

which works, but not as intended - it changes to a different time than I want it to. I used a slider control on a separate layer, which serves the function of alternating between two keyframes - one at the beginning of the video, the second at a different point in the video (1st second) as I don't want to see any of the video after this point. But now the video jumps to random times, I'm guessing the expression no longer works with the values 1 and 2, and I should probably use a timecode?

Thanks for your help!

Best,
Vladimir


Return to posts index


Walter Soyka
Re: Audio Amplitude + Time Remap problem
on Nov 17, 2015 at 1:38:47 pm

After Effects counts time in seconds, starting at 0. If keyframe 1 was at 0, and keyframe 2 was at 1 second, then you want to go between 0 and 1, not 1 and 2.

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Vlady Gerasimov
Re: Audio Amplitude + Time Remap problem
on Nov 18, 2015 at 9:36:37 am

Oh, it works great, thanks!


Return to posts index

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