Is there are UI object that can detect push and release?

Mar 25, 2010 at 6:54pm

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?

Mar 25, 2010 at 6:59pm

i think the matrixctrl could do it.

if all else fails, there should be a jsui object.

Mar 25, 2010 at 7:16pm

ubutton is one way fwd

Mar 25, 2010 at 7:43pm

Here’s a hastily extracted and adapted to use ubutton “Key Repeat” thing I use in some patches:

– Pasted Max Patch, click to expand. –
Mar 25, 2010 at 7:49pm

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?

Mar 25, 2010 at 8:07pm

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

Mar 25, 2010 at 10:59pm

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.

Apr 4, 2010 at 3:38pm

I know I’m a bit late to the party but [pictctrl] does this all by itself.



You must be logged in to reply to this topic.