blob: ef0352634d261b761ab241852ec19fe2dba19c25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
component lowpass "Low-pass filter";
pin in float in;
pin out float out " out += (in - out) * gain ";
pin in bit load "When TRUE, copy \\fBin\\fR to \\fBout\\fR instead of applying the filter equation.";
param rw float gain;
function _;
license "GPL";
notes "The effect of a specific \\fBgain\\fR value is dependent on the period of the function that \\fBlowpass.\\fIN\\fR is added to";
;;
FUNCTION(_) {
if(load)
out = in;
else
out += (in - out) * gain;
}
|