p5.js-website-OLD icon indicating copy to clipboard operation
p5.js-website-OLD copied to clipboard

Using HTML5 Audio as a p5.sound input

Open benjaminleonard opened this issue 9 years ago • 0 comments

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?

benjaminleonard avatar Apr 03 '16 16:04 benjaminleonard