The Hidden Treasures of jit.mo


    There are only five objects included in the jit.mo package, but each object is so richly packed with features that it can easily feel like there’s something you might have missed. I’d like to take a moment to share some of my favorite things that you may have overlooked.

    About time

    While jit.mo is billed primarily as a motion graphics toolkit, there’s one essential object in there that every Max user could probably appreciate: jit.mo.time. This object has quietly started appearing in every single patch I make, even the ones that don’t involve wiggling shapes. The fact that it automatically syncs its output to the nearest jit.world context makes it super slick to use in any Jitter patch, but doesn’t prevent you from driving it with other means. To use jit.mo.time without jit.world, just add the “@automatic 0” attribute as an argument to provide it with a steady supply of bang messages.
    The most widely useful feature of jit.mo.time is its function mode, which turns it into a message-rate LFO with saw, sine, triangle, line, and Perlin noise waveshapes. This makes it an efficient drop-in replacement for all those cycle~ + snapshot~ instances you might have scattered around your patches. The timing of the LFO is clocked to real time, so you will get a steady timed value out output even if your bang messages aren’t quite in time.
    The “accum” mode of jit.mo.time gives you a running-time clock value that can be used to drive the rest of your patch. This is super useful when you are running a show that relies on tight time sync, and for driving animations and simulations that evolve over time. To reset the accum clock, just send a “phase 0” message to jit.mo.time.
    Finally, the “delta” mode gives you the time in between frames (or bangs, if not running with jit.world). This can be used as a time multiplier, for example, when doing particle or physics type simulations where variations in frame timing could ruin the effect. It can also come in handy if you just need to know how long it has been since the last event.

    Fields

    Whether you are generating geometry with jit.mo objects, working with particle simulations, or just manipulating 3D points, the jit.mo.field and jit.mo.fieldmask objects are essential tools to liven up your motion. The basic idea is that you start with a location in 3D space (@location), and the field objects compare the values of the incoming matrix with that 3D position. If the incoming value falls within the radius (@radius) of the field, then jit.mo.field will affect the position value accordingly. The other attributes of the object (translate, force, falloff, rand_amt) define how points within the field are manipulated.
    If you’d like to take that field and use it to manipulate things like scale or rotation of a jit.gl.multiple, you can use jit.mo.fieldmask for that. This object is really similar to jit.mo.field but instead of passing a manipulated matrix of positions out, it provides a grayscale mask that represents whether the point is within the field radius (with falloff applied as well). This can be a little hard to articulate in words, but to see an example of this in action, try out the patcher below.
    To explore more, find and install jit.mo in the Max Package Manager. For more info about the jit.mo package, don’t miss our quick start videos. Don’t forget to share your own jit.mo tricks in the forum.