MCPcopy Create free account
hub / github.com/VCVRack/Befaco / process

Method process

src/PonyVCO.cpp:46–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44class FoldStage2 {
45public:
46 T process(T x) {
47 const T y = simd::ifelse(simd::abs(x - xPrev) < 1e-5, f(0.5 * (xPrev + x)), (F(x) - F(xPrev)) / (x - xPrev));
48 xPrev = x;
49 return y;
50 }
51
52 static T f(T x) {
53 return simd::ifelse(-(x + 2) > c, c, simd::ifelse(x < -1, -(x + 2), simd::ifelse(x < 1, x, simd::ifelse(-x + 2 > -c, -x + 2, -c))));

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected