Doing jit.slide in jit.gl.pix

geddonn's icon

Hi there, I've been trying to get a version of jit.slide working in jit.gl.pix so I can have independent control of 'slide_up' and 'slide_down' for a blur effect.

So far I have worked out how to do the blur sending the texture out, capturing it and mixing it back in. I thought I would be able to split the attack and decay by using greaterthan/lessthan to compare the input and captured texture. (I believe sending the texture out and capturing it adds a single frame delay, is that right?). I'm not getting anywhere near the desired effect though.

I was also wondering if there is a way of delaying a texture by longer than a single frame, I have tried speedlim and pipe to no avail.

Max Patch
Copy patch and select New From Clipboard in Max.

I have attached an example patch to show where I'm at so far.

Pedro Santos's icon

Why not use [jit.gl.slab @file tp.slide.jxs]? It's already done for you...

geddonn's icon

Thanks for the tip. I guess there are a number of reasons. Mostly so I can better understand the concept, so I can tweek it (I have more experience with Gen stuff than java). I've had a look at the tp.slide.jxs code to try and decipher how I might do this in Gen. Still not quite getting it though. Any further help would be great.

geddonn's icon

Just figured it out with a little help from the Gen~ examples.

Max Patch
Copy patch and select New From Clipboard in Max.

Pasted below for future reference.

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

hello farfisavox.
i believe you can simply your patch even further:

geddonn's icon

Aha! Thanks Rob, that's much neater. All of this videoplane and node stuff made me forget about the slab.
Do you know how to make a delay longer than 1 frame in GL? That's the only thing I'm still struggling with at the moment.

Rob Ramirez's icon

it's a little tricky. i made this wiki page to describe the process: https://cycling74.com/wiki/index.php?title=GL_Texture_Delay

geddonn's icon

Wow thank you Rob. I was half-expecting it was going to be more difficult than simply shoving a [pipe] object in there. I'll give your patch a close look and try to soak up all the knowledge.