Expression Library

Oscillate Rotation

Author: Michael Natkin & Brian Maffitt

Automatically periodically rotates a layer from side to side. (Use Expression Control angles or sliders for “ from”, “to”, and an expression control slider assigned to “period” for fine control. You can apply these to any layer. Change “linear” to “ease” for smoother interpolation.)

Code Sample

Hover over the code and click the copy button.

					minAudio = 0;
maxAudio = 15; //or whatever the max audio level value is
maxStretch = 2.0;

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

stretch =  linear(audioLev, minAudio, maxAudio, 1.0, maxStretch);

value * stretch