ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Set a value to satisfy 2 conditions

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Adrien Redon
Set a value to satisfy 2 conditions
on Apr 11, 2017 at 5:27:58 pm

I have an image that scales to the beat of the music.

What I am trying to do is make it so that the image starts scaling ONLY when the amplitude of the song reaches a certain threshold.
As an example I have set it to 60.

Now, in order for the scaling effect to work well, I also need the scaling to reach its maximum when the amplitude value is at its highest.

Lets say the amplitude values go like this:

46, 60, 67, 73, 63, 51

I would need the scaling to start at 60 and reach its maximum scaling when we reach the amplitude value 73.

In the following example have given the maximum scale value the name X.

So basically I need X to satisfy 2 conditions:

1. It needs to be greater than 60
2. It needs to be greater than the following value

y = comp("1. Music").layer("Audio Amplitude").effect("Both Channels")("Slider")
x = y(value[>60 and >ynextvalue])


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved