Created
June 26, 2017 22:11
-
-
Save mohayonao/1acede6fcc53add0fbbd986b21767669 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import neume, { scapi } from "neume"; | |
const neu = neume(); | |
const { mul, SinOsc } = scapi; | |
const hello = neu.def("hello", () => { | |
const freq = ctl("freq"); | |
SinOsc(freq)::mul(0.2); | |
}); | |
let synth = { kill: () => {} }; | |
setInterval(() => { | |
synth.kill(); | |
const freq = (Math.random() * 2 - 1) * 220 + 880; | |
synth = hello(neu.currentTime. { freq }); | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment