Skip to content

mohayonao/white-noise-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhiteNoiseNode

Build Status NPM Version License

WhiteNoise AudioNode for Web Audio API

Installation

npm install white-noise-node

downloads:

API

PluckNode

  • constructor(audioContext)

Class Methods

  • install(): void
    • install createWhiteNoise() method to AudioContext.prototype force

Instance Methods

  • start(when: number): void
  • stop(when: number): void

Usage

var noise = new WhiteNoiseNode(audioContext);

noise.start(audioContext.currentTime);
noise.stop(audioContext.currentTime + 4);

Install to AudioContext

At first, call install() method.

require("white-noise-node").install();
<script src="/path/to/white-noise-node.js"></script>
<script>WhiteNoiseNode.install();</script>

Then, you can use createWhiteNoise() method at AudioContext.

Demo

http://mohayonao.github.io/white-noise-node/

License

MIT