Skip to content

Instantly share code, notes, and snippets.

@motoishmz
Created February 3, 2014 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motoishmz/8780877 to your computer and use it in GitHub Desktop.
Save motoishmz/8780877 to your computer and use it in GitHub Desktop.
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 0,
"architecture" : "x86"
}
,
"rect" : [ 54.0, 94.0, 117.0, 172.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-79",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 15.0, 15.0, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-77",
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "float", "bang" ],
"parameter_enable" : 0,
"patching_rect" : [ 15.0, 99.919983, 50.0, 20.0 ]
}
}
, {
"box" : {
"fontname" : "Arial",
"fontsize" : 12.0,
"id" : "obj-75",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 1,
"outlettype" : [ "" ],
"patching_rect" : [ 15.0, 65.248047, 78.0, 20.0 ],
"saved_object_attributes" : {
"filename" : "lowpass.js",
"parameter_enable" : 0
}
,
"text" : "js lowpass.js"
}
}
],
"lines" : [ {
"patchline" : {
"destination" : [ "obj-77", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-75", 0 ]
}
}
, {
"patchline" : {
"destination" : [ "obj-75", 0 ],
"disabled" : 0,
"hidden" : 0,
"source" : [ "obj-79", 0 ]
}
}
],
"dependency_cache" : [ ]
}
}
inlets = 2;
outlets = 1;
var amount = 0.3;
var filterd = 0.0;
function msg_float(a)
{
if (inlet == 0)
{
filterd = (a* amount) + (filterd * (1 - amount));
outlet(0, filterd);
}
if (inlet == 1)
{
amount = a;
post(amount);
return;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment