1.1.9 • Published 10 years ago
audio-stats v1.1.9
Web-audio stats grapher.
- Spectrum
- Spectrogram
- Waveform
- Wavelet
Usage
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.

