Flash Button in Max


    Dec 08 2013 | 8:46 am
    Hi, i want to create a "flash button". Something you would have for example on a lighting console.
    So as long as pressed it should send a '1' and when released '0'.
    greets

    • Dec 08 2013 | 2:26 pm
      Salut
      essaye ce petit patch que je viens de faire
      ----------begin_max5_patcher----------
      {
      "boxes" : [ {
      "box" : {
      "maxclass" : "message",
      "text" : "0",
      "numoutlets" : 1,
      "fontname" : "Arial",
      "presentation_rect" : [ 165.0, 45.0, 50.0, 18.0 ],
      "id" : "obj-2",
      "patching_rect" : [ 165.0, 255.0, 50.0, 18.0 ],
      "presentation" : 1,
      "fontsize" : 12.0,
      "outlettype" : [ "" ],
      "numinlets" : 2
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "1",
      "numoutlets" : 1,
      "fontname" : "Arial",
      "id" : "obj-17",
      "patching_rect" : [ 195.0, 135.0, 32.5, 18.0 ],
      "fontsize" : 12.0,
      "outlettype" : [ "" ],
      "numinlets" : 2
      }
      }
      , {
      "box" : {
      "maxclass" : "message",
      "text" : "0",
      "numoutlets" : 1,
      "fontname" : "Arial",
      "id" : "obj-16",
      "patching_rect" : [ 165.0, 135.0, 32.5, 18.0 ],
      "fontsize" : 12.0,
      "outlettype" : [ "" ],
      "numinlets" : 2
      }
      }
      , {
      "box" : {
      "maxclass" : "led",
      "numoutlets" : 1,
      "presentation_rect" : [ 165.0, 75.0, 45.0, 45.0 ],
      "id" : "obj-15",
      "patching_rect" : [ 165.0, 180.0, 45.0, 45.0 ],
      "ignoreclick" : 1,
      "presentation" : 1,
      "parameter_enable" : 0,
      "outlettype" : [ "int" ],
      "numinlets" : 1
      }
      }
      , {
      "box" : {
      "maxclass" : "ubutton",
      "numoutlets" : 4,
      "presentation_rect" : [ 165.0, 135.0, 45.0, 45.0 ],
      "handoff" : "",
      "id" : "obj-14",
      "patching_rect" : [ 225.0, 60.0, 45.0, 45.0 ],
      "dragtrack" : 1,
      "presentation" : 1,
      "hltcolor" : [ 1.0, 0.0, 0.0, 0.501961 ],
      "hilite" : 0,
      "outlettype" : [ "bang", "bang", "", "int" ],
      "rounded" : 4.43,
      "numinlets" : 1
      }
      }
      , {
      "box" : {
      "maxclass" : "textbutton",
      "numoutlets" : 3,
      "fontname" : "Arial",
      "borderoncolor" : [ 1.0, 0.0, 0.0, 1.0 ],
      "presentation_rect" : [ 165.0, 135.0, 45.0, 45.0 ],
      "id" : "obj-38",
      "texton" : "ON",
      "bgoncolor" : [ 1.0, 0.756863, 0.756863, 1.0 ],
      "patching_rect" : [ 165.0, 60.0, 45.0, 45.0 ],
      "fontface" : 1,
      "textoncolor" : [ 1.0, 0.0, 0.0, 1.0 ],
      "presentation" : 1,
      "fontsize" : 12.0,
      "parameter_enable" : 0,
      "outlettype" : [ "", "", "int" ],
      "mode" : 1,
      "numinlets" : 1,
      "border" : 5,
      "text" : "OFF"
      }
      }
      ],
      "lines" : [ {
      "patchline" : {
      "source" : [ "obj-15", 0 ],
      "destination" : [ "obj-2", 1 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-17", 0 ],
      "destination" : [ "obj-15", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-16", 0 ],
      "destination" : [ "obj-15", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-15", 0 ],
      "destination" : [ "obj-38", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-14", 1 ],
      "destination" : [ "obj-17", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      , {
      "patchline" : {
      "source" : [ "obj-14", 0 ],
      "destination" : [ "obj-16", 0 ],
      "hidden" : 0,
      "disabled" : 0
      }
      }
      ],
      "appversion" : {
      "major" : 6,
      "minor" : 1,
      "revision" : 5,
      "architecture" : "x86"
      }
      }
      -----------end_max5_patcher-----------
      dblja
    • Dec 08 2013 | 6:59 pm
      exactly what i wanted !!
      thanks a lot!!!!