fft.js | The fastest JS Radix-4/Radix-2 FFT implementation | Video Utils library
kandi X-RAY | fft.js Summary
kandi X-RAY | fft.js Summary
Implementation of Radix-4 FFT.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fft.js
fft.js Key Features
fft.js Examples and Code Snippets
Community Discussions
Trending Discussions on fft.js
QUESTION
I am trying to graph FFT from microphone input in the web browser. I created an object that plots the FFT result into a canvas. I first used the frequency data of a web audio analyzer (https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData) and got the plot that appears in black. It detects considerable levels for most frequencies until nearly 0.5 per sample. First graph is the FFT and the second is the captured microphone noise.
Later I did exactly the same, this time using fft.js (https://www.npmjs.com/package/fft.js). The resulting FFT looks barely populated, even though I have expanded the vertical axis (top left number is the maximum value in the graph)
I feel that there is a concept that I am missing out, and I would like to know: why the two FFT's have such different results? Do I need to shape the input or the output from a scale to another?
...ANSWER
Answered 2018-Jun-15 at 15:59You might be comparing apples and oranges here. According to the spec for getByteFrequencyData
, the values you get are on a dB scale.
The values from the FFT library are probably linear. If so, you'll need to convert that to dB before comparing results. (Or convert the byte frequency data to linear).
Note also, that WebAudio applies a windowing function before computing the result. This will probably make it different from your FFT result unless you also apply the same windowing function.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fft.js
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page