Public
Edited
Apr 28, 2023
Importers
9 stars
Insert cell
Insert cell
Insert cell
{
while (true) {
await Promises.delay(delay);
yield;
}
}
Insert cell
observer = {
const observer = new MutationObserver(({length}) => {
const oscillator = audio.createOscillator();
oscillator.connect(audio.destination);
oscillator.type = "sine";
oscillator.frequency.setValueAtTime(Math.log(length + 5) * 880, audio.currentTime);
oscillator.start();
oscillator.stop(audio.currentTime + 0.01);
});
observer.observe(document, {
attributes: true,
childList: true,
subtree: true,
characterData: true,
});
invalidation.then(() => observer.disconnect());
return observer;
}
Insert cell
audio = new (window.AudioContext || window.webkitAudioContext)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more