A vocoder for the web audio api
npm install @coleww/vocoderThis is a fork of Jamison Dance's port of Chris Wilson's Vocoder
project with all the UI stripped out and modified to work with Browserify and also gives u more control over when and how the vocoding happens.
Basically, you can control the pitch of a vocal track. (ノ◕ヮ◕)ノ*:・゚✧ M A G I C AL (ಥ﹏ಥ)
``bash`
npm install --save vocoder
###function vocoder(audioContext, carrierNode, modulatorBuffer, destination)
Setup a vocoder that will play the modulatorBuffer mixed in with the carrierNode (which is an audio node that is already making noise) through the destination.start(when)
These are both AudioBuffers. Returns an object containing the generated audioNodes and a function which will play the vocoded sound at when.
javascript
var vocoder = require('vocoder');
var load = require('webaudio-buffer-loader');var ctx = new AudioContext();
var gain = ctx.createGain()
load(['/carrier.ogg', '/modulator.ogg'], ctx, function(err, buffers) {
var itHasBeenVocoded = vocoder(ctx, buffers[0], buffers[1], gain)
itHasBeenVocoded.start(ctx.currentTime)
});
``