Forums > MaxMSP

[jit.gen] compare & retrieve cell

August 3, 2012 | 4:03 pm

Hi all,

Need somebody to tell me if it’s possible;

i want to retrieve at each instant in [jit.gen] the index of the cell where [ in1.y ] is the smallest value in comparison with other in [in1.y]
knowing that the values ​​are different and change….

attached patch :

– Pasted Max Patch, click to expand. –

August 4, 2012 | 6:17 pm

Do you mean, you’re looking for the cell where in1.y is the smallest in.y in the entire matrix? If so, you can do this easily with jit.3m and jit.op. jit.gen isn’t going to give you any advantages for this problem. You can use jit.3m to get the min value for the y value and then use jit.op @op < = to mark the cell with that value.


August 4, 2012 | 8:12 pm

Thank you for your answer Wesley,

you understand what I meant and I wanted to know if this was possible using [jit.gen].


August 4, 2012 | 8:52 pm

You can use jit.gen, but you’ll want to use jit.3m as well. It’s the most efficient way to figure out what the smallest value in the entire matrix is going to be.


August 30, 2012 | 4:17 pm

could you please detail the jit.op marking process to finally have the cell coordinates ?


August 30, 2012 | 4:43 pm

oops. no prob. I had another artifact that glitched my stuff.
this is pretty obvious with jit.findbounds

here is the thing for people for whom it isn’t.

– Pasted Max Patch, click to expand. –

[attachment=202476,4348]

Attachments:
  1. cellMarking.PNG

Viewing 6 posts - 1 through 6 (of 6 total)