Boolean invert (Not gate)

mattybigback's icon

I've got a patch that's set up so that if I press a button on my launchpad it will assign a cell on an 8x8 matrixctrl. I want to be able to toggle ther cells using the launchpad buttons, so I've set up a checking system that uses getrow to create a list of what is on and what is off, and then use if statements to create binary switches that'll turn a cell on or off depending on its current state

The problem is that if I press one button and then press the one next to it the if statements don't update straight away, so I have to press the button twice.

Could anyone see where I'm going wrong?

Many thanks
Matt

4443.Untitled2.maxpat
Max Patch
Floating Point's icon
Max Patch
Copy patch and select New From Clipboard in Max.

try this:

you had a catch 22 situation where you need access the info before you know what it is. study the trigger object to carefully assign the correct message ordering that is needed: I made a different approach where you use == and zl mth instead of trying to switch according to not-yet-known status...

mattybigback's icon

Thanks so much! I've only been using Max about a week so I'm not familiar with most of the elements yet. This helps a lot, I can begin tidying up the other parts of this project now =]