theremin

1.0.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i theremin

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • finnpauls