0.2.0 • Published 9 years ago

altnode.eq-node v0.2.0

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

altnode.EQNode

Build Status NPM Version License

graph

Installation

npm install -S altnode.eq-node

API

EQNode

  • constructor(audioContext: AudioContext, paramsList: object[])

Instance methods

  • getAllFilters(): BiquadFilterNode[]
  • getFilterAtIndex(index: number): BiquadFilterNode
  • getFilterById(id: string): BiquadFilterNode

Example

import EQNode from "altnode.eq-node";

let audioContext = new AudioContext();
let bufSrc = audioContext.createBufferSource();
let eq = new EQNode(audioContext, [
  { frequency: 400, Q: 12, gain: 10 },
  { frequency: 800, Q: 16, gain: 20 },
  { id: "foo", frequency: 1200, Q: 14, gain: 30 },
  { id: "bar", frequency: 1600, Q: 12, gain: 20 },
  { type: "highpass", frequency: 200, Q: 0.9 },
  { type: "lowpass", frequency: 3200, Q: 3 }
]);

bufSrc.buffer = RhythmLoop;
bufSrc.loop = true;
bufSrc.start();
bufSrc.connect(eq);

eq.connect(audioContext.destination);

LICENSE

MIT