Created
June 26, 2017 22:11
-
-
Save mohayonao/1acede6fcc53add0fbbd986b21767669 to your computer and use it in GitHub Desktop.
Revisions
-
mohayonao created this gist
Jun 26, 2017 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ 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);