Audio input with WebPd

An adc~ object for Sébastien Piquemal’s WebPd.

https://github.com/tkzic/WebPd

Try the demo (pictured above) in desktop Chrome at: http://zerokidz.com/demos/sound-check-adc/sound-check.html. The browser will ask for access to the microphone. The slider controls mic volume.

Notes on adc~ object:

**adc~** (web audio input) – Only works on Chrome desktop – partially complete. Uses 1 channel currently and no inlets on the object. This was kind of a hack. The input stream connects to a scriptNode that copies samples to a circular buffer. The scriptNode connects to a gainNode with gain value of zero, which connects to context.destination. This was the only way I could get WebAudio to pull the stream through the scriptNode.

Latency is about 3000 samples in addition to existing latency. If we find a more efficent way to buffer the samples than the hack described above…

Notes on local files 8/26/2014

After modifying any of the .js files in /lib folder, you need to re-run the ‘grunt build’ from the root folder. Then copy webpd-latest.js from /dist to the /js folder in /demos or wherever your application resides.