elegant way for radiobuttons?

dibek's icon

Hi i´m having eight buttons on my controller, but i need only one at a time active

i came up with this VERY awkward but at least working solution (i had another one, even more complicated:)) and i´m sure there are much more elegant ways how this can be done, would be great if one of you could chime in and help me to learn better patching!

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

thanks a lot!

`

Peter Castine's icon

Does [radiogroup] not work for you?

dibek's icon

hm, that would give the same problem, that i get out a single digit but my buttons need 3 values [button, row, state] to work.

that´s why i have those messageboxes, i thought there might be a way to avoid this.

Christopher Dobrian's icon

Yes, I think you're making it more difficult than you need to. It might be that the right outlet of matrixctrl is not what you want, but the left outlet is exactly what you want.

As I understand what you want, whenever one thing in a set gets turned on, you want the previously-on thing in that set to be turned off automatically. That's a commonly needed trick, and the way to do it is simply to store the ID of the thing that's on, then when a new ID comes in, turn off the old ID, replace it with the new ID, and and turn on the new ID. See the example on the left.

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

It turns out that that's exactly what matrixctrl does when you set its one/row attribute. See the example on the right.

dibek's icon

Hello, please excuse my late reply, your tips are very apprechiated!

it´s a constant struggle for me to get a xox style programming going, not the basic function itself, with the help of you fine gentlemen, but to get the graphics right, it´s always kind of flickering lights, when the playhead leaves a step it takes a littlewhile until the step comes back to light and so on, i need to get this right :)

raja: it´s an ableton push, which i really dig but i do also have two 40h, time to let one of them go, three grid controllers is a tad too much :)
i found it´s surprisingly easy to convert a monome patch to the push or the other way around.

Ernest's icon

Maybe you will find the tabs object more useful for a good UI

Capture.jpg
jpg
dibek's icon

thanks ernest,

unless i got your advice you wrong it´s not the gui on the maxforlive devices itself that pains me but the gridlights on the controller.