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

Method rect

src/extended/PolyBLEPNode.cpp:273–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271 }
272
273 double rect() const
274 {
275 double t2 = t + 1 - pulseWidth;
276 t2 -= bitwise_or_zero(t2);
277
278 double y = -2 * pulseWidth;
279 if (t < pulseWidth)
280 {
281 y += 2;
282 }
283
284 y += blep(t, freqInSecondsPerSample) - blep(t2, freqInSecondsPerSample);
285
286 return amplitude * y;
287 }
288
289 double saw() const
290 {

Callers

nothing calls this directly

Calls 2

bitwise_or_zeroFunction · 0.85
blepFunction · 0.85

Tested by

no test coverage detected