Skip to content

Instantly share code, notes, and snippets.

@youpy
Last active August 29, 2015 14:18
Show Gist options
  • Save youpy/92c608766f9aeb2aa4aa to your computer and use it in GitHub Desktop.
Save youpy/92c608766f9aeb2aa4aa to your computer and use it in GitHub Desktop.
var s = document.createElement('script');
s.setAttribute(
'src',
'https://youpy.github.io/Hoover.js/example/hoover.min.js'
);
s.addEventListener('load', function() {
var hoover = new Hoover(new AudioContext());
var interval = 200;
hoover.connect(hoover.context.destination);
hoover.start();
setInterval(
function() {
interval = 100 + Math.random() * 400;
hoover.frequency.setTargetAtTime(
100 + Math.random() * 400,
hoover.context.currentTime,
interval / 1000
);
},
interval + 100
);
});
document.body.appendChild(s);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment