Last active
August 29, 2015 14:05
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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