{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 1, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 678.0, 197.0, 856.0, 595.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-97", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 0, "patching_rect" : [ 420.0, 540.0, 51.0, 22.0 ], "style" : "", "text" : "noteout" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-96", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 420.0, 480.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-95", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "float", "float" ], "patching_rect" : [ 420.0, 510.0, 110.0, 22.0 ], "style" : "", "text" : "makenote 127 200" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-94", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 585.0, 480.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-92", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 585.0, 510.0, 51.0, 22.0 ], "style" : "", "text" : "pgmout" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-89", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 660.0, 375.0, 60.0, 33.0 ], "style" : "", "text" : "Vertical \nmax" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-90", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 660.0, 405.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-91", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 585.0, 438.0, 105.0, 22.0 ], "style" : "", "text" : "scale 0 799 0 127" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-88", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 495.0, 375.0, 75.0, 33.0 ], "style" : "", "text" : "Horizontal max" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-87", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 495.0, 405.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-86", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 420.0, 438.0, 112.0, 22.0 ], "style" : "", "text" : "scale 0 1279 36 83" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-85", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 482.5, 240.0, 90.0, 20.0 ], "style" : "", "text" : "Change tempo" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-83", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 540.0, 195.0, 32.5, 22.0 ], "style" : "", "text" : "500" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-82", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 495.0, 195.0, 32.5, 22.0 ], "style" : "", "text" : "300" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-81", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 450.0, 195.0, 32.5, 22.0 ], "style" : "", "text" : "200" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-80", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 405.0, 195.0, 32.5, 22.0 ], "style" : "", "text" : "100" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-73", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 585.0, 330.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-74", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 420.0, 330.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-75", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 360.0, 330.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-76", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 5, "outlettype" : [ "int", "int", "int", "int", "int" ], "patching_rect" : [ 360.0, 285.0, 73.0, 22.0 ], "style" : "", "text" : "mousestate" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-77", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 360.0, 240.0, 65.0, 22.0 ], "style" : "", "text" : "metro 100" } } , { "box" : { "id" : "obj-78", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 360.0, 195.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-72", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 360.0, 90.0, 440.0, 87.0 ], "style" : "", "text" : "This patch uses the horizontal position of the mouse cursor to establish a pitch, and the vertical position to establish a MIDI instrument. We use one scale object to convert horizontal pixel coordinates to a reasonable range of pitches, and another to convert vertical pixel coordinates to different MIDI instruments. You can change the maximum horizontal and vertical coordinates if your screen is a different size than the default (1280x800)." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-70", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 115.0, 220.0, 215.0, 47.0 ], "style" : "", "text" : "We use a metro object to bang the mousestate object frequently. This is called \"polling\"" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-68", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 180.0, 360.0, 60.0, 33.0 ], "style" : "", "text" : "Y \n(vertical)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-67", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 180.0, 330.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-66", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 90.0, 360.0, 75.0, 33.0 ], "style" : "", "text" : "X (horizontal)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-65", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 90.0, 330.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-63", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 360.0, 47.0, 33.0 ], "style" : "", "text" : "Button press?" } } , { "box" : { "id" : "obj-61", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 330.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-59", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 5, "outlettype" : [ "int", "int", "int", "int", "int" ], "patching_rect" : [ 30.0, 285.0, 73.0, 22.0 ], "style" : "", "text" : "mousestate" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-58", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "bang" ], "patching_rect" : [ 30.0, 240.0, 65.0, 22.0 ], "style" : "", "text" : "metro 100" } } , { "box" : { "id" : "obj-57", "maxclass" : "toggle", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "int" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 195.0, 20.0, 20.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "linecount" : 6, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 300.0, 87.0 ], "style" : "", "text" : "You can read the current state of the mouse using the mouse state object. It outputs information about whether the button was pressed, the horizontal (X) position and the vertical (Y) postion, measured in pixels from the upper-left-hand corner of the screen (X=0, Y=0)" } } , { "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, 315.0, 51.0 ], "style" : "", "text" : "Patch 7-018. Reading the Mouse\nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "angle" : 0.0, "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "mode" : 0, "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 810.0, 495.0 ], "proportion" : 0.39, "rounded" : 20, "style" : "" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-58", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-57", 0 ] } } , { "patchline" : { "destination" : [ "obj-59", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-58", 0 ] } } , { "patchline" : { "destination" : [ "obj-61", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-59", 0 ] } } , { "patchline" : { "destination" : [ "obj-65", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-59", 1 ] } } , { "patchline" : { "destination" : [ "obj-67", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-59", 2 ] } } , { "patchline" : { "destination" : [ "obj-91", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-73", 0 ] } } , { "patchline" : { "destination" : [ "obj-86", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-74", 0 ] } } , { "patchline" : { "destination" : [ "obj-73", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-76", 2 ] } } , { "patchline" : { "destination" : [ "obj-74", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-76", 1 ] } } , { "patchline" : { "destination" : [ "obj-75", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-76", 0 ] } } , { "patchline" : { "destination" : [ "obj-76", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-77", 0 ] } } , { "patchline" : { "destination" : [ "obj-77", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-78", 0 ] } } , { "patchline" : { "destination" : [ "obj-77", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-80", 0 ] } } , { "patchline" : { "destination" : [ "obj-77", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-81", 0 ] } } , { "patchline" : { "destination" : [ "obj-77", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-82", 0 ] } } , { "patchline" : { "destination" : [ "obj-77", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-83", 0 ] } } , { "patchline" : { "destination" : [ "obj-96", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-86", 0 ] } } , { "patchline" : { "destination" : [ "obj-86", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-87", 0 ] } } , { "patchline" : { "destination" : [ "obj-91", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-90", 0 ] } } , { "patchline" : { "destination" : [ "obj-94", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-91", 0 ] } } , { "patchline" : { "destination" : [ "obj-92", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-94", 0 ] } } , { "patchline" : { "destination" : [ "obj-97", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-95", 1 ] } } , { "patchline" : { "destination" : [ "obj-97", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-95", 0 ] } } , { "patchline" : { "destination" : [ "obj-95", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-96", 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 } }