t.createElement('div');
    div.appendChild(document.createTextNode(str));
    return div.innerHTML;
}

// Should be a good way below the Nyquist limit of 22.05 kHz.
const cutoffFrequency = 18000;

// How many filters to put in sequence.
const lowPassFilterSteps = 4;

// Each filter is an exponential filter, which mimics a simple analog RC filter.
// We need multiple of them in series to get decent attenuation near the stop band.

const lowPassBuffer = new Array(lowPassFilterSteps + 1).fill(0);

function ge