Help with Max grid patch

Hi All,

I’m working on a patch and I’m having trouble finding a clean and tidy way to get information from a single button press.

This is what I have so far.

I was wondering whether there was a cleaner way to get the input from a grid?

Thanks in advance!

I generally come up with some function for converting X-Y coordinate to something useful.

For example, to convert X-Y coordinate of an 8x8 grid to sequential numbers (left to right and top to bottom, 1-64) I’d use:

(x + 1) * (y + 1) + (7 * y) - (x * y) - 1 = index

1 Like

untested, but try to understand what this patch is doing and it’ll improve your max skills.

indexes keys like murray suggests, and sorts them into key up and key down, uses sel to associate bangs with specified indexes


Also, i’d like to add that tehn’s approach is deeply used in the Max Grid Studies


Thanks @tehn,

That has worked brilliantly!

I’ll persevere to study the grid studies and help files in future.