Skip to content

Commit

Permalink
Create opf.dsp
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaSpanedda committed Apr 16, 2024
1 parent d83be7d commit 4a690fd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions files/opf.dsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// import Standard Faust library
// https://github.com/grame-cncm/faustlibraries/
import("stdfaust.lib");

// (G) = give amplitude 1-0 (open-close) for the lowpass cut
// (CF) = Frequency Cut in HZ
OPF(CF,x) = OPFFBcircuit ~ _
with{
g(x) = x / (1.0 + x);
G = tan(CF * ma.PI / ma.SR):g;
OPFFBcircuit(y) = x*G+(y*(1-G));
};

process = OPF(20000) <: si.bus(2);

0 comments on commit 4a690fd

Please sign in to comment.