Simple pitch shifter for Web Audio API based on delay nodes. Extends Jungle by Chris Wilso (Copyright Google).
Intended for use as a processor in soundbank, but it is compatible with any Web Audio API AudioNode set up.
$ npm install soundbank-pitch-shift
var PitchShift = require('soundbank-pitch-shift')
Create and return an AudioNode instance.
Specify semi-tones to transpose the input signal by.
var PitchShift = require('soundbank-pitch-shift')
var audioContext = new AudioContext()
var pitchShift = PitchShift(audioContext)
pitchShift.connect(audioContext.destination)
pitchShift.transpose = 12
pitchShift.wet.value = 1
pitchShift.dry.value = 0.5
setInterval(function(){
var source = audioContext.createOscillator()
source.connect(pitchShift)
source.start()
source.stop(audioContext.currentTime + 0.5)
}, 2000)