audio-stats

1.1.9 • Public • Published

Demo

Code Climate deps experimental

Web-audio stats grapher.

  • Spectrum
  • Spectrogram
  • Waveform
  • Wavelet

Usage

npm install audio-stats

var Stats = require('audio-stats');
 
var stats = new Stats(options);
 
source.connect(stats.node);
stats.node.connect(context.destination);
 
document.body.appendChild(stats.element);

API

Stats(options?)

Creates stats controller.

Option Description
minFrequency Starting frequency to plot, by default 20.
maxFrequency Maximum frequency to plot, by default 20000.
minDecibels Minimum decibels to capture, by default -90
maxDecibels Maximum decibels to limit, by default -30.
fftSize Number of frequencies to catch. Default is 8192.
smoothingTimeConstant Smoothing constant. Default is 0.8
log Display logarithmic frequencies. Default is true.

Stats.prototype.update()

Recalculate style, size and position.

Stats.prototype.on('draw', function (canvas) {})

Hook for drawing additional info on the canvas.

Package Sidebar

Install

npm i audio-stats

Weekly Downloads

1

Version

1.1.9

License

MIT

Last publish

Collaborators

  • dfcreative