🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

analyser-frequency-average

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analyser-frequency-average

gets an average Hz between two frequency ranges

1.0.0
latest
Source
npm
Version published
Weekly downloads
1.2K
14.43%
Maintainers
1
Weekly downloads
 
Created
Source

analyser-average-frequency

stable

For the given WebAudio AnalyserNode, determine the average signal (0 .. 1) between two frequency ranges in Hz. This can be useful for audio visualization on a certain spectrum of the frequency graph.

The frequency is assumed to be in byte data, though you can use the floatData entry point to get around this.

Usage

NPM

avg = average(analyser, frequencies, minHz, maxHz)

Returns the average signal in 0 .. 1 range for the given analyser (AnalyserNode) and frequencies (array of byte frequency data from that node). The minHz and maxHz is the frequency range to sum, in Herz.

avg = average.floatData(analyser, floatFrequencies, minHz, maxHz)

The same as above, but intended to be used with the result of analyserNode.getFloatFrequencyData().

License

MIT, see LICENSE.md for details.

Keywords

freq

FAQs

Package last updated on 25 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts