npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

audio-spectrum

2.0.0 • Public • Published

audio-spectrum unstable Greenkeeper badge

Show spectrum of audio data.

Usage

$ npm install audio-spectrum

let context = require('audio-context')
let spectrum = require('audio-spectrum')()
let generate = require('audio-generator')((time) => {
    return 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()

API

let showSpectrum = Spectrum(options)

Create spectrum visualizer function with showSpectrum(data) signature. options may include channel to pick the channel to show and every option for gl-spectrum.

Analogs

install

npm i audio-spectrum

Downloadsweekly downloads

0

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability