How do I turn two values into xy coordinates?

Jamcob's icon

I have some basic jitter colour tracking going on, I have a linear scale of 1 to 10 for the x axis and the same for the y.

I'm trying to create an imaginary 'grid' within the Jitter window so when ever the colour tracked is in a specific grid it can trigger something. but each grid needs to have it's own unique value so I can use the select object.

Is there a way I can turn these into coordinates or a way I can give each "grid" it's own unique value?

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

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

you have to do just the right [scale] function. it's a little tricky to get the right mapping, because you need floats first (so you have full sizes in each grid cell), then you use ints to set a [gate] to split things around. probably there are other ways too, but this seems to work:

Jamcob's icon

Thank you, sometimes when sitting in front of Max I get a little stuck in my ways and I end up banging my head against the desk due to the fact that I don't see other ways around it. This is a very simple solution, thank you very much.

seejayjames's icon

Don't worry, I only had this solution because I did my own share of head banging in another similar project, believe me...happens to all of us I think ;)

There definitely are a lot of tweaks you can do with [scale] and [round] and converting to and from ints and floats...sometimes it just takes a lot of experimentation to get what you want.