history = {
const historyLength = 1024;
const historyCanvas = html`<canvas width="${historyLength} height="${scales}" />`;
let i = 0;
while (true) {
const ctx = historyCanvas.getContext("2d");
ctx.drawImage(scalogramCanvas, i, 0, 1, scales);
yield Promises.tick(historyPeriod, historyCanvas);
i = (i + 1) % historyLength;
}
}