{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 952.0, 141.0, 741.0, 582.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" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-44", "linecount" : 7, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 527.5, 360.0, 154.0, 100.0 ], "text" : "In order to get information from the mouse, you need to ask for it explicitly. This is called 'polling'. In Max, we use a metro object to poll other objects by banging them repeatedly." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-42", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 510.0, 210.0, 33.0 ], "presentation_rect" : [ 285.0, 508.0, 0.0, 0.0 ], "text" : "Led object lights when mouse button pressed" } } , { "box" : { "id" : "obj-41", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 112.75, 510.0, 20.0, 20.0 ], "presentation_rect" : [ 111.75, 504.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-38", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 465.0, 210.0, 20.0 ], "presentation_rect" : [ 282.0, 467.0, 0.0, 0.0 ], "text" : "This object reports on the mouse" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-37", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 5, "outlettype" : [ "int", "int", "int", "int", "int" ], "patching_rect" : [ 112.75, 465.0, 73.0, 20.0 ], "text" : "mousestate" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-36", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 405.0, 214.0, 47.0 ], "presentation_rect" : [ 291.0, 415.0, 0.0, 0.0 ], "text" : "When enabled, the metro object bangs every tenth of a second (every 100 milliseconds)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-35", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 112.75, 405.0, 65.0, 20.0 ], "text" : "metro 100" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-33", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 360.0, 214.0, 33.0 ], "presentation_rect" : [ 280.0, 366.0, 0.0, 0.0 ], "text" : "The toggle object enables or disables mouse input" } } , { "box" : { "id" : "obj-32", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 112.75, 360.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-30", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 360.0, 60.0, 47.0 ], "presentation_rect" : [ 27.0, 359.0, 0.0, 0.0 ], "text" : "Reading mouse\nclicks" } } , { "box" : { "id" : "obj-28", "maxclass" : "button", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 375.0, 255.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-26", "linecount" : 9, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 525.0, 92.0, 155.0, 127.0 ], "text" : "These codes work for the Mac keyboard. If you are using Windows and the codes don't work, check the number display to see what code corresponds to the key you are trying to match, then edit the select object to match that code." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-24", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 375.0, 288.25, 75.0, 33.0 ], "presentation_rect" : [ 374.0, 289.25, 0.0, 0.0 ], "text" : "Something else" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-9", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 315.0, 288.25, 45.0, 20.0 ], "text" : "Space" } } , { "box" : { "id" : "obj-13", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 315.0, 255.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-20", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 265.75, 288.25, 45.0, 33.0 ], "text" : "Arrow Down" } } , { "box" : { "id" : "obj-21", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 265.75, 255.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-18", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 214.75, 288.25, 45.0, 33.0 ], "text" : "Arrow Up" } } , { "box" : { "id" : "obj-19", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 214.75, 255.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-16", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 162.75, 288.25, 45.0, 33.0 ], "text" : "Arrow Right" } } , { "box" : { "id" : "obj-17", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 162.75, 255.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-14", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 112.75, 288.25, 45.0, 33.0 ], "text" : "Arrow Left" } } , { "box" : { "id" : "obj-15", "maxclass" : "led", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 112.75, 255.0, 20.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-12", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 180.0, 210.0, 33.0 ], "text" : "The select object chooses an outlet based on the input" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-10", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 135.0, 195.0, 20.0 ], "text" : "Display the code for key pressed" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-8", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 6, "outlettype" : [ "bang", "bang", "bang", "bang", "bang", "" ], "patching_rect" : [ 112.75, 180.0, 125.0, 20.0 ], "text" : "select 28 29 30 31 32" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-7", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 92.0, 60.0, 47.0 ], "text" : "Reading key presses" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-5", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 195.0, 135.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-4", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 285.0, 92.0, 210.0, 20.0 ], "text" : "This object reports on the keyboard" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-1", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 4, "outlettype" : [ "int", "int", "int", "int" ], "patching_rect" : [ 112.75, 92.0, 59.5, 20.0 ], "text" : "key" } } , { "box" : { "bubble" : 1, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-2", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 15.0, 255.0, 51.0 ], "text" : "Interfacing with the Makey Makey 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-29", "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 345.0, 690.0, 225.0 ], "presentation_rect" : [ 17.0, 300.0, 0.0, 0.0 ], "rounded" : 30 } } , { "box" : { "background" : 1, "bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ], "border" : 1, "id" : "obj-23", "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 690.0, 255.0 ], "rounded" : 30 } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-35", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-32", 0 ] } } , { "patchline" : { "destination" : [ "obj-37", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-35", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-37", 0 ] } } , { "patchline" : { "destination" : [ "obj-13", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 4 ] } } , { "patchline" : { "destination" : [ "obj-15", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 0 ] } } , { "patchline" : { "destination" : [ "obj-17", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 1 ] } } , { "patchline" : { "destination" : [ "obj-19", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 2 ] } } , { "patchline" : { "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 3 ] } } , { "patchline" : { "destination" : [ "obj-28", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-8", 5 ] } } ], "dependency_cache" : [ ] } }