Created
August 23, 2020 22:08
-
-
Save jpcima/108deef74639f7b76ebfb0023ad43ac7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Figure 3.18: 1-pole TPT lowpass filter with resolved zero-delay feedback | |
g = hslider("Parameter g", 0., 0., 1., 0.01); | |
process(x) = out with { | |
G = g/(1+g); // gain term | |
/* the signal that enters the recursive structure (after multiplier) | |
as a function of z1 the output of the delay box */ | |
xIn(memZ1) = (x-memZ1)*G; | |
out = z1'+xIn(z1') | |
/* the top summer (+) that produces output | |
it's (z1') because the value is taken after the delay applied */ | |
letrec { | |
/* expression which compute next value in the delay box according to | |
the previous one */ | |
'z1 = | |
xIn(z1) /* left branch which enters bottom summer (+) */ + | |
(xIn(z1)+z1) /* right branch which enters bottom summer (+) */ | |
; | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment