jsynth-mic

0.5.0 • Public • Published

jsynth-mic

A simple Web Audio API module for accessing the getUserMedia audio stream from a mic/line-in. Returns an emitter, which.on('node') passes yours listener a Web Audio Node. See the example. Currently, the opinion of this module is to mix the mic to mono.

npm install jsynth-mic

the example

var audioContext = window.AudioContext || webkitAudioContext
var master = new audioContext()
 
// call the module with the master audio context
var mic = require('./')(master)
 
// it returns an event emitter
mic.on('node', function(node){
//  console.log(node) // a gain node
  node.connect(master.destination)
})
 

testing

you can run the example by browserifying entry.js, or using opa

npm install -g opa watchify
opa -e entry

Package Sidebar

Install

npm i jsynth-mic

Weekly Downloads

1

Version

0.5.0

License

BSD-2-Clause

Last publish

Collaborators

  • johnnyscript