[flocking-users] Audio input with MediaStreamSourceNode

Colin Clark colin at colinclark.org
Sat Apr 5 20:53:26 EDT 2014

Hi all,

Today I added support for the Web Audio API’s MediaStreamSourceNode, which provides audio input in any modern browser. This replaces the lame Flash solution we were using previously. Tests on my MacBook and Chromebook suggest it’s quite effective down to the minimum buffer size supported by the Web Audio API (256 samples). Here are a couple of simple demos:


I haven’t yet had an opportunity to test on Android, iOS, or Firefox OS, so let me know it looks.

This also required some preliminary refactoring of the way nodes are managed in the web audio strategy, which should make simple use cases of inserting nodes before or after the Flocking ScriptProcessorNode easier. Here’s an updated example showing how nodes can be inserted after Flocking; no more monkey patching. Keep in mind that this API will definitely change once “islands” are implemented:



More information about the flocking mailing list