Get keyframes/timestamps from Kairos Timeline

Hi! I am new to Gamma and Kairos and want to ask how is it possible in Timeline to create something like timestamps or states (like “Beginning”, “Scene1”, “Transition”, “Scene2”…) and to get a spread of names and time values (keyframes) of these timestamps out of the Timeline (like “Beginning” 1.0, “Scene1” 3.0 etc.)? In Beta’s Timeline there were output pins like AutomataState and AutomataStateTime which did exactly this… I thought of creating a string track in Kairos Timeline - but how can I get the keyframes of this track? Thanks!


Hello @overtones,
good to see you patching along with kairos.

Let me introduce you to a very simple concept thatis at the core of kairos, that will help us out after:
every kairos node follows a programming pattern named Model-Runtime, where basically the configuration of your node (in the case of the timeline: all the tracks and keyframes) is stored inside the node as an immutable description of the program, called Model. It’s like the complete instruction for the runtime to instantiate the living node. it’s the genetic code, so to say…
in kairos you can always retrieve the Model of a node, and you can even programmatically edit it (from the patch, for example). the runtime will react to the changes and update the living node to the latest Model.

In your case you simply want to read out the keyframes of a track (of type String) named Scene.
I attach a patch where you can see how to:
1- get a Model out of the Timeline
2- retrieve the track that you are interested into
3- retrieve its keyframes and read their data
ExtractSceneTrackKeyframesUtil.vl (60.8 KB)

This is a preview of the patch and what it doews:

QUICK NOTE:
You are currently (rightly so) using a very old version of kairos, since a more recent nuget was only released as prerelease.
You can keep going with this version, keeping in mind that very soon there will be a new release, quite different (way simplified also at the model level) and that you will need to change some of these patches if you want to jump to latest version.
I don’t exclude that there will be Markers in the new timeline, so that you don’t need to workaround it using a string track.

I hope this helps

Best

2 Likes

Thank you so much @dottore for all the explanations. It works well on my side, but I’m also looking forward to the new Kairos version.
One last question: When retrieving track values, for example with SampleTrack, is it possible to get the vertical line in the Timeline Window moving to the same time position? Or is there any way to precisely set the time position of this vertical line from outside, without pressing the play button in the Timeline’s UI? It would be just very comfortable to see this vertical line in a position which corresponds to the values I am getting with SampleTrack. Many thanks!

hey,
first of all, we need to make sure you have the right setup in the patch:
are you using Compositionsampler and the kairos clock like in the timeline help patch?


if so you can control the time by operating on the Clock node (Seek operation).
In the Timeline UI you can also use the mouse on the timebar to set and scroll time. by keeping Shift pressed you also snap to time grid.
SetClockTimeViaMouseInteraction

If you have ideas for improving the experience you can describe them as issues in the repository. it’s cool to collect there all the requests ;)

cheers

Great, thank you again @dottore for your help! I used SampleTrack before which didn’t let the line move, but with Clock it works well now.

Hey @dottore!

I hope I still can ask you a few questions here which came up while working with Kairos. Is it possible in the timeline editor to select keyframes (points) from several tracks at once and to move them all together along the timeline?
And is the new (stable?) version of Kairos already available? Will it include Markers in the timeline? It would be also nice to be able to aline/stick the keyframes to these makers.
If it is any helpful, I am happy to add these questions to the repository. Many thanks in advance for your help!

hey @overtones ,
I’m so sorry for the late reply. I don’t come here that often lately.
Regarding your questions, I think you should already be able to select keyframes across multiple tracks and drag them around.
Regarding the wishlist of desired features, add them to the issues section of the repository. it’s the best way to collect them ;)

Hey @dottore! First of all, thank you for replying!
I tried to select keyframes across multiple tracks, and it worked with +Ctrl, but I can’t drag them - they simply don’t move. Are there any shortcuts which I am not aware of?
Then I wanted to try out the Kairos 2.0.2.-preview version, but that didn’t worked at all with the old patch and the old Timeline.
So, I deleted it and installed the old 1.1.10 version again. I expected that everything will work like before, and the Timeline in the Editor indeed appears the same. HOWEVER I can’t drag the keyframes at all anymore, even not within the single track… I only can change them manually with the Inspector.
Do you have any idea what went wrong? Before trying the preview version everything worked fine…
Even if I make a competely new patch with a new Timeline and Editor (in 1.1.10), I can’t move the keyframe. It seems like the editor is locked… However, I can make new keyframes by doubleclick. But I can’t drag them. Really strange. It is a real problem because I can’t work on the project anymore. Thank you!

Kairos

The new kairos (preview) version is endeed not compatible with the old one.
switching between nuget versions is always a pain in vvvv.
you need to make sure that:

  • you didn’t save the patches while using the kairos preview version: it could have changed the kairos models and the old version might not be able to handle it. If the patches were changed, repristinate them to an untouched version.
  • to be sure, navigate to the installed nuget folder and delete the kairos preview version.
  • if you use the gamma launcher app, try to enable the advanced flag “No cache”, to make sure that vvvv recompiles the nugets without relying on cached outdated versions

Thank you for the quick reply. Now I luckily got it working again, and the problem was that I only deleted the Kairos new preview version and the new Runtime version, but not the newer versions of the other nuget folders (AlchemX, LayerX…) automatically added during installing.
And then, during installing the old Kairos 1.1.10 again, it didn’t install the older versions of these dependent packs because it already thought that there is a newer version in the folder. But obviously they don’t work well with the older Kairos version. So after deleting everything related to the new Kairos and installing the older version again, it works well as before.

But still, it isn’t possible to select or mark keyframes from multiple tracks and drag them all at once. Or is there any shortcut I am not aware of?

Kairos

i don’t think multi-selection/editing works in 1.1.10