{
	"patcher" : 	{
		"fileversion" : 1,
		"appversion" : 		{
			"major" : 8,
			"minor" : 0,
			"revision" : 0,
			"architecture" : "x64",
			"modernui" : 1
		}
,
		"rect" : [ 109.0, 154.0, 600.0, 450.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" : "",
		"boxes" : [ 			{
				"box" : 				{
					"code" : "// filter input/output history:\r\nHistory x1, x2, y1, y2;\r\nx = in1;\t// input signal\r\ncf = in2; \t// cutoff frequency\r\nq = in3; \t// Q factor\r\n// calculate coefficients:\r\ntwopi_over_sr = twopi/samplerate;\t\r\nbw = cf/q; \t// bandwidth\r\nr = exp(-bw*twopi_over_sr);\r\nc1 = 2*r*cos(cf * twopi_over_sr);\r\nc2 = -r*r;\r\n// generate output:\r\ny = (1-r) * (x - r*x2) + c1*y1 + c2*y2;\r\n// filter history cascade:\r\ny2 = y1;\r\ny1 = y;\r\nx2 = x1;\r\nx1 = x;\r\nout1 = y;",
					"fontface" : 0,
					"fontname" : "Lato",
					"fontsize" : 12.0,
					"id" : "obj-5",
					"maxclass" : "codebox",
					"numinlets" : 3,
					"numoutlets" : 1,
					"outlettype" : [ "" ],
					"patching_rect" : [ 54.0, 65.0, 297.0, 316.0 ],
					"presentation_rect" : [ 54.0, 65.0, 297.0, 316.0 ],
					"style" : ""
				}

			}
, 			{
				"box" : 				{
					"fontname" : "Lato",
					"fontsize" : 12.0,
					"id" : "obj-2",
					"maxclass" : "newobj",
					"numinlets" : 0,
					"numoutlets" : 1,
					"outlettype" : [ "" ],
					"patching_rect" : [ 147.0, 20.0, 164.0, 23.0 ],
					"presentation_rect" : [ 147.0, 20.0, 164.0, 23.0 ],
					"style" : "",
					"text" : "in 2 @comment \"center freq\""
				}

			}
, 			{
				"box" : 				{
					"fontname" : "Lato",
					"fontsize" : 12.0,
					"id" : "obj-7",
					"maxclass" : "newobj",
					"numinlets" : 0,
					"numoutlets" : 1,
					"outlettype" : [ "" ],
					"patching_rect" : [ 332.0, 20.0, 107.0, 23.0 ],
					"presentation_rect" : [ 332.0, 20.0, 107.0, 23.0 ],
					"style" : "",
					"text" : "in 3 @comment Q"
				}

			}
, 			{
				"box" : 				{
					"fontname" : "Lato",
					"fontsize" : 12.0,
					"id" : "obj-1",
					"maxclass" : "newobj",
					"numinlets" : 0,
					"numoutlets" : 1,
					"outlettype" : [ "" ],
					"patching_rect" : [ 54.0, 20.0, 30.0, 23.0 ],
					"presentation_rect" : [ 54.0, 20.0, 30.0, 23.0 ],
					"style" : "",
					"text" : "in 1"
				}

			}
, 			{
				"box" : 				{
					"fontname" : "Lato",
					"fontsize" : 12.0,
					"id" : "obj-4",
					"maxclass" : "newobj",
					"numinlets" : 1,
					"numoutlets" : 0,
					"patching_rect" : [ 54.0, 412.0, 37.0, 23.0 ],
					"presentation_rect" : [ 54.0, 412.0, 37.0, 23.0 ],
					"style" : "",
					"text" : "out 1"
				}

			}
 ],
		"lines" : [ 			{
				"patchline" : 				{
					"destination" : [ "obj-5", 0 ],
					"source" : [ "obj-1", 0 ]
				}

			}
, 			{
				"patchline" : 				{
					"destination" : [ "obj-5", 1 ],
					"source" : [ "obj-2", 0 ]
				}

			}
, 			{
				"patchline" : 				{
					"destination" : [ "obj-4", 0 ],
					"source" : [ "obj-5", 0 ]
				}

			}
, 			{
				"patchline" : 				{
					"destination" : [ "obj-5", 2 ],
					"source" : [ "obj-7", 0 ]
				}

			}
 ]
	}

}
