{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 0, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 86.0, 78.0, 846.0, 593.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-62", "linecount" : 2, "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 630.0, 398.0, 150.0, 35.0 ], "style" : "", "text" : "55 127 500, 59 127 500, 62 127 500" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-59", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 0, "patching_rect" : [ 630.0, 495.0, 51.0, 22.0 ], "style" : "", "text" : "noteout" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-60", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "float", "float" ], "patching_rect" : [ 630.0, 450.0, 63.0, 22.0 ], "style" : "", "text" : "makenote" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-58", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 630.0, 335.5, 180.0, 33.0 ], "style" : "", "text" : "We can also send a sequence of lists to play a chord" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-56", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 510.0, 404.5, 77.0, 22.0 ], "style" : "", "text" : "51 127 1000" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-54", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 0, "patching_rect" : [ 420.0, 495.0, 51.0, 22.0 ], "style" : "", "text" : "noteout" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-53", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "float", "float" ], "patching_rect" : [ 420.0, 450.0, 63.0, 22.0 ], "style" : "", "text" : "makenote" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-50", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 420.0, 404.5, 71.0, 22.0 ], "style" : "", "text" : "55 127 500" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-48", "linecount" : 5, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 315.0, 201.0, 74.0 ], "style" : "", "text" : "We can use a list to set a number of parameters for an object at once. Here, for example, we specify MIDI pitch, velocity and duration at the same time" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-46", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 555.0, 180.0, 195.0, 22.0 ], "style" : "", "text" : "visitors \"Toronto Zoo\" \"polar bears\"" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 270.0, 85.0, 22.0 ], "style" : "", "text" : "print variables" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 420.0, 180.0, 113.0, 22.0 ], "style" : "", "text" : "children fair clowns" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-41", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 420.0, 225.0, 199.0, 22.0 ], "style" : "", "text" : "The $1 went to the $2 to see the $3" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-39", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 90.0, 390.0, 60.0 ], "style" : "", "text" : "In the color example, we used a replaceable argument (the $1). It takes on whatever value is first passed into the inlet of the message. Here is a more elaborate example. Note that we are passing a list, and that we can use quotation marks to create symbols that have multiple elements." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-37", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 210.0, 480.0, 55.0, 22.0 ], "style" : "", "text" : "clip 0 15" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-36", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 210.0, 450.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "bgfillcolor_angle" : 270.0, "bgfillcolor_autogradient" : 0.79, "bgfillcolor_color" : [ 0.290196, 0.309804, 0.301961, 1.0 ], "bgfillcolor_color1" : [ 1.0, 0.360784, 0.682353, 1.0 ], "bgfillcolor_color2" : [ 27.0, 0.0, 0.0, 1.0 ], "bgfillcolor_proportion" : 0.39, "bgfillcolor_type" : "gradient", "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-34", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 210.0, 540.0, 38.0, 22.0 ], "style" : "", "text" : "Hello", "textcolor" : [ 0.0, 0.0, 0.0, 1.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 210.0, 510.0, 53.0, 22.0 ], "style" : "", "text" : "color $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-30", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 210.0, 383.5, 180.0, 60.0 ], "style" : "", "text" : "You can change the colour of a message by sending it a message with the word 'color' and a value between 0 and 15" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 480.0, 92.0, 22.0 ], "style" : "", "text" : "print sequential" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 450.0, 160.0, 22.0 ], "style" : "", "text" : "10, 9, 8, 7, 6, 5, 4, 3 2 1 Go!" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-25", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 390.0, 160.0, 47.0 ], "style" : "", "text" : "If you separate values with commas, Max sends a sequence of messages" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-23", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 315.0, 115.0, 22.0 ], "style" : "", "text" : "append is really fun" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-22", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 345.0, 93.0, 22.0 ], "style" : "", "text" : "print compound" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-21", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 285.0, 143.0, 22.0 ], "style" : "", "text" : "prepend Programming in" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 255.0, 33.0, 22.0 ], "style" : "", "text" : "Max" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 210.0, 285.0, 180.0, 60.0 ], "style" : "", "text" : "Max has objects for adding things to the beginnings and ends of messages. They are prepend and append" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 210.0, 375.0, 33.0 ], "style" : "", "text" : "The last example above shows a list, a collection of values separated by blank spaces" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-13", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 180.0, 135.0, 69.0, 22.0 ], "style" : "", "text" : "this is a list" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 120.0, 135.0, 49.0, 22.0 ], "style" : "", "text" : "symbol" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 75.0, 135.0, 32.5, 22.0 ], "style" : "", "text" : "42" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-7", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 135.0, 37.0, 22.0 ], "style" : "", "text" : "bang" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-5", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 165.0, 72.0, 22.0 ], "style" : "", "text" : "print simple" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-4", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 375.0, 33.0 ], "style" : "", "text" : "We have already seen that message can be used to send different kinds of information along patch cords" } } , { "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-014. More About Messages\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-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-11", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-13", 0 ] } } , { "patchline" : { "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-20", 0 ] } } , { "patchline" : { "destination" : [ "obj-23", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-21", 0 ] } } , { "patchline" : { "destination" : [ "obj-22", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-23", 0 ] } } , { "patchline" : { "destination" : [ "obj-28", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-34", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-32", 0 ] } } , { "patchline" : { "destination" : [ "obj-37", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-36", 0 ] } } , { "patchline" : { "destination" : [ "obj-32", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-37", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-41", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-43", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-46", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-50", 0 ] } } , { "patchline" : { "destination" : [ "obj-54", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-53", 1 ] } } , { "patchline" : { "destination" : [ "obj-54", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-53", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-56", 0 ] } } , { "patchline" : { "destination" : [ "obj-59", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-60", 1 ] } } , { "patchline" : { "destination" : [ "obj-59", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-60", 0 ] } } , { "patchline" : { "destination" : [ "obj-60", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-62", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-7", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 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 } }