{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 1023.0, 349.0, 838.0, 588.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-88", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 368.0, 540.0, 442.0, 20.0 ], "text" : "View and edit patchers by double clicking on them when the main patch is locked" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-86", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "", "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 1607.0, 123.0, 242.0, 231.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" : "", "visible" : 1, "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-70", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 75.0, 160.0, 43.0, 18.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-71", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 75.0, 120.0, 32.5, 20.0 ], "text" : "/ 9." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-72", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 75.0, 90.0, 32.5, 20.0 ], "text" : "* 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-73", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 75.0, 60.0, 35.0, 20.0 ], "text" : "- 32." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-76", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 15.0, 160.0, 43.0, 18.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-77", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 120.0, 38.0, 20.0 ], "text" : "+ 32." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-78", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 90.0, 32.5, 20.0 ], "text" : "/ 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-79", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 60.0, 32.5, 20.0 ], "text" : "* 9." } } , { "box" : { "comment" : "", "id" : "obj-82", "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 15.0, 25.0, 25.0 ] } } , { "box" : { "comment" : "", "id" : "obj-83", "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 75.0, 15.0, 25.0, 25.0 ] } } , { "box" : { "comment" : "", "id" : "obj-84", "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 190.0, 25.0, 25.0 ] } } , { "box" : { "comment" : "", "id" : "obj-85", "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 75.0, 190.0, 25.0, 25.0 ] } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-85", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-70", 0 ] } } , { "patchline" : { "destination" : [ "obj-70", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-71", 0 ] } } , { "patchline" : { "destination" : [ "obj-71", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-72", 0 ] } } , { "patchline" : { "destination" : [ "obj-72", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-73", 0 ] } } , { "patchline" : { "destination" : [ "obj-84", 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-78", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-79", 0 ] } } , { "patchline" : { "destination" : [ "obj-79", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-82", 0 ] } } , { "patchline" : { "destination" : [ "obj-73", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-83", 0 ] } } ] } , "patching_rect" : [ 630.0, 497.0, 103.0, 20.0 ], "saved_object_attributes" : { "default_fontface" : 0, "default_fontname" : "Arial", "default_fontsize" : 12.0, "description" : "", "digest" : "", "fontface" : 0, "fontname" : "Arial", "fontsize" : 12.0, "globalpatchername" : "", "tags" : "" } , "text" : "p tempcconverter" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-74", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 735.0, 432.0, 75.0, 20.0 ], "presentation_rect" : [ 317.0, 360.0, 0.0, 0.0 ], "text" : "Fahrenheit" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-75", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 735.0, 467.0, 50.0, 20.0 ], "presentation_rect" : [ 317.0, 395.0, 0.0, 0.0 ] } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-80", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 630.0, 432.0, 60.0, 20.0 ], "presentation_rect" : [ 212.0, 360.0, 0.0, 0.0 ], "text" : "Celsius" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-81", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 630.0, 467.0, 50.0, 20.0 ], "presentation_rect" : [ 212.0, 395.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-69", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 615.0, 360.0, 195.0, 60.0 ], "text" : "You often have a number of different options for which code to encapsulate in a given patcher. We could have done this, for example" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-67", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 1331.0, 122.0, 240.0, 225.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" : "", "visible" : 1, "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-57", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 15.0, 150.0, 43.0, 18.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-58", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 120.0, 32.5, 20.0 ], "text" : "/ 9." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-59", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 90.0, 32.5, 20.0 ], "text" : "* 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-60", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 60.0, 35.0, 20.0 ], "text" : "- 32." } } , { "box" : { "comment" : "", "id" : "obj-65", "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 15.0, 25.0, 25.0 ] } } , { "box" : { "comment" : "", "id" : "obj-66", "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 180.0, 25.0, 25.0 ] } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-66", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-57", 0 ] } } , { "patchline" : { "destination" : [ "obj-57", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-58", 0 ] } } , { "patchline" : { "destination" : [ "obj-58", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-59", 0 ] } } , { "patchline" : { "destination" : [ "obj-59", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-60", 0 ] } } , { "patchline" : { "destination" : [ "obj-60", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-65", 0 ] } } ] } , "patching_rect" : [ 525.0, 497.0, 47.0, 20.0 ], "saved_object_attributes" : { "default_fontface" : 0, "default_fontname" : "Arial", "default_fontsize" : 12.0, "description" : "", "digest" : "", "fontface" : 0, "fontname" : "Arial", "fontsize" : 12.0, "globalpatchername" : "", "tags" : "" } , "text" : "p FtoC" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-56", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 1483.0, 60.0, 248.0, 226.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" : "", "visible" : 1, "boxes" : [ { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-3", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 60.0, 180.0, 87.0, 33.0 ], "presentation_rect" : [ 59.0, 187.0, 0.0, 0.0 ], "text" : "This object is called outlet" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-2", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 60.0, 15.0, 87.0, 33.0 ], "text" : "This object is called inlet" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-42", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 15.0, 150.0, 43.0, 18.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 120.0, 38.0, 20.0 ], "text" : "+ 32." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 90.0, 32.5, 20.0 ], "text" : "/ 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-45", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 60.0, 32.5, 20.0 ], "text" : "* 9." } } , { "box" : { "comment" : "", "id" : "obj-51", "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 15.0, 15.0, 25.0, 25.0 ] } } , { "box" : { "comment" : "", "id" : "obj-52", "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 180.0, 25.0, 25.0 ] } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-52", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-42", 0 ] } } , { "patchline" : { "destination" : [ "obj-42", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-43", 0 ] } } , { "patchline" : { "destination" : [ "obj-43", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-45", 0 ] } } , { "patchline" : { "destination" : [ "obj-45", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 0 ] } } ] } , "patching_rect" : [ 420.0, 497.0, 47.0, 20.0 ], "presentation_rect" : [ 423.0, 502.0, 0.0, 0.0 ], "saved_object_attributes" : { "default_fontface" : 0, "default_fontname" : "Arial", "default_fontsize" : 12.0, "description" : "", "digest" : "", "fontface" : 0, "fontname" : "Arial", "fontsize" : 12.0, "globalpatchername" : "", "tags" : "" } , "text" : "p CtoF" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-61", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 525.0, 417.0, 75.0, 20.0 ], "presentation_rect" : [ 528.0, 422.0, 0.0, 0.0 ], "text" : "Fahrenheit" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-62", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 525.0, 452.0, 50.0, 20.0 ], "presentation_rect" : [ 528.0, 457.0, 0.0, 0.0 ] } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-63", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 417.0, 60.0, 20.0 ], "presentation_rect" : [ 423.0, 422.0, 0.0, 0.0 ], "text" : "Celsius" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-64", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 420.0, 452.0, 50.0, 20.0 ], "presentation_rect" : [ 423.0, 457.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-55", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 360.0, 180.0, 47.0 ], "text" : "When both conversion routines are encapsulated, it looks like this" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-53", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 0.0, 0.0, 640.0, 480.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, "id" : "obj-42", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 190.0, 43.0, 18.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 50.0, 160.0, 38.0, 20.0 ], "text" : "+ 32." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 50.0, 130.0, 32.5, 20.0 ], "text" : "/ 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-45", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 50.0, 100.0, 32.5, 20.0 ], "text" : "* 9." } } , { "box" : { "comment" : "", "id" : "obj-51", "maxclass" : "inlet", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 50.0, 40.0, 25.0, 25.0 ] } } , { "box" : { "comment" : "", "id" : "obj-52", "maxclass" : "outlet", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 50.0, 268.0, 25.0, 25.0 ] } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-52", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-42", 0 ] } } , { "patchline" : { "destination" : [ "obj-42", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-43", 0 ] } } , { "patchline" : { "destination" : [ "obj-43", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-45", 0 ] } } , { "patchline" : { "destination" : [ "obj-45", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 0 ] } } ] } , "patching_rect" : [ 615.0, 230.0, 47.0, 20.0 ], "saved_object_attributes" : { "default_fontface" : 0, "default_fontname" : "Arial", "default_fontsize" : 12.0, "description" : "", "digest" : "", "fontface" : 0, "fontname" : "Arial", "fontsize" : 12.0, "globalpatchername" : "", "tags" : "" } , "text" : "p CtoF" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-49", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 615.0, 90.0, 195.0, 47.0 ], "text" : "The result now looks like this. Edit the patcher object to give the subpatch a name" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-36", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 720.0, 320.0, 43.0, 18.0 ], "presentation_rect" : [ 725.0, 307.0, 0.0, 0.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-37", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 720.0, 290.0, 32.5, 20.0 ], "presentation_rect" : [ 725.0, 277.0, 0.0, 0.0 ], "text" : "/ 9." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-38", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 720.0, 260.0, 32.5, 20.0 ], "presentation_rect" : [ 725.0, 247.0, 0.0, 0.0 ], "text" : "* 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-39", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 720.0, 230.0, 35.0, 20.0 ], "presentation_rect" : [ 725.0, 217.0, 0.0, 0.0 ], "text" : "- 32." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-40", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 720.0, 150.0, 75.0, 20.0 ], "presentation_rect" : [ 725.0, 152.0, 0.0, 0.0 ], "text" : "Fahrenheit" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-41", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 720.0, 185.0, 50.0, 20.0 ], "presentation_rect" : [ 725.0, 187.0, 0.0, 0.0 ] } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-46", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 615.0, 150.0, 60.0, 20.0 ], "presentation_rect" : [ 620.0, 152.0, 0.0, 0.0 ], "text" : "Celsius" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-47", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 615.0, 185.0, 50.0, 20.0 ], "presentation_rect" : [ 620.0, 187.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-24", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 525.0, 320.0, 43.0, 18.0 ], "presentation_rect" : [ 512.0, 312.0, 0.0, 0.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-25", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 525.0, 290.0, 32.5, 20.0 ], "presentation_rect" : [ 512.0, 282.0, 0.0, 0.0 ], "text" : "/ 9." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-26", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 525.0, 260.0, 32.5, 20.0 ], "presentation_rect" : [ 512.0, 252.0, 0.0, 0.0 ], "text" : "* 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 525.0, 230.0, 35.0, 20.0 ], "presentation_rect" : [ 512.0, 222.0, 0.0, 0.0 ], "text" : "- 32." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-28", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 525.0, 150.0, 75.0, 20.0 ], "presentation_rect" : [ 512.0, 157.0, 0.0, 0.0 ], "text" : "Fahrenheit" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-29", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 525.0, 185.0, 50.0, 20.0 ], "presentation_rect" : [ 512.0, 192.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-30", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 420.0, 320.0, 43.0, 18.0 ], "presentation_rect" : [ 407.0, 312.0, 0.0, 0.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-31", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 420.0, 290.0, 38.0, 20.0 ], "presentation_rect" : [ 407.0, 282.0, 0.0, 0.0 ], "text" : "+ 32." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 420.0, 260.0, 32.5, 20.0 ], "presentation_rect" : [ 407.0, 252.0, 0.0, 0.0 ], "text" : "/ 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-33", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 420.0, 230.0, 32.5, 20.0 ], "presentation_rect" : [ 407.0, 222.0, 0.0, 0.0 ], "text" : "* 9." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-34", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 150.0, 60.0, 20.0 ], "presentation_rect" : [ 407.0, 157.0, 0.0, 0.0 ], "text" : "Celsius" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-35", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 420.0, 185.0, 50.0, 20.0 ], "presentation_rect" : [ 407.0, 192.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-23", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 420.0, 90.0, 180.0, 47.0 ], "text" : "Select the objects in front of the orange panel and choose \nEdit -> Encapsulate..." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 210.0, 515.0, 43.0, 18.0 ], "presentation_rect" : [ 136.0, 510.0, 0.0, 0.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-17", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 210.0, 485.0, 32.5, 20.0 ], "text" : "/ 9." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 210.0, 455.0, 32.5, 20.0 ], "text" : "* 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 210.0, 425.0, 35.0, 20.0 ], "text" : "- 32." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-20", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 210.0, 360.0, 75.0, 20.0 ], "presentation_rect" : [ 136.0, 370.0, 0.0, 0.0 ], "text" : "Fahrenheit" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-21", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 210.0, 395.0, 50.0, 20.0 ], "presentation_rect" : [ 136.0, 390.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 105.0, 515.0, 43.0, 18.0 ], "text" : "set $1" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-12", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 105.0, 485.0, 38.0, 20.0 ], "text" : "+ 32." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-11", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 105.0, 455.0, 32.5, 20.0 ], "text" : "/ 5." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "float" ], "patching_rect" : [ 105.0, 425.0, 32.5, 20.0 ], "text" : "* 9." } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-7", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 105.0, 360.0, 60.0, 20.0 ], "text" : "Celsius" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-4", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 105.0, 395.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-10", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 330.0, 300.0, 20.0 ], "text" : "Here is a temperature converter that we saw before:" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-8", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 270.0, 360.0, 47.0 ], "text" : "In Max, the patcher object (p for short) lets us encapsulate subpatches in a larger patch. Max even has convenient \nEdit -> Encapsulate and Edit -> De-encapsulate commands." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-5", "linecount" : 12, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 360.0, 167.0 ], "text" : "As our patches become more sophisticated we will need mechanisms that help us to deal with conceptual complexity. One of the most powerful ideas in engineering is modularity: complicated things should be made from simpler parts. This has a number of advantages. For one thing, parts can be recombined and reused. There is no need, in other words, to reinvent the wheel. When you understand how a part works, you can ignore it while you concentrate on other parts. If something breaks (or doesn't work) you can focus on the part that isn't working. If the project is large, individuals or teams can build particular parts in isolation from one another, as long as they agree on the interfaces, the ways that the parts are going to fit together." } } , { "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, 315.0, 51.0 ], "text" : "Patch 029. Use Patcher to Encapsulate Code \nWilliam J Turkel\nhttp://williamjturkel.net/code/#programming" } } , { "box" : { "bgcolor" : [ 1.0, 1.0, 1.0, 0.0 ], "border" : 1, "id" : "obj-3", "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 15.0, 75.0, 810.0, 495.0 ], "rounded" : 20 } } , { "box" : { "bgcolor" : [ 0.80264, 0.479698, 0.269871, 1.0 ], "id" : "obj-50", "maxclass" : "panel", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 405.0, 215.0, 75.0, 130.0 ] } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-12", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-11", 0 ] } } , { "patchline" : { "destination" : [ "obj-15", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-12", 0 ] } } , { "patchline" : { "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 114.5, 545.0, 195.0, 545.0, 195.0, 392.0, 219.5, 392.0 ], "source" : [ "obj-15", 0 ] } } , { "patchline" : { "destination" : [ "obj-4", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 219.5, 533.0, 165.0, 533.0, 165.0, 392.0, 114.5, 392.0 ], "source" : [ "obj-16", 0 ] } } , { "patchline" : { "destination" : [ "obj-16", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-17", 0 ] } } , { "patchline" : { "destination" : [ "obj-17", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-18", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 0 ] } } , { "patchline" : { "destination" : [ "obj-19", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-21", 0 ] } } , { "patchline" : { "destination" : [ "obj-35", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 534.5, 342.0, 492.0, 342.0, 492.0, 182.0, 429.5, 182.0 ], "source" : [ "obj-24", 0 ] } } , { "patchline" : { "destination" : [ "obj-24", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-25", 0 ] } } , { "patchline" : { "destination" : [ "obj-25", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-26", 0 ] } } , { "patchline" : { "destination" : [ "obj-26", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-27", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-29", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 429.5, 352.0, 510.0, 352.0, 510.0, 182.0, 534.5, 182.0 ], "source" : [ "obj-30", 0 ] } } , { "patchline" : { "destination" : [ "obj-30", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-31", 0 ] } } , { "patchline" : { "destination" : [ "obj-31", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-32", 0 ] } } , { "patchline" : { "destination" : [ "obj-32", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-33", 0 ] } } , { "patchline" : { "destination" : [ "obj-33", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-35", 0 ] } } , { "patchline" : { "destination" : [ "obj-47", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 729.5, 340.0, 675.0, 340.0, 675.0, 182.0, 624.5, 182.0 ], "source" : [ "obj-36", 0 ] } } , { "patchline" : { "destination" : [ "obj-36", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-37", 0 ] } } , { "patchline" : { "destination" : [ "obj-37", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-38", 0 ] } } , { "patchline" : { "destination" : [ "obj-38", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-39", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-4", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-41", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-47", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 624.5, 261.0, 705.0, 261.0, 705.0, 180.0, 729.5, 180.0 ], "source" : [ "obj-53", 0 ] } } , { "patchline" : { "destination" : [ "obj-62", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 429.5, 524.0, 510.0, 524.0, 510.0, 447.0, 534.5, 447.0 ], "source" : [ "obj-56", 0 ] } } , { "patchline" : { "destination" : [ "obj-67", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-62", 0 ] } } , { "patchline" : { "destination" : [ "obj-56", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-64", 0 ] } } , { "patchline" : { "destination" : [ "obj-64", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 534.5, 519.0, 480.0, 519.0, 480.0, 447.0, 429.5, 447.0 ], "source" : [ "obj-67", 0 ] } } , { "patchline" : { "destination" : [ "obj-86", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-75", 0 ] } } , { "patchline" : { "destination" : [ "obj-86", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-81", 0 ] } } , { "patchline" : { "destination" : [ "obj-75", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 639.5, 528.0, 744.0, 528.0, 744.0, 489.0, 726.0, 489.0, 726.0, 462.0, 744.5, 462.0 ], "source" : [ "obj-86", 0 ] } } , { "patchline" : { "destination" : [ "obj-81", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 723.5, 523.0, 615.0, 523.0, 615.0, 462.0, 639.5, 462.0 ], "source" : [ "obj-86", 1 ] } } , { "patchline" : { "destination" : [ "obj-11", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-9", 0 ] } } ], "dependency_cache" : [ ] } }