Skip to content

Instantly share code, notes, and snippets.

@NHQ
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NHQ/3375f7732a722778d8eb to your computer and use it in GitHub Desktop.
Save NHQ/3375f7732a722778d8eb to your computer and use it in GitHub Desktop.
paste this into http://node.module.club and hit SHIFT-ENTER. CAUTION: wear headphones or feedback will ensue.
jsynth = require('jsynth')
jdelay = require('jdelay')
context = (AudioContext) ? AudioContext : webkitAudioContext
master = new context
mic = require('jsynth-mic')(master)
delay = jdelay(master.sampleRate / 5, .02, 1)
mic.on('node', function(node){
var echolalia = function(time, i, s){
return delay(s)
}
var synth = jsynth(master, echolalia)
node.connect(synth)
synth.connect(master.destination)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment