Published
Edited
Dec 7, 2020
Importers
Insert cell
Insert cell
Insert cell
notes = {
let n = new Set()

return Generators.observe(next => {
next(Array.from(n))
const inputted =
midi.inputs.forEach(inp => {
inp.addListener('noteon', 'all', (e) => {
n.add(e.data[1]);

next(Array.from(n))
})
inp.addListener('noteoff', 'all', (e) => {
n.delete(e.data[1]);

next(Array.from(n))
})
})

return () => midi.inputs.forEach(inp => inp.removeListener())
})
}
Insert cell
Insert cell
Insert cell
Insert cell
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