jit.gl.pix sample wrap

billyanok's icon

Hello,
Is it possible to use the sample object within jit.gl.pix and prevent an image from wrapping continuously?
I've attached an example-
Thx!
Billy

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

michelez's icon

you need to set it to @boundmode clamp

billyanok's icon

Hello Michelez,

Thank you for the reply but maybe I didn't explain myself clear enough.
With @boundmode clamp the last pixel gets stretched. I've attached 2 pics to demonstrate.

Thank You,
Bill

@boundmode clamp

@boundmode wrap - Is there a way to stop the image from wrapping on the other side.

MakePatchesNotWar's icon

Only fixed it for the red channel but you get the idea.

Luvulongtime!

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

2K's icon

Here is a gl.pix rota version with the "clear" boundmode.

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

billyanok's icon

Hey @Luvulongtime @2K,

Thank you for the examples, gotta love jit.gl.pix!


Bill

billyanok's icon

Hey luvulongtime,
What about the Y axis? Works great on the X but not on the Y?
That indeed,
Bill

MakePatchesNotWar's icon

It works for both x/y now.

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

billyanok's icon

luvulongtime soldier!

Thx for your help,
Bill

MakePatchesNotWar's icon

Hehe, no problem :)

Gary Lee Nelson's icon

Wondering if this is a good place to ask this question.

I want to use jit.matrix to hold note lists - 5 columns by N rows. Each row holds action time, pitch, velocity, duration, channel. Perhaps more parameters affecting synth parameters like envelope attack time, etc.

I want to perform operations like this.

Transpose: add or subtract an interval from column 2.
Invert: find min/max of column 2 and perform that math.
Augmentation/Diminution: multiplication on columns 1&4.
Rubato: apply a time-varying tempo function to columns 1&4.
etc.

What's best for this...gen, pix, js?

Does anyone have examples of getting in and out of matrices to do this?
(I have a general understanding. I regularly extract rows and columns to generate note sequences and control functions from the planes of images.)

Gary Lee Nelson's icon

luvulongtime's patch from 1/20/2018 is a good starting point.