jit.anim.path - path saving? next/previous?


    Feb 18 2017 | 11:34 am
    I'm doing a patch that uses a lot of jit.anim.path and i have few questions.
    1. it seems there is no way to save adited paths to file. i can certainly built the system (using edit, getpoint, insert and delete messages) that saves the path in one way or the other and recreates it every time using append messags to jit.anim.path, but i wonder if there is something else that i'm missing?
    2. is there a way to force the object controlled by jit.anim.path to go to the certain index point in the path when it is stopped? next and previous messages do work, but they don't update the position of the object, when play is stopped. the only way to manually control the position is using eval message, but there is no way to know when the object is exactly at index point.
    3. i'm not clear on how time of an index point works. is the time between that index and previous point? what does sorttime do if those are just times between points? is tthere an automatic way to get the came speed along the path (i know how to program it, i just wonder if there is a built in feature that i'm missing)?
    4. what does timemode do?
    i found some errors in reference file: - it mentiones @lenght @duration @pointcount @position.... but they don't exist
    klif

    • Feb 20 2017 | 7:22 pm
      hi klif
      1- so jit.anim.path can handle path matrices output from jit.path. therefore you can use jit.path to construct your path (one caveat is it requires the time values to be absolute time rather than relative time), and output it as a matrix to jit.anim.path. you can then use all the jitter-matrix tools to store and recall your paths. perhaps most useful is to use jit.matrixset to write multiple paths to memory, and use the write and read messages to matrixset to write those paths to and from disk.
      the example below shows how you can toggle between two jit.anim.path paths using jit.path and jit.matrixset
      2 - i'm getting some strange behavior with the next/prev messages. i'll look into that.
      3/4 - the time is either the absolute time in seconds, or the relative time from the previous point, depending on the value of the timemode attribute. sorttime reorders the points based on the time value if they are out of order.
      if you want to animate along the path at a constant speed, use the evallength message. send it a value between 0 and the current length of the patch (available via the length attribute). if you linearly interpolate between those values, the speed will remain constant. i can post an example if that's not clear.
      thanks for the ref-page notes. i'll get those fixed up.
    • Feb 20 2017 | 7:51 pm
      thank you rob! everything is perfectly clear, and thanks for the patch :)
      i was also getting freezes and crashes ocassionally when i was trying next/previous messages. ( i am not so happy with my computer lately, and i wasn't sure if was max or computer, so i didn't report that)
      klif