{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 1, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 769.0, 352.0, 768.0, 605.0 ], "bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "editing_bgcolor" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "bglocked" : 0, "openinpresentation" : 0, "default_fontsize" : 12.0, "default_fontface" : 0, "default_fontname" : "Arial", "gridonopen" : 1, "gridsize" : [ 15.0, 15.0 ], "gridsnaponopen" : 1, "objectsnaponopen" : 1, "statusbarvisible" : 2, "toolbarvisible" : 1, "lefttoolbarpinned" : 0, "toptoolbarpinned" : 0, "righttoolbarpinned" : 0, "bottomtoolbarpinned" : 0, "toolbars_unpinned_last_save" : 0, "tallnewobj" : 0, "boxanimatetime" : 200, "enablehscroll" : 1, "enablevscroll" : 1, "devicewidth" : 0.0, "description" : "", "digest" : "", "tags" : "", "style" : "", "subpatcher_template" : "IceCubeTray", "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 517.0, 495.0, 78.0, 22.0 ], "style" : "", "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-48", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 615.0, 495.0, 50.0, 22.0 ], "style" : "" } } , { "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, 22.0 ], "style" : "", "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 ], "style" : "" } } , { "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, 87.0 ], "style" : "", "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, 127.0 ], "style" : "", "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" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 480.0, 50.0, 22.0 ], "style" : "" } } , { "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, 22.0 ], "style" : "", "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 ], "style" : "" } } , { "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 ], "style" : "", "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, 60.0 ], "style" : "", "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 ], "style" : "" } } , { "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, 22.0 ], "style" : "", "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 517.0, 330.0, 78.0, 22.0 ], "style" : "", "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 543.5, 300.0, 50.0, 22.0 ], "style" : "" } } , { "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, 60.0 ], "style" : "", "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, 33.0 ], "style" : "", "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "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 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-40", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 139.0, 330.0, 78.0, 22.0 ], "style" : "", "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-17", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 164.0, 300.0, 50.0, 22.0 ], "style" : "" } } , { "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 ], "size" : 4, "style" : "", "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, 87.0 ], "style" : "", "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 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 495.0, 150.0, 50.0, 22.0 ], "style" : "" } } , { "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, 22.0 ], "style" : "", "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 ], "style" : "", "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, 181.0, 87.0 ], "style" : "", "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" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 139.0, 165.0, 50.0, 22.0 ], "style" : "" } } , { "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, "style" : "", "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 ], "style" : "", "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, 51.0 ], "style" : "", "text" : "Choosing events in Max 7\nWilliam J Turkel\nhttp://williamjturkel.net/code" } } , { "box" : { "angle" : 0.0, "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-56", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 402.5, 330.0, 167.5 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } , { "box" : { "angle" : 0.0, "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-44", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 402.5, 360.0, 167.5 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } , { "box" : { "angle" : 0.0, "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-32", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 210.0, 330.0, 180.0 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } , { "box" : { "angle" : 0.0, "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-21", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 210.0, 360.0, 180.0 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } , { "box" : { "angle" : 0.0, "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-16", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 80.0, 330.0, 115.0 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } , { "box" : { "angle" : 0.0, "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-23", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 80.0, 360.0, 115.0 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } ], "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" : [ ], "embedsnapshot" : 0, "default_bgcolor" : [ 0.207843, 0.215686, 0.278431, 1.0 ], "color" : [ 0.901961, 0.901961, 0.901961, 1.0 ], "elementcolor" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "accentcolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "selectioncolor" : [ 0.552941, 0.588235, 0.85098, 1.0 ], "textcolor" : [ 0.090196, 0.07451, 0.07451, 1.0 ], "textcolor_inverse" : [ 0.721569, 0.737255, 0.85098, 1.0 ], "patchlinecolor" : [ 0.207843, 0.215686, 0.278431, 0.9 ], "bgfillcolor_type" : "gradient", "bgfillcolor_color1" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color2" : [ 0.376471, 0.407843, 0.619608, 1.0 ], "bgfillcolor_color" : [ 0.290196, 0.309804, 0.301961, 1.0 ], "bgfillcolor_angle" : 270.0, "bgfillcolor_proportion" : 0.39 } }