webaudio-viz

0.2.0 • Public • Published

webaudio-viz

Minimally draws some web audio data to a canvas

Live demo page

Animated demo image

Install

Install via npm:

npm i --save webaudio-viz

To build or run the local demo use the npm scripts. If you don't have webpack installed globally, you'll need to do npm i -D webpack webpack-cli webpack-dev-server first.

Usage

import { Viz } from 'webaudio-viz'
 
var viz = new Viz(ctx, canvas, inputAudioNode, fps, mode)
viz.paused = false
 
// three draw modes
viz.mode = 0        // frequency bars
viz.mode = 1        // oscilloscope-style waveform
viz.mode = 2        // spectrogram animated over time
 
// other settings
viz.minDb = -96
viz.maxDb = -15
viz.minFreq = 150
viz.maxFreq = 15000

By

Made with 🍺 by Andy Hall. License is ISC.

Readme

Keywords

none

Package Sidebar

Install

npm i webaudio-viz

Weekly Downloads

3

Version

0.2.0

License

ISC

Unpacked Size

9.98 kB

Total Files

4

Last publish

Collaborators

  • andyhall