16x16 grid that can be filled with different colors when mouse click on cells
Hello.
I want to create a painter that will actually send midi notes to a midi controller using a midiout object.
what can be used as 16x16 grid object in order to be able to draw with a mouse a 16x16 shape with different colors and to be able to parse
it and send it to a java extern ?
any information regarding the issue would be greatly appreciated
thank you!
kfir
You can use [matrixctrl] in dial mode as a big grid with lots of states/colours for your interface. Parsing the state of each cell and turning it to MIDI is definitely possible but will depend exactly on what sort of mapping you want. Have a look through the basic Max and MIDI tutorials to help get yourself started and if you have any more specific questions when you get started then feel free to ask away!
i thought about using the matrixctrl, what i could find is how to change color to each item in the matrix. any ideas ?
it seems that with dial mode disabled is the desired behaviour from the matrixctrl but i'm having problem understanding how to use custom colors. do i must use custom images for that? and if so how ?! thanks!
Here (hopefully) is an example of something I've used before. It's a simple 8 state PNG which you would need to set as the cell image. You'd also need to set [matrixctrl]'s cell range to 8 and check the inactiveimage box (leave the imagemask and clickedimage settings unchecked in the inspector). Hopefully these settings match the image file (they seem to work for me but if not then you might need to tinker a little). I hope it gives you an idea of how to create these images. You can have dial mode on or off depending on how you want the user to interact with the cells. I personally prefer leaving dial mode off and using the "clickvalue" message to choose which state to use globally.
Here's a 16x16 matrix of toggles (click to see), with each cell having a different color for its "on" state. (The colors are assigned at random, just to demonstrate, but you could fill the coll in the subpatch with whatever RGB color values you want, and remove the random color assignments.) Is that anything like what you intend?
Christopher Dobrian: you example looks really cool. i'm a real beginner, never worked with jitter if you could explain more on how to work with your example that would be great. thank you!
Luke: using your image and testing your example! thank you!
Luke! it works amazing! it has a small glitch that i see half of the first box that i pressed on while i have the mouse pressed and i see it totally when i release the mouse click. it doesn't happen on Christopher solution. but then again i have no idea what jitter is! so first of all thanks so much for everything!
that's an awesome solution!!!