JSPM

web-audio-analyser

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 133
  • Score
    100M100P100Q89648F
  • License MIT

A thin wrapper around the Web Audio API that takes an <audio> element and gives you its waveform/frequency data in return.

Package Exports

  • web-audio-analyser

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (web-audio-analyser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

web-audio-analyser experimental

A thin wrapper around the Web Audio API that takes an <audio> element and gives you its waveform/frequency data in return.

web-audio-analyser

Usage

analyser = require('web-audio-analyser')(audio[, ctx])

Takes an <audio> element as its first argument - optionally, you can pass your own AudioContext instance too.

analyser.waveform([ui8array])

Copies the audio's current time-domain data into a Uint8Array. If you don't pass your own in, one will be created for you: this will be reused, so it's safe to call in an animation loop.

analyser.frequencies([ui8array])

Much like analyser.waveform, with the exception of copying the audio's currrent frequency data into a Uint8Array.