Skip to content

Experience-Monks/analyser-frequency-average

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

gets an average intensity between two frequency ranges

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published