Published
Edited
Oct 9, 2022
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
audioOut = {
let t = 0;
const a = new AudioOut(
8192,
(e) => {},
(b1, b2) => {
for (let i = 0; i < 8192; i++) {
b1[i] = 0.1 * Math.sin(((2 * Math.PI * t) / 44100) * 950);
b2[i] = 0.1 * Math.sin(((2 * Math.PI * t) / 44100) * 440);
t++;
}
}
);
invalidation.then(() => a.disconnect());

return a.final.then(() => a);
}
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

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