Dynamically change jit.playlist content

LSka's icon

Hi all,
Is there any way to add and remove movies in jit.playlist other than drag and drop? For example, I'd like to have a single jit.playlist in my patch and change the playlists inside it as 'scenes' change (using pattrstorage).

Is there any way to do this?

Thanks,

Lska

LSka's icon

Ok, I sorted it out by reading [playlist~] reference: you can use the "append" and "remove" messages to add and remove items in the playlist...
Now I just have to cook some method to store the playlists and recall them... I think it's time to learn to use dictionaries!

LSka's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's how to save different jit.playlists in a nested dictionary.

Now, I'm struggling to figure out how to extract the relevant data from the dict... can anyone help?

LSka's icon
Max Patch
Copy patch and select New From Clipboard in Max.

After weeks of struggling and dealing with objects and their own peculiarity and idiosyncracies... I finally came up with something usable.

You can store and recall playlists, including the "loop" and "selection" options.

As you can see, it's pretty complicated and convoluted... so any hint towards simplifying this kind of management (maybe JS would a good place to do all of this in just a couple of FOR loops? ) is highly appreciated!

hzd's icon

Thank you for this.
Very much needed :)

And yes please, if there is a tidier way of doing this, but 'till then, this works fine.