The Math Automation allows you to create dynamic animations using mathematical formulas. This powerful feature gives you precise control over how properties change over time, react to audio, or respond to other variables.

How it works

Math Automation works by evaluating a mathematical formula on each frame during playback. The result of this formula can be connected to any property in your project, allowing for complex and precise animations.

The formula can include various variables and functions, making it extremely versatile for creating both simple and complex animations.

Use cases

Math Automation is particularly useful for:

  • Creating smooth, wave-like movements using sine or cosine functions
  • Making properties react to audio in customized ways
  • Building complex animations that would be difficult to achieve with keyframes
  • Creating procedural animations using noise functions
  • Implementing mathematical relationships between different properties

Variables

You can use these special variables in your formulas:

VariableDescription
tCurrent time in seconds
pPrevious calculated value
aCurrent audio impact (overall audio level)
dTotal project duration in seconds
mMaximum audio impact recorded
u1-u5User-defined variables (can be set in the interface)
rxCurrent resolution width in pixels
ryCurrent resolution height in pixels

Functions

The Math Automation supports these mathematical functions:

FunctionDescriptionExample
sin(x)Sine of x (in radians)sin(t)
cos(x)Cosine of x (in radians)cos(t*2)
tan(x)Tangent of xtan(t)
min(a,b)Minimum of a and bmin(sin(t), 0.5)
max(a,b)Maximum of a and bmax(sin(t), 0)
sgn(x)Sign of x (-1, 0, or 1)sgn(sin(t))
linear(input,inMin,inMax,outMin,outMax)Remaps a value from one range to anotherlinear(sin(t),-1,1,0,1)
noise(x,seed)Simplex noise functionnoise(t*0.1, 42)
round(x)Rounds x to the nearest integerround(sin(t)*10)
floor(x)Rounds x down to the nearest integerfloor(t)
ceil(x)Rounds x up to the nearest integerceil(sin(t)*5)
abs(x)Absolute value of xabs(sin(t))

Example formulas

FormulaEffect
sin(t)Smooth wave oscillating between -1 and 1
sin(t*2*PI)One complete sine wave per second
abs(sin(t))Bouncing effect between 0 and 1
sin(t) * aSine wave that reacts to audio
noise(t*0.1, 42)Smooth random movement
linear(sin(t),-1,1,0,100)Sine wave remapped to range 0-100
sin(t*u1) * u2Sine wave with controllable frequency (u1) and amplitude (u2)

For more examples and practical formulas, see the Math Automation Examples page.

Combining with audio

Try using the audio impact variable (a) in your formulas to make properties react to music. For example, 0.5 + sin(t*2) * a * 0.5 creates a wave that gets more pronounced with louder audio.

Creating complex movements

You can combine multiple functions for more complex effects. For example, sin(t) * cos(t*2) creates a modulated wave pattern.