EXPRESSIONS

Everywhere variables are used they are part of an expression. In fact, it is expressions that starts or stops timelines. It is expressions that tells how an effect behaves.

EXAMPLE OF EXPRESSIONS

  • "masterVolume" the value of master volume
  • "tweenValue" The value of a curve at this point in time
  • "tweenValue -1" tweenValue -1
  • "1+23/4^5%6 + log(100K) + log(e(),100) + [3(3-3)/3] + (2<3) && 1.23" Random complex expression
  • "masterVolume > 0.4" logical expression

FORMAL DEFINITION

Numbers:

  • Integers: 1, 2, 10, 100, 1001
  • Decimals: 1.0, 1.23456, 0.000001 1 or 1.0 is true 0 or 0.0 is false

Operators:

  • () Parenthesis
  • ^ Exponentiation
  • % Modulo
  • / Division
  • * Multiplication
  • - Subtraction
  • + Addition
  • == != < <= >= > Comparisons (all have equal precedence)
  • && and Logical AND with short-circuit
  • || or Logical OR with short-circuit

Functions:

  • e() -- Euler's number (2.718281828459045)
  • pi() -- π (3.141592653589793)
  • int(val)
  • ceil(val)
  • floor(val)
  • round(modulus=1, val)
  • abs(val)
  • sign(val)
  • min(val, ...) -- Example: min(1, -2, 3, -4) == -4
  • max(val, ...) -- Example: max(1, -2, 3, -4) == 3
  • sin(radians) * asin(val)
  • cos(radians) * acos(val)
  • tan(radians) * atan(val)
  • sinh(val) * asinh(val)
  • cosh(val) * acosh(val)
  • tanh(val) * atanh(val)