decorative banner

Controlling the built-in loop (PB only)


    When writing scripts, note that Motion Math runs a script using a built-in loop, cycling through it at a sampling rate you specify in the Motion Math window.

    For example, if you type a Sample At rate of 15 samples per second, Motion Math runs the script 15 times each second over the range of the selected work area. If the work area is 4 seconds, Motion Math runs the script 60 times, creating 60 keyframes for one or more properties. Motion Math also includes a loop statement for use inside scripts so that you can repeat a statement or series of statements more frequently than the sample rate.

    The values of keyframes created by Motion Math are based on the values of variables at the time of the sample. To base the values of keyframes on some other time, use the tmap () function (see Motion Math language reference (PB only)).