momentary button

    MaxMSP

    mantaraffu's icon
    mantaraffu's icon
    mantaraffu
    May 07 2011 | 1:42 pm
    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
      Home Surgery's icon
      Home Surgery
      May 07 2011 | 2:06 pm
      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.
      Share
    • Christopher Dobrian's icon
      Christopher Dobrian's icon
      Christopher Dobrian
      May 07 2011 | 7:16 pm
      Max Patcher
      In Max, select New From Clipboard.
      Show Text
      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
      seejayjames's icon
      seejayjames
      May 07 2011 | 8:55 pm
      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
      Christopher Dobrian's icon
      Christopher Dobrian
      May 08 2011 | 2:02 am
      Oh, yeah. I forgot that ubutton does both. That's the simplest.
    • mantaraffu's icon
      mantaraffu's icon
      mantaraffu
      May 08 2011 | 12:03 pm
      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
      mantaraffu's icon
      mantaraffu
      May 08 2011 | 12:28 pm
      yep, I was working with 0 only on the select object. problem solved with select 0 1 .
    • Steven Pickles's icon
      Steven Pickles's icon
      Steven Pickles
      Apr 03 2017 | 8:02 pm
      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
      Nicolas Bazoge's icon
      Nicolas Bazoge
      Oct 01 2020 | 6:29 pm
      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] !