freeverb
v1.1.2
Published
A Web Audio implementation of freeverb (Schroeder Reverberator)
Downloads
47
Maintainers
Readme
freeverb
A Web Audio implementation of freeverb (Schroeder Reverberator).
Extracted from TONE.js by Yotam Mann.
Install via npm
$ npm install freeverb
API
var Freeverb = require('freeverb')
var reverb = Freeverb(audioContext)
Returns an instance of AudioNode
reverb.roomSize
(attribute)
A value between 0
and 1
.
reverb.dampening
(attribute)
A value between 0
and 20000
(in Hertz).
reverb.dry
(AudioParam)
reverb.wet
(AudioParam)
reverb.connect(target)
reverb.disconnect()
License
MIT
Example
var Freeverb = require('freeverb')
var audioContext = new AudioContext()
var osc = audioContext.createOscillator()
osc.type = 'sawtooth'
osc.start(audioContext.currentTime+0.1)
osc.stop(audioContext.currentTime+0.4)
var reverb = Freeverb(audioContext)
reverb.roomSize = 0.9
reverb.dampening = 3000
reverb.wet.value = 0.8
reverb.dry.value = 1
osc.connect(reverb)
reverb.connect(audioContext.destination)