Forums > MaxMSP

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

March 25, 2010 | 6:54 pm

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?


March 25, 2010 | 6:59 pm

i think the matrixctrl could do it.

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


March 25, 2010 | 7:16 pm

ubutton is one way fwd


March 25, 2010 | 7:43 pm

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

– Pasted Max Patch, click to expand. –

March 25, 2010 | 7:49 pm

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?


March 25, 2010 | 8:07 pm

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



pid
March 25, 2010 | 10:59 pm

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.


April 4, 2010 | 3:38 pm

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

lh


Viewing 8 posts - 1 through 8 (of 8 total)