p5.js-website-OLD
p5.js-website-OLD copied to clipboard
Using HTML5 Audio as a p5.sound input
I'm not sure it warrants creating another example since it's not that complicated to set up but I thought I'd mention it since it took me a while to figure out that it was possible to use a HTML5
audio = p.select('#audio'); analyzer = new p5.Amplitude(); analyzer.setInput(audio);
It's especially useful in cases like mine where a file is too large to work well with loadSound().
Perhaps a note in the setInput reference page?