{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 6, "minor" : 0, "revision" : 8 } , "rect" : [ 1001.0, 144.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-50", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 75.0, 375.0, 255.0, 60.0 ], "text" : "Here we create a basic synthesizer by allowing the user to choose a waveform, set the ADSR parameters for the signal envelope, then play notes on a keyboard." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-48", "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 390.0, 300.0, 75.0, 20.0 ], "text" : "Frequency" } } , { "box" : { "fontface" : 2, "fontname" : "Arial", "fontsize" : 13.0, "frgb" : 0.0, "id" : "obj-46", "linecount" : 5, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 60.0, 90.0, 80.0, 79.0 ], "text" : "Off\nSine\nSawtooth\nTriangle\nSquare" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 270.0, 225.0, 84.0, 20.0 ], "text" : "rect~ 440. 0.5" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-43", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 195.0, 225.0, 74.0, 20.0 ], "text" : "tri~ 440. 0.5" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-42", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 120.0, 225.0, 66.0, 20.0 ], "text" : "saw~ 440." } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-41", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 43.5, 225.0, 72.0, 20.0 ], "text" : "cycle~ 440." } } , { "box" : { "disabled" : [ 0, 0, 0, 0, 0 ], "id" : "obj-40", "itemtype" : 0, "maxclass" : "radiogroup", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 90.0, 18.0, 82.0 ], "size" : 5, "value" : 3 } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-39", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 30.0, 270.0, 73.0, 20.0 ], "text" : "selector~ 4" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-38", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "float", "float" ], "patching_rect" : [ 390.0, 195.0, 97.0, 20.0 ], "text" : "makenote 1 100" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-35", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 720.0, 211.5, 60.0, 33.0 ], "text" : "Release\nms" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-33", "linecount" : 3, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 660.0, 211.5, 55.0, 47.0 ], "presentation_rect" : [ 302.0, 223.0, 0.0, 0.0 ], "text" : "Sustain gain (0..1)" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-32", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 600.0, 211.5, 49.0, 33.0 ], "presentation_rect" : [ 243.5, 223.0, 0.0, 0.0 ], "text" : "Decay\nms" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-31", "linecount" : 2, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 538.5, 211.5, 45.0, 33.0 ], "text" : "Attack\nms" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-29", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 720.0, 270.0, 50.0, 20.0 ], "presentation_rect" : [ 364.0, 270.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-28", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 600.0, 270.0, 50.0, 20.0 ], "presentation_rect" : [ 238.5, 271.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-27", "maxclass" : "number", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "int", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 538.5, 270.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-23", "maxclass" : "flonum", "maximum" : 1.0, "minimum" : 0.0, "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 660.0, 270.0, 50.0, 20.0 ], "presentation_rect" : [ 322.0, 264.0, 0.0, 0.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-20", "maxclass" : "flonum", "numinlets" : 1, "numoutlets" : 2, "outlettype" : [ "float", "bang" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 270.0, 50.0, 20.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-18", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 390.0, 225.0, 34.0, 20.0 ], "text" : "mtof" } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-15", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "signal" ], "patching_rect" : [ 30.0, 315.0, 36.0, 20.0 ], "text" : "*~ 0." } } , { "box" : { "id" : "obj-14", "maxclass" : "kslider", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "int", "int" ], "parameter_enable" : 0, "patching_rect" : [ 390.0, 90.0, 336.0, 53.0 ], "presentation_rect" : [ 0.0, 0.0, 336.0, 53.0 ] } } , { "box" : { "id" : "obj-7", "maxclass" : "scope~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 525.0, 375.0, 130.0, 130.0 ], "range" : [ -0.5, 1.5 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 4, "outlettype" : [ "signal", "signal", "", "" ], "patching_rect" : [ 525.0, 315.0, 73.0, 20.0 ], "text" : "adsr~" } } , { "box" : { "id" : "obj-5", "maxclass" : "gain~", "numinlets" : 2, "numoutlets" : 2, "outlettype" : [ "signal", "int" ], "parameter_enable" : 0, "patching_rect" : [ 30.0, 345.0, 22.0, 140.0 ] } } , { "box" : { "id" : "obj-1", "maxclass" : "ezdac~", "numinlets" : 2, "numoutlets" : 0, "patching_rect" : [ 30.0, 495.0, 45.0, 45.0 ] } } , { "box" : { "fontname" : "Arial", "fontsize" : 12.0, "frgb" : 0.0, "id" : "obj-4", "linecount" : 4, "maxclass" : "comment", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 149.5, 90.0, 180.5, 60.0 ], "text" : "The adsr~ object allows us to specify a signal envelope in terms of Attack, Decay, Sustain and Release" } } , { "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 070. ADSR Synthesizer\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, 77.5, 810.0, 495.0 ], "rounded" : 20 } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-38", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-14", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-15", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-41", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 399.5, 246.0, 366.0, 246.0, 366.0, 210.0, 54.0, 210.0, 54.0, 222.0, 53.0, 222.0 ], "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-42", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 399.5, 246.0, 366.0, 246.0, 366.0, 210.0, 129.5, 210.0 ], "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-43", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 399.5, 246.0, 366.0, 246.0, 366.0, 210.0, 204.5, 210.0 ], "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 399.5, 246.0, 366.0, 246.0, 366.0, 210.0, 279.5, 210.0 ], "source" : [ "obj-18", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 3 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-23", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-27", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 2 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-28", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 4 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-29", 0 ] } } , { "patchline" : { "destination" : [ "obj-18", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-38", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 0 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 477.5, 255.0, 534.0, 255.0, 534.0, 300.0, 534.5, 300.0 ], "source" : [ "obj-38", 1 ] } } , { "patchline" : { "destination" : [ "obj-15", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-39", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-40", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-41", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 2 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 129.5, 255.0, 66.5, 255.0 ], "source" : [ "obj-42", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 3 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 204.5, 255.0, 80.0, 255.0 ], "source" : [ "obj-43", 0 ] } } , { "patchline" : { "destination" : [ "obj-39", 4 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 279.5, 255.0, 93.5, 255.0 ], "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 1 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-1", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-15", 1 ], "disabled" : 0, "hidden" : 0, "midpoints" : [ 534.5, 346.0, 74.0, 346.0, 74.0, 304.0, 56.5, 304.0 ], "source" : [ "obj-6", 0 ] } } , { "patchline" : { "destination" : [ "obj-7", 0 ], "disabled" : 0, "hidden" : 0, "source" : [ "obj-6", 0 ] } } ], "dependency_cache" : [ ] } }