pink-noise-node

PinkNoiseNode for Web Audio API

Usage no npm install needed!

<script type="module">
  import pinkNoiseNode from 'https://cdn.skypack.dev/pink-noise-node';
</script>

README

PinkNoiseNode

Build Status NPM Version License

PinkNoise AudioNode for Web Audio API

Installation

npm install pink-noise-node

downloads:

API

PluckNode

  • constructor(audioContext)

Class Methods

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

Instance Methods

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

Usage

var noise = new PinkNoiseNode(audioContext);

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

Install to AudioContext

At first, call install() method.

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

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

Demo

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

License

MIT