momentary button

mantaraffu's icon

Hi, I need a way to have all my slider value set to 255 (I'm working on dmx project). when bang is pressed all value go to 0 for comeback to 255 when bang is released. any suggestion?

Home Surgery's icon

I'm not sure I understand your question, can't you just send 255 as a message and connect that to your sliders?
A patch would help.

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

Interestingly, there aren't that many objects that respond to BOTH mousedown and mouseup (at least not that many I know of). One object that does respond to both is lcd. Another is mousestate. Here are solutions for each. Probably someone has already designed something using jsui, as well.

seejayjames's icon

I use [ubutton] for these kinds of things, you can lay it over anything you want. Do check the "mouse released outside" outlet, you will probably need to incorporate that possibility into your clicking/releasing logic.

Christopher Dobrian's icon

Oh, yeah. I forgot that ubutton does both. That's the simplest.

mantaraffu's icon

yep, ubutton is a good way, but it doesn't work in this case. I explain my project. I've a rough with 16 arduinos button that control 16 rgb led par. all par value are on 255, when a button is pushed 2 value go to 0. when the button is released, the values return to 255. I know, is a simple thing, but it drive me crazy. I'm working now on Christopher suggestion...

mantaraffu's icon

yep, I was working with 0 only on the select object. problem solved with select 0 1 .

Steven Pickles's icon

I've found [pictctrl] to be the laziest way to do this since it outputs a 1 on mousedown and 0 on mouseup.

Nicolas Bazoge's icon

Thank you Steven, [pictctrl] is indeed the simplest solution. I don't see how [ubutton] can do that... And I also don't understand at all why this option doesn't exist in [textbutton] !