Tag: web audio

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.

gibberface web audio

interface.js user interface plus gibberish.js audio engine.

By Charlie Roberts

https://github.com/charlieroberts/gibberface

Audio example of XY controller to contol pitch and pulsewidth of oscillators (pictured above).

Local clone: tkzic/gibberface – WIth a local web server running in tkzic. Here is a typical URL for testing: http://127.0.0.1:8000/gibberface/index.html

WordPress web audio test

Javascript code for a sine wave oscillator using the web audio API – embedded in this post.

This also works in mobile Safari in iOS 7. If the “stop” button doesn’t work, try reloading the page in the browser.”
 
play
 
stop

Warning: The WordPress visual editor will break this code.