Is there are UI object that can detect push and release?
I'd like to have buttons in my patch that when pressed and held, change the state of the patch until the buttons are released.
I know that Max can detect keyboard key press on and off, and midi note on and off, however is there a way to do it with buttons in a gui?
i think the matrixctrl could do it.
if all else fails, there should be a jsui object.
ubutton is one way fwd
Here's a hastily extracted and adapted to use ubutton "Key Repeat" thing I use in some patches:
oh ubutton would be perfect accept i'm hoping to also use this patch in M4L and I'd prefer to be able to map a controller to this button easily. any idea on creating the same behavior using the standard bang or toggle?
The patch I posted could easily be modified to use a toggle as its input. Slap a [sel 0 1] after the toggle to get the on and off states
er, in mfl just bind the ubutton to a pattr and make a passive loopback with a live.toggle set to 'hidden'? oh, and use chris' idea with that.
I know I'm a bit late to the party but [pictctrl] does this all by itself.
lh