Switching one toggle off when another is activated

Alani's icon

Hi guys,

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

I'm trying to create an application for launchpad where there are 8 columns, each one with 8 loops. When you switch a loop on the previous loop in the column is switched off. I've got a solution posted below to switch off the previous playing loop but it's really messy, is anyone able to point me in the right direction with this?

Wetterberg's icon

yeah, you're running into problems because your design *starts* by giving up any notion of what your midi notes are. You need to hang on to it for dear life.

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

Consider this example instead:

Wetterberg's icon

inbetween the stripnote and the select objects you can have your filtering, btw. (the "does it belong in this row or another one?" stuff. [split] works well for this.

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

here's a clean one in a solo-button fashion.

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

This abstraction expects to get a number in any of its inlets, and will pass the number out the corresponding outlet, but before doing so it will send a 0 out the previous outlet.

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

In Max there is almost ready-made solution to the OP's problem: matrixctrl

Brian H.'s icon

...Or [decode]? I think it might be intended to helpful for what you're describing, but I've never quite found a place where it makes sense.

benniy's icon

wow! liking that one!

Alani's icon

Really helpful responses guys, much appreciated. Still trying to wrap my head around your one a bit Bennnzzz, it's really cool but it seems like note 9 on it doesn't work and I'm not sure why.

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

hehe you've tried them all! :)
my mistake – to spare wires i'm using [pvar] object to address the (scripting-named) toggles.
toggle 9 was named wrong. easy as that :)