{ "patcher" : { "fileversion" : 1, "appversion" : { "major" : 9, "minor" : 1, "revision" : 0, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "dsp.gen", "rect" : [ 743.0, 242.0, 989.0, 628.0 ], "gridsize" : [ 15.0, 15.0 ], "assistshowspatchername" : 0, "commentary" : "", "showcommentary" : 0, "boxes" : [ { "box" : { "id" : "obj-66", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 156.0, 86.0, 157.0, 22.0 ], "text" : "expr 4 * pow(in1\\, 2) - 3 * in1" } } , { "box" : { "id" : "obj-65", "maxclass" : "newobj", "numinlets" : 4, "numoutlets" : 2, "outlettype" : [ "", "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 9, "minor" : 1, "revision" : 0, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "dsp.gen", "rect" : [ 84.0, 150.0, 1000.0, 780.0 ], "gridsize" : [ 15.0, 15.0 ], "assistshowspatchername" : 0, "commentary" : "", "showcommentary" : 0, "boxes" : [ { "box" : { "code" : "// gen~ codebox version\nParam time(10); // ramp time in ms\nHistory state(0);\n\n// compute smoothing coefficient\n// gen~ uses samples, so we convert ms to coeff\ncoeff = exp(-1 / (time * samplerate * 0.001));\n\n// smooth toward input\nout = mix(in1, state, coeff);\nstate = out;", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-242", "maxclass" : "codebox", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 604.0, 220.0, 340.0, 200.0 ] } } , { "box" : { "code" : "// gen~ codebox version\nParam time(10); // ramp time in ms\nHistory state(0);\n\n// compute smoothing coefficient\n// gen~ uses samples, so we convert ms to coeff\ncoeff = exp(-1 / (time * samplerate * 0.001));\n\n// smooth toward input\nout = mix(in1, state, coeff);\nstate = out;", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-137", "maxclass" : "codebox", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 250.0, 220.0, 340.0, 200.0 ] } } , { "box" : { "id" : "obj-133", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 250.0, 160.0, 39.0, 22.0 ], "text" : "dbtoa" } } , { "box" : { "id" : "obj-130", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 250.0, 100.0, 151.0, 22.0 ], "text" : "scale -100. 100. -18. 18. 1." } } , { "box" : { "id" : "obj-198", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 140.0, 523.0, 59.0, 22.0 ], "text" : "mix" } } , { "box" : { "id" : "obj-200", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 160.0, 463.0, 32.0, 22.0 ], "text" : "atan" } } , { "box" : { "id" : "obj-159", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 523.0, 59.0, 22.0 ], "text" : "mix" } } , { "box" : { "id" : "obj-157", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 70.0, 463.0, 32.0, 22.0 ], "text" : "atan" } } , { "box" : { "id" : "obj-48", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 140.0, 413.0, 29.5, 22.0 ], "text" : "*" } } , { "box" : { "id" : "obj-47", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 413.0, 29.5, 22.0 ], "text" : "*" } } , { "box" : { "id" : "obj-59", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 40.0, 28.0, 22.0 ], "text" : "in 1" } } , { "box" : { "id" : "obj-60", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 140.0, 40.0, 28.0, 22.0 ], "text" : "in 2" } } , { "box" : { "id" : "obj-61", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 250.0, 40.0, 28.0, 22.0 ], "text" : "in 3" } } , { "box" : { "id" : "obj-62", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 604.0, 40.0, 28.0, 22.0 ], "text" : "in 4" } } , { "box" : { "id" : "obj-63", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 50.0, 614.0, 35.0, 22.0 ], "text" : "out 1" } } , { "box" : { "id" : "obj-64", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 140.0, 614.0, 35.0, 22.0 ], "text" : "out 2" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-133", 0 ], "source" : [ "obj-130", 0 ] } } , { "patchline" : { "destination" : [ "obj-137", 0 ], "source" : [ "obj-133", 0 ] } } , { "patchline" : { "destination" : [ "obj-47", 1 ], "order" : 1, "source" : [ "obj-137", 0 ] } } , { "patchline" : { "destination" : [ "obj-48", 1 ], "order" : 0, "source" : [ "obj-137", 0 ] } } , { "patchline" : { "destination" : [ "obj-159", 1 ], "source" : [ "obj-157", 0 ] } } , { "patchline" : { "destination" : [ "obj-63", 0 ], "source" : [ "obj-159", 0 ] } } , { "patchline" : { "destination" : [ "obj-64", 0 ], "source" : [ "obj-198", 0 ] } } , { "patchline" : { "destination" : [ "obj-198", 1 ], "source" : [ "obj-200", 0 ] } } , { "patchline" : { "destination" : [ "obj-159", 2 ], "order" : 1, "source" : [ "obj-242", 0 ] } } , { "patchline" : { "destination" : [ "obj-198", 2 ], "order" : 0, "source" : [ "obj-242", 0 ] } } , { "patchline" : { "destination" : [ "obj-157", 0 ], "order" : 0, "source" : [ "obj-47", 0 ] } } , { "patchline" : { "destination" : [ "obj-159", 0 ], "order" : 1, "source" : [ "obj-47", 0 ] } } , { "patchline" : { "destination" : [ "obj-198", 0 ], "order" : 1, "source" : [ "obj-48", 0 ] } } , { "patchline" : { "destination" : [ "obj-200", 0 ], "order" : 0, "source" : [ "obj-48", 0 ] } } , { "patchline" : { "destination" : [ "obj-47", 0 ], "source" : [ "obj-59", 0 ] } } , { "patchline" : { "destination" : [ "obj-48", 0 ], "source" : [ "obj-60", 0 ] } } , { "patchline" : { "destination" : [ "obj-130", 0 ], "source" : [ "obj-61", 0 ] } } , { "patchline" : { "destination" : [ "obj-242", 0 ], "source" : [ "obj-62", 0 ] } } ] } , "patching_rect" : [ 51.0, 508.0, 337.0, 22.0 ], "text" : "gen @title Volume&Clip" } } , { "box" : { "id" : "obj-54", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 369.0, 405.0, 93.0, 22.0 ], "text" : "param softclip 0", "varname" : "volume[1]" } } , { "box" : { "id" : "obj-5", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 369.0, 557.0, 35.0, 22.0 ], "text" : "out 2" } } , { "box" : { "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 51.0, 566.0, 35.0, 22.0 ], "text" : "out 1" } } , { "box" : { "id" : "obj-71", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 794.0, 39.0, 104.0, 22.0 ], "text" : "param sustain 25.", "varname" : "sustain" } } , { "box" : { "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 794.0, 86.0, 170.0, 22.0 ], "text" : "scale 0. 100. 1000. 10. 0.1375" } } , { "box" : { "id" : "obj-70", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 583.0, 39.0, 98.0, 22.0 ], "text" : "param attack 25.", "varname" : "attack" } } , { "box" : { "id" : "obj-10", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 583.0, 86.0, 143.0, 22.0 ], "text" : "scale 0. 100. 1. 30. 1.688" } } , { "box" : { "id" : "obj-173", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 352.0, 86.0, 123.0, 22.0 ], "text" : "scale 0. 100. 0. 60. 1." } } , { "box" : { "id" : "obj-69", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 352.0, 39.0, 95.0, 22.0 ], "text" : "param comp 25.", "varname" : "comp" } } , { "box" : { "id" : "obj-127", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 263.0, 405.0, 98.0, 22.0 ], "text" : "param volume 0.", "varname" : "volume" } } , { "box" : { "id" : "obj-203", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 157.0, 405.0, 29.5, 22.0 ], "text" : "*" } } , { "box" : { "id" : "obj-202", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 51.0, 405.0, 29.5, 22.0 ], "text" : "*" } } , { "box" : { "id" : "obj-53", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 9, "minor" : 1, "revision" : 0, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "dsp.gen", "rect" : [ 84.0, 150.0, 553.0, 780.0 ], "gridsize" : [ 15.0, 15.0 ], "assistshowspatchername" : 0, "commentary" : "", "showcommentary" : 0, "boxes" : [ { "box" : { "code" : "// gen~ codebox version\nParam time(10); // ramp time in ms\nHistory state(0);\n\n// compute smoothing coefficient\n// gen~ uses samples, so we convert ms to coeff\ncoeff = exp(-1 / (time * samplerate * 0.001));\n\n// smooth toward input\nout = mix(in1, state, coeff);\nstate = out;", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-109", "maxclass" : "codebox", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 319.0, 340.0, 200.0 ] } } , { "box" : { "id" : "obj-106", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 256.0, 39.0, 22.0 ], "text" : "dbtoa" } } , { "box" : { "id" : "obj-102", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 213.0, 137.0, 134.0, 22.0 ], "text" : "scale 1000. 10. 0. -6. 1." } } , { "box" : { "id" : "obj-101", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 130.0, 100.0, 114.0, 22.0 ], "text" : "scale 1. 30. 0. -6. 1." } } , { "box" : { "id" : "obj-103", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 190.0, 182.0, 22.0 ], "text" : "expr max(in1 + in2 + in3 - 3.\\, 0.)" } } , { "box" : { "id" : "obj-49", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 40.0, 28.0, 22.0 ], "text" : "in 1" } } , { "box" : { "id" : "obj-50", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 130.0, 40.0, 28.0, 22.0 ], "text" : "in 2" } } , { "box" : { "id" : "obj-51", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 213.0, 40.0, 28.0, 22.0 ], "text" : "in 3" } } , { "box" : { "id" : "obj-52", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 50.0, 574.0, 35.0, 22.0 ], "text" : "out 1" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-103", 1 ], "source" : [ "obj-101", 0 ] } } , { "patchline" : { "destination" : [ "obj-103", 2 ], "source" : [ "obj-102", 0 ] } } , { "patchline" : { "destination" : [ "obj-106", 0 ], "source" : [ "obj-103", 0 ] } } , { "patchline" : { "destination" : [ "obj-109", 0 ], "source" : [ "obj-106", 0 ] } } , { "patchline" : { "destination" : [ "obj-52", 0 ], "source" : [ "obj-109", 0 ] } } , { "patchline" : { "destination" : [ "obj-103", 0 ], "source" : [ "obj-49", 0 ] } } , { "patchline" : { "destination" : [ "obj-101", 0 ], "source" : [ "obj-50", 0 ] } } , { "patchline" : { "destination" : [ "obj-102", 0 ], "source" : [ "obj-51", 0 ] } } ] } , "patching_rect" : [ 503.0, 237.0, 179.0, 22.0 ], "text" : "gen @title Compensation" } } , { "box" : { "id" : "obj-204", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 293.0, 334.0, 29.5, 22.0 ], "text" : "*" } } , { "box" : { "id" : "obj-67", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 156.0, 39.0, 111.0, 22.0 ], "text" : "param lookahead 1", "varname" : "lookahead" } } , { "box" : { "id" : "obj-45", "maxclass" : "newobj", "numinlets" : 5, "numoutlets" : 1, "outlettype" : [ "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 9, "minor" : 1, "revision" : 0, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "dsp.gen", "rect" : [ 231.0, 106.0, 1016.0, 835.0 ], "gridsize" : [ 15.0, 15.0 ], "assistshowspatchername" : 0, "commentary" : "", "showcommentary" : 0, "boxes" : [ { "box" : { "id" : "obj-138", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 260.5, 59.183672904968262, 31.0, 22.0 ], "text" : "* -1." } } , { "box" : { "code" : "// gen~ codebox version\nParam time(50); // ramp time in ms\nHistory state(0);\n\n// compute smoothing coefficient\n// gen~ uses samples, so we convert ms to coeff\ncoeff = exp(-1 / (time * samplerate * 0.001));\n\n// smooth toward input\nout = mix(in1, state, coeff);\nstate = out;", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-2", "maxclass" : "codebox", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 659.183667182922363, 344.897955894470215, 340.0, 200.0 ] } } , { "box" : { "id" : "obj-33", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 160.5, 335.0, 39.0, 22.0 ], "text" : "dbtoa" } } , { "box" : { "id" : "obj-40", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 951.0, 189.0, 70.0, 22.0 ], "text" : "mstosamps" } } , { "box" : { "id" : "obj-30", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 871.0, 189.0, 70.0, 22.0 ], "text" : "mstosamps" } } , { "box" : { "id" : "obj-75", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 418.0, 74.0, 22.0 ], "text" : "maximum 0." } } , { "box" : { "code" : "// gen~ codebox version\nParam time(50); // ramp time in ms\nHistory state(0);\n\n// compute smoothing coefficient\n// gen~ uses samples, so we convert ms to coeff\ncoeff = exp(-1 / (time * samplerate * 0.001));\n\n// smooth toward input\nout = mix(in1, state, coeff);\nstate = out;", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-242", "maxclass" : "codebox", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 260.5, 94.897958278656006, 340.0, 200.0 ] } } , { "box" : { "id" : "obj-139", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 659.183667182922363, 170.408161640167236, 39.0, 22.0 ], "text" : "dbtoa" } } , { "box" : { "id" : "obj-68", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 249.999997615814209, 763.265298843383789, 39.0, 22.0 ], "text" : "dbtoa" } } , { "box" : { "id" : "obj-62", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 150.0, 578.0, 39.0, 22.0 ], "text" : "atodb" } } , { "box" : { "id" : "obj-61", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 249.999997615814209, 726.530605316162109, 27.0, 22.0 ], "text" : "* -1" } } , { "box" : { "id" : "obj-60", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 249.999997615814209, 690.816319942474365, 29.5, 22.0 ], "text" : "*" } } , { "box" : { "id" : "obj-59", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 659.183667182922363, 245.918365001678467, 29.5, 22.0 ], "text" : "!- 1." } } , { "box" : { "id" : "obj-58", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 659.183667182922363, 206.12244701385498, 30.0, 22.0 ], "text" : "!/ 1." } } , { "box" : { "id" : "obj-52", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 250.0, 638.0, 29.5, 22.0 ], "text" : "-" } } , { "box" : { "id" : "obj-49", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 150.0, 548.0, 29.5, 22.0 ], "text" : "+" } } , { "box" : { "id" : "obj-20", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 478.0, 40.0, 22.0 ], "text" : "slide" } } , { "box" : { "id" : "obj-8", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 388.0, 29.5, 22.0 ], "text" : "-" } } , { "box" : { "id" : "obj-7", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 99.999999046325684, 74.489795207977295, 28.0, 22.0 ], "text" : "abs" } } , { "box" : { "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 49.999999523162842, 74.489795207977295, 28.0, 22.0 ], "text" : "abs" } } , { "box" : { "id" : "obj-5", "maxclass" : "newobj", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 130.0, 69.0, 22.0 ], "text" : "maximum" } } , { "box" : { "id" : "obj-38", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 49.999999523162842, 12.244897842407227, 28.0, 22.0 ], "text" : "in 1" } } , { "box" : { "id" : "obj-39", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 99.999999046325684, 12.244897842407227, 28.0, 22.0 ], "text" : "in 2" } } , { "box" : { "id" : "obj-41", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 659.183667182922363, 12.244897842407227, 28.0, 22.0 ], "text" : "in 3" } } , { "box" : { "id" : "obj-42", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 871.428563117980957, 13.265305995941162, 28.0, 22.0 ], "text" : "in 4" } } , { "box" : { "id" : "obj-43", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 951.02039909362793, 13.265305995941162, 28.0, 22.0 ], "text" : "in 5" } } , { "box" : { "id" : "obj-44", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 249.999997615814209, 794.897951602935791, 35.0, 22.0 ], "text" : "out 1" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-242", 0 ], "source" : [ "obj-138", 0 ] } } , { "patchline" : { "destination" : [ "obj-58", 0 ], "source" : [ "obj-139", 0 ] } } , { "patchline" : { "destination" : [ "obj-60", 1 ], "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-49", 0 ], "source" : [ "obj-20", 0 ] } } , { "patchline" : { "destination" : [ "obj-33", 0 ], "order" : 1, "source" : [ "obj-242", 0 ] } } , { "patchline" : { "destination" : [ "obj-52", 1 ], "order" : 0, "source" : [ "obj-242", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 1 ], "source" : [ "obj-30", 0 ] } } , { "patchline" : { "destination" : [ "obj-49", 1 ], "order" : 0, "source" : [ "obj-33", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 1 ], "order" : 1, "source" : [ "obj-33", 0 ] } } , { "patchline" : { "destination" : [ "obj-6", 0 ], "source" : [ "obj-38", 0 ] } } , { "patchline" : { "destination" : [ "obj-7", 0 ], "source" : [ "obj-39", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 2 ], "source" : [ "obj-40", 0 ] } } , { "patchline" : { "destination" : [ "obj-138", 0 ], "order" : 1, "source" : [ "obj-41", 0 ] } } , { "patchline" : { "destination" : [ "obj-139", 0 ], "order" : 0, "source" : [ "obj-41", 0 ] } } , { "patchline" : { "destination" : [ "obj-30", 0 ], "source" : [ "obj-42", 0 ] } } , { "patchline" : { "destination" : [ "obj-40", 0 ], "source" : [ "obj-43", 0 ] } } , { "patchline" : { "destination" : [ "obj-62", 0 ], "source" : [ "obj-49", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 0 ], "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-60", 0 ], "source" : [ "obj-52", 0 ] } } , { "patchline" : { "destination" : [ "obj-59", 0 ], "source" : [ "obj-58", 0 ] } } , { "patchline" : { "destination" : [ "obj-2", 0 ], "source" : [ "obj-59", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 0 ], "source" : [ "obj-6", 0 ] } } , { "patchline" : { "destination" : [ "obj-61", 0 ], "source" : [ "obj-60", 0 ] } } , { "patchline" : { "destination" : [ "obj-68", 0 ], "source" : [ "obj-61", 0 ] } } , { "patchline" : { "destination" : [ "obj-52", 0 ], "source" : [ "obj-62", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "source" : [ "obj-68", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 1 ], "source" : [ "obj-7", 0 ] } } , { "patchline" : { "destination" : [ "obj-20", 0 ], "source" : [ "obj-75", 0 ] } } , { "patchline" : { "destination" : [ "obj-75", 0 ], "source" : [ "obj-8", 0 ] } } ] } , "patching_rect" : [ 293.0, 237.0, 144.0, 22.0 ], "text" : "gen @title Compression" } } , { "box" : { "id" : "obj-9", "maxclass" : "newobj", "numinlets" : 3, "numoutlets" : 2, "outlettype" : [ "", "" ], "patcher" : { "fileversion" : 1, "appversion" : { "major" : 9, "minor" : 1, "revision" : 0, "architecture" : "x64", "modernui" : 1 } , "classnamespace" : "dsp.gen", "rect" : [ 119.0, 186.0, 1345.0, 667.0 ], "gridsize" : [ 15.0, 15.0 ], "assistshowspatchername" : 0, "commentary" : "", "showcommentary" : 0, "boxes" : [ { "box" : { "id" : "obj-195", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 668.0, 597.0, 35.0, 22.0 ], "text" : "out 2" } } , { "box" : { "code" : "// gen~ codebox: variable delay with smoothed time control\n// in1 = audio signal\n// in2 = delay time in SAMPLES (if <= 0, fallback to d_ms param)\n\nParam d_ms(10); // fallback delay time in ms\nParam smooth_ms(5); // smoothing time (ms) for delay-time changes\nHistory d_samps_smooth(0); // smoothed delay-time state\n\n// Use a named delay line with a LITERAL max size (samples)\nDelay dline(1024); // ~21.3 ms @ 48 kHz (increase if you need more)\n\n// -------- main --------\ninSig = in1;\n\n// fallback delay (ms -> samples)\nfallback_samps = d_ms * samplerate * 0.001;\n\n// choose target (samples): prefer in2, otherwise fallback\ntarget_samps = (in2 > 0) ? in2 : fallback_samps;\n\n// clamp to buffer size\ntarget_samps = clamp(target_samps, 0, 1024);\n\n// smoothing coefficient from ms\neps = 1e-9;\nalpha = exp(-1 / (max(smooth_ms, 0) * samplerate * 0.001 + eps));\n\n// smooth delay-time changes to avoid zippering\nd_samps_smooth = mix(target_samps, d_samps_smooth, alpha);\n\n// write then read from the delay line (fractional read allowed)\ndline.write(inSig);\nout1 = dline.read(d_samps_smooth);\n", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-73", "maxclass" : "codebox", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 668.0, 128.0, 603.0, 433.0 ] } } , { "box" : { "id" : "obj-2", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 668.0, 28.0, 28.0, 22.0 ], "text" : "in 2" } } , { "box" : { "code" : "// gen~ codebox: variable delay with smoothed time control\n// in1 = audio signal\n// in2 = delay time in SAMPLES (if <= 0, fallback to d_ms param)\n\nParam d_ms(10); // fallback delay time in ms\nParam smooth_ms(5); // smoothing time (ms) for delay-time changes\nHistory d_samps_smooth(0); // smoothed delay-time state\n\n// Use a named delay line with a LITERAL max size (samples)\nDelay dline(1024); // ~21.3 ms @ 48 kHz (increase if you need more)\n\n// -------- main --------\ninSig = in1;\n\n// fallback delay (ms -> samples)\nfallback_samps = d_ms * samplerate * 0.001;\n\n// choose target (samples): prefer in2, otherwise fallback\ntarget_samps = (in2 > 0) ? in2 : fallback_samps;\n\n// clamp to buffer size\ntarget_samps = clamp(target_samps, 0, 1024);\n\n// smoothing coefficient from ms\neps = 1e-9;\nalpha = exp(-1 / (max(smooth_ms, 0) * samplerate * 0.001 + eps));\n\n// smooth delay-time changes to avoid zippering\nd_samps_smooth = mix(target_samps, d_samps_smooth, alpha);\n\n// write then read from the delay line (fractional read allowed)\ndline.write(inSig);\nout1 = dline.read(d_samps_smooth);\n", "fontface" : 0, "fontname" : "Menlo Regular", "fontsize" : 12.0, "id" : "obj-5", "maxclass" : "codebox", "numinlets" : 2, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 128.0, 603.0, 433.0 ] } } , { "box" : { "id" : "obj-88", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 1252.0, 66.0, 70.0, 22.0 ], "text" : "mstosamps" } } , { "box" : { "id" : "obj-6", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 50.0, 40.0, 28.0, 22.0 ], "text" : "in 1" } } , { "box" : { "id" : "obj-7", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 1252.0, 28.0, 28.0, 22.0 ], "text" : "in 3" } } , { "box" : { "id" : "obj-8", "maxclass" : "newobj", "numinlets" : 1, "numoutlets" : 0, "patching_rect" : [ 50.0, 597.0, 35.0, 22.0 ], "text" : "out 1" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-73", 0 ], "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-8", 0 ], "source" : [ "obj-5", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 0 ], "source" : [ "obj-6", 0 ] } } , { "patchline" : { "destination" : [ "obj-88", 0 ], "source" : [ "obj-7", 0 ] } } , { "patchline" : { "destination" : [ "obj-195", 0 ], "source" : [ "obj-73", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 1 ], "order" : 1, "source" : [ "obj-88", 0 ] } } , { "patchline" : { "destination" : [ "obj-73", 1 ], "order" : 0, "source" : [ "obj-88", 0 ] } } ] } , "patching_rect" : [ 51.0, 237.0, 125.0, 22.0 ], "text" : "gen @title Lookahead" } } , { "box" : { "id" : "obj-1", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 51.0, 39.0, 28.0, 22.0 ], "text" : "in 1" } } , { "box" : { "id" : "obj-2", "maxclass" : "newobj", "numinlets" : 0, "numoutlets" : 1, "outlettype" : [ "" ], "patching_rect" : [ 104.0, 39.0, 28.0, 22.0 ], "text" : "in 2" } } ], "lines" : [ { "patchline" : { "destination" : [ "obj-45", 0 ], "order" : 0, "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 0 ], "order" : 1, "source" : [ "obj-1", 0 ] } } , { "patchline" : { "destination" : [ "obj-45", 3 ], "order" : 1, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 1 ], "order" : 0, "source" : [ "obj-10", 0 ] } } , { "patchline" : { "destination" : [ "obj-65", 2 ], "source" : [ "obj-127", 0 ] } } , { "patchline" : { "destination" : [ "obj-45", 2 ], "order" : 1, "source" : [ "obj-173", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 0 ], "order" : 0, "source" : [ "obj-173", 0 ] } } , { "patchline" : { "destination" : [ "obj-45", 1 ], "order" : 0, "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 1 ], "order" : 1, "source" : [ "obj-2", 0 ] } } , { "patchline" : { "destination" : [ "obj-65", 0 ], "source" : [ "obj-202", 0 ] } } , { "patchline" : { "destination" : [ "obj-65", 1 ], "source" : [ "obj-203", 0 ] } } , { "patchline" : { "destination" : [ "obj-202", 1 ], "order" : 1, "source" : [ "obj-204", 0 ] } } , { "patchline" : { "destination" : [ "obj-203", 1 ], "order" : 0, "source" : [ "obj-204", 0 ] } } , { "patchline" : { "destination" : [ "obj-45", 4 ], "order" : 1, "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-53", 2 ], "order" : 0, "source" : [ "obj-44", 0 ] } } , { "patchline" : { "destination" : [ "obj-204", 0 ], "source" : [ "obj-45", 0 ] } } , { "patchline" : { "destination" : [ "obj-204", 1 ], "source" : [ "obj-53", 0 ] } } , { "patchline" : { "destination" : [ "obj-65", 3 ], "source" : [ "obj-54", 0 ] } } , { "patchline" : { "destination" : [ "obj-5", 0 ], "source" : [ "obj-65", 1 ] } } , { "patchline" : { "destination" : [ "obj-6", 0 ], "source" : [ "obj-65", 0 ] } } , { "patchline" : { "destination" : [ "obj-9", 2 ], "source" : [ "obj-66", 0 ] } } , { "patchline" : { "destination" : [ "obj-66", 0 ], "source" : [ "obj-67", 0 ] } } , { "patchline" : { "destination" : [ "obj-173", 0 ], "source" : [ "obj-69", 0 ] } } , { "patchline" : { "destination" : [ "obj-10", 0 ], "source" : [ "obj-70", 0 ] } } , { "patchline" : { "destination" : [ "obj-44", 0 ], "source" : [ "obj-71", 0 ] } } , { "patchline" : { "destination" : [ "obj-202", 0 ], "source" : [ "obj-9", 0 ] } } , { "patchline" : { "destination" : [ "obj-203", 0 ], "source" : [ "obj-9", 1 ] } } ], "autosave" : 0 } }