@coleww/vocoder

0.1.3 • Public • Published

Vocoder

This 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 (ಥ﹏ಥ)

Installation

npm install --save vocoder

Usage

###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. These are both AudioBuffers. Returns an object containing the generated audioNodes and a start(when) function which will play the vocoded sound at when.

Example

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)
});

Readme

Keywords

none

Package Sidebar

Install

npm i @coleww/vocoder

Weekly Downloads

2

Version

0.1.3

License

MIT

Last publish

Collaborators

  • coleww