Skip to content

Simple pitch shifter for Web Audio API based on delay nodes. Extends Jungle by Chris Wilso.

Notifications You must be signed in to change notification settings

pawelkaczmarek/soundbank-pitch-shift

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

soundbank-pitch-shift

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.

Install

$ npm install soundbank-pitch-shift

API

var PitchShift = require('soundbank-pitch-shift')

PitchShift(audioContext)

Create and return an AudioNode instance.

node.transpose (get/set)

Specify semi-tones to transpose the input signal by.

node.wet (AudioParam)

node.dry (AudioParam)

Example

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)

About

Simple pitch shifter for Web Audio API based on delay nodes. Extends Jungle by Chris Wilso.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%