Plot / PlotBlep

Basic . Blep

Right-click to copy examples to your workspace


/* example to visualize a BLEP */
function quadBLEP(t, dt)
{
    let upper = 1 - dt;
    if(t > dt && t < upper) return 0;
    if(t <= dt)
    {
        t = t / dt;
        return t + t - (t*t) - 1;
    }
    else
    {
        t = (t - 1) / dt;
        return t * t + t + t + 1;
    }
}


console.log("Refer to contents of plot panel");
let dt = 20 / 511;
let data = [];
data.length = 512;
for(let i=0; i<512;i++)
{
    data[i] = quadBLEP(i/511, dt);
}

PlotSignal(0, 0, data, "blep");

Produces this:

See also:

all-about-digital-oscillators

home .. topics .. interface .. reference .. examples .. tipjar