{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 7, "minor" : 0, "revision" : 0, "architecture" : "x86", "modernui" : 1 } , "rect" : [ 86.0, 78.0, 841.0, 585.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-58", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 459.5, 480.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-57", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 384.0, 480.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-55", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 587.5, 409.0, 32.5, 22.0 ], "style" : "", "text" : "81" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-53", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 423.25, 409.0, 32.5, 22.0 ], "style" : "", "text" : "50" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-51", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "int", "int" ], "patching_rect" : [ 384.0, 450.0, 65.0, 22.0 ], "style" : "", "text" : "split 50 80" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-48", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 630.0, 409.0, 32.5, 22.0 ], "style" : "", "text" : "99" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-46", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 552.5, 409.0, 32.5, 22.0 ], "style" : "", "text" : "80" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-44", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 510.0, 409.0, 32.5, 22.0 ], "style" : "", "text" : "73" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-42", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 468.25, 409.0, 32.5, 22.0 ], "style" : "", "text" : "53" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-40", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 384.0, 409.0, 32.5, 22.0 ], "style" : "", "text" : "49" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-38", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 384.0, 360.0, 336.0, 33.0 ], "style" : "", "text" : "A related object is split. If a number falls within its range, it is sent out the left outlet, otherwise it is sent out the right outlet" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-36", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 255.0, 409.0, 65.0, 22.0 ], "style" : "", "text" : "set 80 100" } } , { "box" : { "id" : "obj-35", "maxclass" : "slider", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 570.0, 279.5, 122.0, 21.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-31", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 570.0, 244.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-32", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 570.0, 210.0, 105.0, 22.0 ], "style" : "", "text" : "scale 0 127 127 0" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-33", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 570.0, 179.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-34", "maxclass" : "slider", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 570.0, 144.0, 122.0, 21.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-30", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 570.0, 90.0, 150.0, 33.0 ], "style" : "", "text" : "Scale can be used to invert a range, too" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-29", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 244.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "newobj", "numinlets" : 6, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 390.0, 210.0, 99.0, 22.0 ], "style" : "", "text" : "scale 0 127 1 10" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 179.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-25", "maxclass" : "slider", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 144.0, 122.0, 21.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-26", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 390.0, 90.0, 150.0, 47.0 ], "style" : "", "text" : "The scale object can be used to map from one range to another" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-24", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 240.0, 260.0, 90.0, 60.0 ], "style" : "", "text" : "How do you set the range of dials and sliders?" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 180.0, 409.0, 60.0, 22.0 ], "style" : "", "text" : "set 50 80" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-16", "maxclass" : "message", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 120.0, 409.0, 53.0, 22.0 ], "style" : "", "text" : "set 0 50" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-13", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 120.0, 360.0, 210.0, 33.0 ], "style" : "", "text" : "Use a set message to change the clipping range" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-22", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 480.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-21", "maxclass" : "dial", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "float" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 510.0, 40.0, 40.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 30.0, 450.0, 62.0, 22.0 ], "style" : "", "text" : "clip 50 80" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-19", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 409.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-17", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 360.0, 77.0, 33.0 ], "style" : "", "text" : "Use clip to limit ranges" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 180.0, 90.0, 150.0, 47.0 ], "style" : "", "text" : "What happens when you enter a number out of the range of the dial or slider?" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-9", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 240.0, 144.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-10", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 180.0, 144.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-7", "maxclass" : "dial", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "float" ], "parameter_enable" : 0, "patching_rect" : [ 240.0, 180.0, 40.0, 40.0 ], "style" : "" } } , { "box" : { "id" : "obj-8", "maxclass" : "slider", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 180.0, 180.0, 20.0, 140.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-6", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 90.0, 300.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-5", "maxclass" : "dial", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "float" ], "parameter_enable" : 0, "patching_rect" : [ 90.0, 244.0, 40.0, 40.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-1", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 300.0, 50.0, 22.0 ], "style" : "" } } , { "box" : { "id" : "obj-4", "maxclass" : "slider", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 144.0, 20.0, 140.0 ], "style" : "" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-12", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 30.0, 90.0, 120.0, 47.0 ], "style" : "", "text" : "Slider and dial objects can be used for input or output" } } , { "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, 291.0, 51.0 ], "style" : "", "text" : "Patch 7-005. Sliders, Dials, Scaling and Clipping\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-8", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-16", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-19", 0 ] } } , { "patchline" : { "destination" : [ "obj-22", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-20", 0 ] } } , { "patchline" : { "destination" : [ "obj-21", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-22", 0 ] } } , { "patchline" : { "destination" : [ "obj-28", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-25", 0 ] } } , { "patchline" : { "destination" : [ "obj-29", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-27", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-28", 0 ] } } , { "patchline" : { "destination" : [ "obj-35", 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-34", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-36", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-4", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-40", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-42", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-46", 0 ] } } , { "patchline" : { "destination" : [ "obj-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-48", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-57", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-51", 0 ] } } , { "patchline" : { "destination" : [ "obj-58", 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-51", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-55", 0 ] } } , { "patchline" : { "destination" : [ "obj-7", 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 } }