Return
type: Number or Array.
Argument type: t, tMin, and tMax are
Numbers, and value1 and value2 are Numbers or Arrays.
In context, say you have the audio keyframe
effect that goes from 0-100 and you want it to
control the rotation of an object from -360 to
360.
in the rotation parameter of the object you
would enable expressions first. Then pickwhip
to the audio keyframe effect to get something
like this
thisComp.layer("Audio
Amplitude").effect("Both
Channels")("Slider")
Now
you need to assign this to a variable, let's
say x, so it becomes
x =Â thisComp.layer("Audio
Amplitude").effect("Both
Channels")("Slider")
This
will give you simple rotation between 0 and
100 degrees, not the full range of movement.
So then you add the linear expression
underneath like so:
linear(x,
0, 100, -360, 360)
The coolest thing
about this is that it is basically a built-in
falloff / threshold control. So say you don't
want to trigger rotation until the audio comes
up to a certain level, say 15 dB, and then cut
off at a max of 80 dB because the audio never
gets above that, you would write instead:
linear(x, 15, 80,
-360, 360)
So this squashes the input range to 15-80
while still outputting the full range of
rotation
You can also use ease(x, n, n1, n2, n3) for a
smoother output, but I'd start with linear()
first
You can easily do
this with any variable, even array variables
like color or 3D coords...