This commit is contained in:
Alex Janka 2022-05-24 14:46:48 +10:00
commit 437f3ed2be
2 changed files with 35 additions and 0 deletions

20
FaustEffect.dsp Normal file
View file

@ -0,0 +1,20 @@
import("stdfaust.lib");
import("aanl.lib");
import("maths.lib");
import("basics.lib");
process = driver : wrapper : aa.hardclip2 : trimmer;
driver(x) = x * drive * squeeze;
trimmer(x) = x * (1 / squeeze);
wrapper(x) = (clipper(x) * fadeamt) + (x * (1 - fadeamt));
clipper(x) = aa.arctan(clipamt * x)/aa.arctan(clipamt);
drive = db2linear(nentry("drive", 0, 0, 1, 0.01) * 20) : si.smoo;
squeeze = db2linear(nentry("squeeze", 0, 0, 1, 0.01) * 20) : si.smoo;
// trim = db2linear((nentry("trim", 0, 0, 1, 0.01) * 20) - 20);
slider_raw = nentry("clipping", 0, 0, 1, 0.01);
slider = (.85*slider_raw)+0.15;
fadeamt = min(20*slider_raw, 1);
clipamt = max(ma.EPSILON, (slider^2)*20);

15
faustMinimal.h Normal file
View file

@ -0,0 +1,15 @@
#include <cmath>
#include <cstring>
#include "faust/gui/MapUI.h"
#include "faust/gui/meta.h"
#include "faust/dsp/dsp.h"
#include "faust/dsp/one-sample-dsp.h"
// BEGIN-FAUSTDSP
<<includeIntrinsic>>
<<includeclass>>
// END-FAUSTDSP