2.0.0 • Published 10 years ago

soundbank-delay v2.0.0

Weekly downloads
8
License
ISC
Repository
github
Last release
10 years ago

soundbank-delay

Basic delay processor AudioNode with feedback, filter and wet/dry AudioParams.

Intended for use as a processor in soundbank, but it is compatible with any Web Audio API AudioNode set up.

Install

$ npm install soundbank-delay

API

var Delay = require('soundbank-delay')

Delay(audioContext)

Create and return an AudioNode instance.

node.sync (get/set)

When true, the delay rate is multiplied by 60 / node.tempo to allow beat sync.

node.time (AudioParam)

Time the feedback should be delayed by. Maximum value is 4 seconds.

If node.sync is true, this is the number or fraction of beats the feedback should be delayed by.

node.wet (AudioParam)

node.dry (AudioParam)

node.cutoff (AudioParam)

reverb.filterType (get/set)

Defaults to "lowpass".

Can be any of the filters types specified by BiquadFilterNode

node.feedback (AudioParam)

Example

var Delay = require('soundbank-delay')

var audioContext = new AudioContext()

var delay = Delay(audioContext)
delay.connect(audioContext.destination)

delay.time.value = 0.2 //seconds
delay.wet.value = 0.8
delay.dry.value = 1
delay.cutoff.value = 400 //Hz
delay.feedback.value = 0.6

setInterval(function(){
  var source = audioContext.createOscillator()
  source.connect(delay)
  source.start()
  source.stop(audioContext.currentTime + 0.5)
}, 2000)
2.0.0

10 years ago

1.1.0

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

11 years ago

0.0.1

11 years ago