turning toggles off

Jonas Mason's icon

Hello
I am hoping somebody can help with this problem.
I have a patch whereby there are 6 streams of data all connected to six on off toggles. I have scaled the incoming data. When the data is equal to or less than 2 the toggle is turned on which then triggers a video. There are six videos. When the next button is triggered i want the toggle currently on to turn of so that at any one time there is only one toggle turned on out of the six.
It seems so basic but I cannot seem to fathom out how to do this. I have tried the trigger, bangbang, togedge and switch objects but these objects do not work.
Any help on this would be greatly appreciated.
Here is the section of the patch in question.
Best regards and thank you in advance.
Jonas

Rodrigo's icon

There's nothing attached.

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

But if you want thing to be exclusive you should look at matrixctrl.

Jonas Mason's icon

Hello
Sorry i thought i had attached the patch.
I am just looking at matrixctrl. but i am not sure if this will work.
Thanks again
Jonas

on-off-query-.maxpat
Max Patch
Wil's icon
Max Patch
Copy patch and select New From Clipboard in Max.

try this

metamax's icon

Jonas,

The matrixctrl object in Rodrigo's patch is set to allow only one cell on per matrix. That means, it sends an 'off' message before turning the next one on. Exactly what you want. All you have to do is index the [

Something like this:

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

benniy's icon

[decode] is sometimes useful!

Jonas Mason's icon

Hello
Thank you so much... yes Metamax and Rodigo I can now see how the matrixctrol can work, and also your example Wil will also do the job.
Thanks again... it is much appreciated.
Best regards
Jonas

Jonas Mason's icon

Hello
Benny I have just tried the decode object and that also works so thanks so much for that suggestion.
BW
Jonas