{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 4 } , "rect" : [ 236.0, 77.0, 760.0, 585.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 0, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 0, "statusbarvisible" : 2, "toolbarvisible" : 1, "boxanimatetime" : 200, "imprint" : 0, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "boxes" : [ { "box" : { "id" : "obj-51", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 592.0, 525.0, 20.0, 20.0 ], "presentation_rect" : [ 591.0, 531.0, 0.0, 0.0 ] } } , { "box" : { "id" : "obj-52", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 568.5, 525.0, 20.0, 20.0 ], "presentation_rect" : [ 567.5, 531.0, 0.0, 0.0 ] } } , { "box" : { "id" : "obj-53", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 517.0, 525.0, 20.0, 20.0 ], "presentation_rect" : [ 516.0, 531.0, 0.0, 0.0 ] } } , { "box" : { "id" : "obj-54", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 542.0, 525.0, 20.0, 20.0 ], "presentation_rect" : [ 541.0, 531.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 517.0, 495.0, 78.0, 20.0 ], "presentation_rect" : [ 516.0, 501.0, 0.0, 0.0 ], "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-48", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 615.0, 495.0, 50.0, 20.0 ], "presentation_rect" : [ 519.0, 482.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-49", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 517.0, 450.0, 65.0, 20.0 ], "presentation_rect" : [ 519.0, 452.0, 0.0, 0.0 ], "text" : "drunk 3 -3" } } , { "box" : { "id" : "obj-50", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 517.0, 420.0, 20.0, 20.0 ], "presentation_rect" : [ 519.0, 422.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-47", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 420.0, 84.0, 89.0 ], "presentation_rect" : [ 415.0, 421.0, 0.0, 0.0 ], "text" : "Press button to choose an event randomly without any duplicates" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-46", "linecount" : 9, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 214.0, 420.0, 161.0, 131.0 ], "presentation_rect" : [ 216.0, 418.0, 0.0, 0.0 ], "text" : "The random object can return the same number repeatedly. If you don't want this to happen, you have to use the drunk object instead. This command returns 0, 1, 2, or 3 but never the same number twice in a row." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 480.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-41", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 139.0, 450.0, 65.0, 20.0 ], "text" : "drunk 3 -3" } } , { "box" : { "id" : "obj-35", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 139.0, 420.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-33", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 45.0, 420.0, 75.0, 20.0 ], "presentation_rect" : [ 50.0, 416.0, 0.0, 0.0 ], "text" : "Drunk" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-31", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 225.0, 84.0, 62.0 ], "presentation_rect" : [ 425.0, 445.0, 0.0, 0.0 ], "text" : "Press button to choose an event randomly" } } , { "box" : { "id" : "obj-29", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 517.0, 225.0, 20.0, 20.0 ], "presentation_rect" : [ 513.0, 226.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-30", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 517.0, 260.0, 61.0, 20.0 ], "presentation_rect" : [ 513.0, 256.0, 0.0, 0.0 ], "text" : "random 4" } } , { "box" : { "id" : "obj-22", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 592.0, 360.0, 20.0, 20.0 ], "presentation_rect" : [ 583.0, 364.0, 0.0, 0.0 ] } } , { "box" : { "id" : "obj-24", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 568.5, 360.0, 20.0, 20.0 ], "presentation_rect" : [ 559.5, 364.0, 0.0, 0.0 ] } } , { "box" : { "id" : "obj-25", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 517.0, 360.0, 20.0, 20.0 ], "presentation_rect" : [ 508.0, 364.0, 0.0, 0.0 ] } } , { "box" : { "id" : "obj-26", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 542.0, 360.0, 20.0, 20.0 ], "presentation_rect" : [ 533.0, 364.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 517.0, 330.0, 78.0, 20.0 ], "presentation_rect" : [ 508.0, 334.0, 0.0, 0.0 ], "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 543.5, 300.0, 50.0, 20.0 ], "presentation_rect" : [ 533.0, 304.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-45", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 45.0, 225.0, 84.0, 62.0 ], "text" : "Press any button to choose an event" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 164.0, 225.0, 60.0, 35.0 ], "text" : "PICK AN\nEVENT" } } , { "box" : { "id" : "obj-36", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 214.0, 360.0, 20.0, 20.0 ] } } , { "box" : { "id" : "obj-37", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 190.5, 360.0, 20.0, 20.0 ] } } , { "box" : { "id" : "obj-38", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 360.0, 20.0, 20.0 ] } } , { "box" : { "id" : "obj-39", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 164.0, 360.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-40", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 139.0, 330.0, 78.0, 20.0 ], "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-17", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 164.0, 300.0, 50.0, 20.0 ], "presentation_rect" : [ 138.0, 310.0, 0.0, 0.0 ] } } , { "box" : { "disabled" : [ 0, 0, 0, 0 ], "id" : "obj-18", "itemtype" : 0, "maxclass" : "radiogroup", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 225.0, 18.0, 66.0 ], "presentation_rect" : [ 138.0, 235.0, 0.0, 0.0 ], "size" : 4, "value" : 3 } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 570.0, 90.0, 150.0, 89.0 ], "text" : "The random object will return an integer between 0 and one less than the argument that you give it. This command returns 0, 1, 2 or 3 randomly." } } , { "box" : { "id" : "obj-13", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 495.0, 90.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 495.0, 150.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "int" ], "patching_rect" : [ 495.0, 120.0, 61.0, 20.0 ], "text" : "random 4" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-8", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 90.0, 60.0, 20.0 ], "presentation_rect" : [ 51.0, 239.0, 0.0, 0.0 ], "text" : "Random" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-7", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 195.0, 90.0, 180.0, 89.0 ], "text" : "The radiogroup object lets you choose one of a set of alternatives. The number of items is set with the inspector. It outputs the number of the item chosen, starting with 0." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-5", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 165.0, 50.0, 20.0 ] } } , { "box" : { "disabled" : [ 0, 0, 0, 0 ], "id" : "obj-1", "itemtype" : 0, "maxclass" : "radiogroup", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 90.0, 18.0, 66.0 ], "size" : 4, "value" : 2 } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-3", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 45.0, 90.0, 75.0, 20.0 ], "text" : "Radiogroup" } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 205.0, 52.0 ], "text" : "Choosing events in Max 6\nWilliam J Turkel\nhttp://williamjturkel.net/code" } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-56", "ignoreclick" : 1, "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 402.5, 330.0, 167.5 ], "presentation_rect" : [ 403.0, 387.0, 0.0, 0.0 ], "rounded" : 30 } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-44", "ignoreclick" : 1, "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 402.5, 360.0, 167.5 ], "presentation_rect" : [ 31.0, 406.0, 0.0, 0.0 ], "rounded" : 30 } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-32", "ignoreclick" : 1, "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 210.0, 330.0, 180.0 ], "presentation_rect" : [ 376.0, 212.0, 0.0, 0.0 ], "rounded" : 30 } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-21", "ignoreclick" : 1, "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 210.0, 360.0, 180.0 ], "presentation_rect" : [ 30.0, 206.0, 0.0, 0.0 ], "rounded" : 30 } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-16", "ignoreclick" : 1, "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 80.0, 330.0, 115.0 ], "presentation_rect" : [ 398.0, 80.0, 0.0, 0.0 ], "rounded" : 30 } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-23", "ignoreclick" : 1, "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 80.0, 360.0, 115.0 ], "rounded" : 30 } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-13", 0 ] } } , { "patchline" : { "destination" : [ "obj-17", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-40", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-22", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 3 ] } } , { "patchline" : { "destination" : [ "obj-24", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 2 ] } } , { "patchline" : { "destination" : [ "obj-25", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-26", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 1 ] } } , { "patchline" : { "destination" : [ "obj-30", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-27", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-30", 0 ] } } , { "patchline" : { "destination" : [ "obj-28", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-30", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-35", 0 ] } } , { "patchline" : { "destination" : [ "obj-36", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-40", 3 ] } } , { "patchline" : { "destination" : [ "obj-37", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-40", 2 ] } } , { "patchline" : { "destination" : [ "obj-38", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-40", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-40", 1 ] } } , { "patchline" : { "destination" : [ "obj-43", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-41", 0 ] } } , { "patchline" : { "destination" : [ "obj-48", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-49", 0 ] } } , { "patchline" : { "destination" : [ "obj-55", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-49", 0 ] } } , { "patchline" : { "destination" : [ "obj-49", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-50", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-55", 3 ] } } , { "patchline" : { "destination" : [ "obj-52", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-55", 2 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-55", 0 ] } } , { "patchline" : { "destination" : [ "obj-54", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-55", 1 ] } } , { "patchline" : { "destination" : [ "obj-11", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-9", 0 ] } } ], "dependency_cache" : [ ] } }