Toggle buttons using a midi controller

jl8080's icon

I have a problem regarding the toggle button. Basically what I want is when I press button X on my usb controller, i want the toggle to be on until i press button X again, so the toggle goes off.

I have temporarily solved this using a counter [Counter 0 0 2] this object (or how i have programmed it) isnt fail-safe as sometimes when I press button X to turn the toggle off it doesnt work and i have to press it a few times! I know it has something to do how ive programmed it but if anybody could shed some light on this i'd be greatful.

Eav's icon

Something like this?

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

best

yves

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

dx1200's icon

Some midi controllers, such as the M-audio Axiom line, have a function that allows you set the keys to trigger note ons and will not send note off until it is hit again. Check your manual if none of the patches above work for you (not that they won't).