maxuino buttons, ramping lines


    Apr 09 2013 | 5:07 am
    Hello, thank you for your response!
    Im looking for an object that, when pressed down will either out put bangs or count up.
    Basically what im doing is creating a floor pad that you step on. When you do it activates and numbers in my patch go up to a max point (effecting an image). I was trying to avoid the line object because that just triggers and counts up. I wanted it to be dynamic in a since that when you step off of the pad the numbers (image effecting) stops and goes back down to 0 or not effecting it at all.
    so simplified is there an object that can count up when held down and count back down to 0 when not being pressed?

    • Apr 09 2013 | 5:22 am
      I forgot to post, i came up with this, but is there a more elegant solution? I know from experience that button debugging is kind of a pain, although this time i am using pressure sensors to keep the "button" held down, I just forsee future hardship with the toggle actually being banged a ton of times and not so clean as it is here...
      again thank you for the help! EDIT: how do you post from clipboad on the edit post screen haha?
      {
      "boxes" : [ {
      "box" : {
      "maxclass" : "number",
      "parameter_enable" : 0,
      "id" : "obj-104",
      "fontname" : "Arial",
      "numinlets" : 1,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "int", "bang" ],
      "patching_rect" : [ 228.0, 253.0, 50.0, 20.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "counter 1 2",
      "id" : "obj-102",
      "fontname" : "Arial",
      "numinlets" : 5,
      "numoutlets" : 4,
      "fontsize" : 12.0,
      "outlettype" : [ "int", "", "", "int" ],
      "patching_rect" : [ 228.0, 231.0, 73.0, 20.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "select 2",
      "id" : "obj-101",
      "fontname" : "Arial",
      "numinlets" : 2,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "bang", "" ],
      "patching_rect" : [ 292.5, 284.0, 52.0, 20.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "select 1",
      "id" : "obj-100",
      "fontname" : "Arial",
      "numinlets" : 2,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "bang", "" ],
      "patching_rect" : [ 167.5, 284.0, 52.0, 20.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "150, 50 1000",
      "id" : "obj-98",
      "fontname" : "Arial",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 13.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 320.5, 307.0, 86.0, 19.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "number",
      "parameter_enable" : 0,
      "id" : "obj-97",
      "fontname" : "Arial",
      "numinlets" : 1,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "int", "bang" ],
      "patching_rect" : [ 235.5, 374.0, 50.0, 20.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "50, 150 1000",
      "id" : "obj-95",
      "fontname" : "Arial",
      "numinlets" : 2,
      "numoutlets" : 1,
      "fontsize" : 13.0,
      "outlettype" : [ "" ],
      "patching_rect" : [ 173.5, 308.0, 87.0, 19.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "newobj",
      "text" : "line",
      "id" : "obj-94",
      "fontname" : "Arial",
      "numinlets" : 3,
      "numoutlets" : 2,
      "fontsize" : 12.0,
      "outlettype" : [ "", "" ],
      "patching_rect" : [ 235.5, 341.0, 46.0, 20.0 ]
      }
      }
      , {
      "box" : {
      "maxclass" : "toggle",
      "parameter_enable" : 0,
      "id" : "obj-93",
      "numinlets" : 1,
      "numoutlets" : 1,
      "outlettype" : [ "int" ],
      "patching_rect" : [ 228.0, 205.0, 20.0, 20.0 ]
      }
      }
      ],
      "lines" : [ {
      "patchline" : {
      "source" : [ "obj-95", 0 ],
      "destination" : [ "obj-94", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-94", 0 ],
      "destination" : [ "obj-97", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-98", 0 ],
      "destination" : [ "obj-94", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-100", 0 ],
      "destination" : [ "obj-95", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-101", 0 ],
      "destination" : [ "obj-98", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-93", 0 ],
      "destination" : [ "obj-102", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-102", 0 ],
      "destination" : [ "obj-104", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-104", 0 ],
      "destination" : [ "obj-100", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-104", 0 ],
      "destination" : [ "obj-101", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      ],
      "appversion" : {
      "major" : 6,
      "minor" : 0,
      "revision" : 8
      }
      }
    • Apr 09 2013 | 6:21 am
      Hi paperluffy,
      the ubutton is maybe good for this.
      PS: There is also a copy compressed funtion in Max, so the code you looks a bit more like this ;)
    • Apr 09 2013 | 7:27 am
      Hi
      If the inactive or dormant state of the sensors = 0, then try [> 0] into [togedge]. From here you can trigger any process, such a metro to counter, or line. Or look at [clocker] if your processes are based on contact duration.
      Brendan
    • Apr 09 2013 | 7:48 am
      sounds like you need adsr~, really.
    • Apr 09 2013 | 3:15 pm
      Ill test out all of them, thank you for the quick replies! and @django I was looking for that on the edit post section haha, I havent posted in awhile so I forgot it's actually in max. Thanks for the tip.
    • Apr 09 2013 | 7:29 pm
      This is less sophisticated than [adsr~]:
      Brendan