MCPcopy Create free account
hub / github.com/LabSound/LabSound / blamp

Function blamp

src/extended/PolyBLEPNode.cpp:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42inline double blamp(double t, const double dt)
43{
44 if (t < dt)
45 {
46 t = t / dt - 1.0;
47 return -1.0 / 3.0 * square(t) * t;
48 }
49 else if (t > 1.0 - dt)
50 {
51 t = (t - 1.0) / dt + 1.0;
52 return 1.0 / 3.0 * square(t) * t;
53 }
54 else return 0.0;
55}
56
57// PolyBLEP, a quasi-bandlimited oscillator
58class lab::PolyBlepImpl

Callers 7

halfMethod · 0.85
fullMethod · 0.85
triMethod · 0.85
tri2Method · 0.85
tripMethod · 0.85
trapMethod · 0.85
trap2Method · 0.85

Calls 1

squareFunction · 0.85

Tested by

no test coverage detected