1.0.0 • Published 9 years ago

theremin v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

theremin

NPM

web audio theremin

var freq = 100
var gain = 0.5

var theremin = require('./')({gain: gain, freq: freq})

setInterval(function () {
  freq++
  theremin.setFreq(freq)
}, 30)

setInterval(function () {
  gain /= 1.3
  theremin.setGain(gain)
}, 200)

setFreq(freq)

set the fequence in hertz

setGain(gain)

set the volume, value should be between 0 and 1, where 0 is mute

write({freq: freq, gain: gain})

set frequence and gain with an object. this is a stream compatible write method.