{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 1, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 841.0, 450.0, 770.0, 589.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" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-64", "linecount" : 9, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 510.0, 372.0, 208.0, 127.0 ], "style" : "", "text" : "This example uses a metro object to send a bang every second (1000 milliseconds). It automatically steps through the events one at a time, then returns to the beginning. The delay can be changed by entering a new number. Try delays of 200 and 2000. What happens if you enter a delay of 2?" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-62", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 527.5, 330.0, 60.0, 20.0 ], "style" : "", "text" : "DELAY" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-61", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 415.0, 330.0, 60.0, 20.0 ], "style" : "", "text" : "ON/OFF" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-59", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 477.5, 330.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-57", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 330.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 390.0, 360.0, 71.0, 22.0 ], "style" : "", "text" : "metro 1000" } } , { "box" : { "id" : "obj-47", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 465.0, 510.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-48", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 441.5, 510.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-49", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 510.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-50", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 415.0, 510.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-51", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 390.0, 480.0, 78.0, 22.0 ], "style" : "", "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-52", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 418.0, 450.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-53", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 4, "outlettype" : [ "int", "", "", "int" ], "patching_rect" : [ 390.0, 420.0, 73.0, 22.0 ], "style" : "", "text" : "counter 3" } } , { "box" : { "id" : "obj-54", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 390.0, 390.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-46", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 330.0, 90.0, 60.0 ], "style" : "", "text" : "Automatically step through a sequence of events" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-45", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 42.5, 330.0, 79.0, 47.0 ], "style" : "", "text" : "Press button to move to next event" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 164.5, 330.0, 50.0, 20.0 ], "style" : "", "text" : "NEXT" } } , { "box" : { "id" : "obj-36", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 216.5, 450.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-37", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 193.0, 450.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-38", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 141.5, 450.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-39", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 166.5, 450.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-40", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 141.5, 420.0, 78.0, 22.0 ], "style" : "", "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-41", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 169.5, 390.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-34", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 4, "outlettype" : [ "int", "", "", "int" ], "patching_rect" : [ 141.5, 360.0, 73.0, 22.0 ], "style" : "", "text" : "counter 3" } } , { "box" : { "id" : "obj-35", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 141.5, 330.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-33", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 321.0, 240.0, 390.0, 47.0 ], "style" : "", "text" : "If you enter 0, 1, 2 or 3 in the number box, a bang will be sent to route, which will then redirect it to the appropriate led. If you enter a number that is less than 0 or more than 3, none of the leds will flash." } } , { "box" : { "id" : "obj-31", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 285.0, 270.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-30", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 261.5, 270.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-29", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 210.0, 270.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "id" : "obj-28", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 235.0, 270.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 5, "outlettype" : [ "", "", "", "", "" ], "patching_rect" : [ 210.0, 240.0, 78.0, 22.0 ], "style" : "", "text" : "route 0 1 2 3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-26", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.5, 270.0, 60.0, 20.0 ], "style" : "", "text" : "Leds" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-25", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.5, 240.0, 60.0, 20.0 ], "style" : "", "text" : "Route" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-24", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 321.0, 210.0, 390.0, 20.0 ], "style" : "", "text" : "The number object can also be used for input" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-22", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 210.0, 210.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.5, 210.0, 60.0, 20.0 ], "style" : "", "text" : "Number" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 42.5, 210.0, 92.5, 20.0 ], "style" : "", "text" : "Routing" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.0, 90.0, 411.0, 33.0 ], "style" : "", "text" : "Each time you press the button, a bang is sent to counter. This causes it to advance to the next number. It counts 0, 1, 2, 3 and then back to 0 again." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 300.0, 150.0, 405.0, 20.0 ], "style" : "", "text" : "In this example, the number is used to display the output of the counter" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-13", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.5, 150.0, 60.0, 20.0 ], "style" : "", "text" : "Number" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-12", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.5, 120.0, 60.0, 20.0 ], "style" : "", "text" : "Counter" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 141.5, 90.0, 60.0, 20.0 ], "style" : "", "text" : "Button" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 210.0, 150.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 4, "outlettype" : [ "int", "", "", "int" ], "patching_rect" : [ 210.0, 120.0, 73.0, 22.0 ], "style" : "", "text" : "counter 3" } } , { "box" : { "id" : "obj-5", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 210.0, 90.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-3", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 42.5, 90.0, 92.5, 20.0 ], "style" : "", "text" : "Counting" } } , { "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" : "Ordering 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-65", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 270.0, 315.0, 461.5, 237.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, 315.0, 225.0, 237.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-17", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 195.0, 701.5, 105.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, 75.0, 701.5, 105.0 ], "proportion" : 0.39, "rounded" : 30, "style" : "" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-27", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-22", 0 ] } } , { "patchline" : { "destination" : [ "obj-28", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 1 ] } } , { "patchline" : { "destination" : [ "obj-29", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-30", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 2 ] } } , { "patchline" : { "destination" : [ "obj-31", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 3 ] } } , { "patchline" : { "destination" : [ "obj-40", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-34", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-34", 0 ] } } , { "patchline" : { "destination" : [ "obj-34", 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-6", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-47", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 3 ] } } , { "patchline" : { "destination" : [ "obj-48", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 2 ] } } , { "patchline" : { "destination" : [ "obj-49", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 0 ] } } , { "patchline" : { "destination" : [ "obj-50", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 1 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-53", 0 ] } } , { "patchline" : { "destination" : [ "obj-52", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-53", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-54", 0 ] } } , { "patchline" : { "destination" : [ "obj-54", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-55", 0 ] } } , { "patchline" : { "destination" : [ "obj-55", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-57", 0 ] } } , { "patchline" : { "destination" : [ "obj-55", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-59", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 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 } }