Show spectrum of audio data.
let context = require('audio-context')()
let spectrum = require('audio-spectrum')()
let generate = require('audio-generator')(Math.random, {duration: 4})
let write = require('web-audio-write')(context.destination, {channels: 1})
function tick () {
let buf = generate()
write(buf, tick)
spectrum(buf)
}
tick()
Create spectrum visualizer function with showSpectrum(data)
signature. options
may include channel
to pick the channel to show and every option for gl-spectrum.
- frequency-viewer — show spectrum in browser.
- sillyscope — oscilloscope and spectrogram in chromeless chrome.