Published
Edited
Apr 28, 2022
Insert cell
Insert cell
Insert cell
Tone = require('tone@14')
Insert cell
synth = new Tone.Synth({ portamento: .1 }).toDestination()
Insert cell
playNote = {
synth.triggerAttackRelease(notey, "32n");
}
Insert cell
freqs = d3
.scaleQuantize()
.domain([0, 100])
.range(outNotes)
Insert cell
mutable notey = freqs(oscInput)
Insert cell
oscInput = {
// Generate an oscillating number
let i = 0;
while (true) {
yield Promises.delay(1000, Math.abs(Math.cos(i++) * 100));
}
}
Insert cell
import { slider } from "@jashkenas/inputs"
Insert cell
outNotes = [
...Tonal.Scale.get("c3 pentatonic").notes,
...Tonal.Scale.get("c4 pentatonic").notes,
...Tonal.Scale.get("c5 pentatonic").notes
]
Insert cell
d3 = require('d3@6')
Insert cell
Tonal = require("@tonaljs/tonal")
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