Comments (3)
I do not know the history of why things are computed the way they are, but I suspect the original purpose of the AnalyserNode was primarily for visualization, not really analysis of the audio data. If I were doing this, I'd at least have smoothing done based on Bartlett's method of averaged periodograms.
I think it's too late to change the algorithms unless it gives something truly and significantly better in some way.
from web-audio-api-v2.
I totally agree with your assessment - I just wanted to write down the result of my looking into this here for future reference, in case someone does decide to overhaul AnalyserNode at some point, or create a better replacement for it. I can understand if there is no urgent motivation to do this any time soon though.
My parallel feature request (to get access to the raw FFT output) would provide anyone who wants to use AnalyserNode's FFT with an easy way to replace its prepackaged postprocessing with their own; I think that's far more important than spiffing up the bundled package, which seems to be designed for just a single use case.
Interestingly, Bartlett's method also smoothes the squared magnitude, same as I proposed. For a stream-oriented framework, I think replacing an average with an exponential running average as done here for smoothing is a reasonable modification.
from web-audio-api-v2.
Teleconf: We have no plans on changing the algorithm for the AnalyserNode; it's too late for that.
Closing.
from web-audio-api-v2.
Related Issues (20)
- V2 documentation logistics HOT 2
- interaction between audio elements and the Web Audio API HOT 2
- Add ability to pause/resume AudioBufferSourceNode HOT 11
- AudioOutputContext HOT 21
- AnalyserNode: provide access to complex FFT result HOT 15
- Alternatives for module loading of AudioWorklet HOT 5
- Should 'Atomics.wait' be available in AudioWorklets associated with an OfflineAudioContext? HOT 8
- Request to Expose AudioBuffer to DedicatedWorker HOT 29
- Rename master branch to main HOT 2
- Set up to display the spec. HOT 10
- AudioWorklet should have a 'oversample' and a 'bufferSize' property HOT 5
- cancelScheduledValues and cancelAndHoldAtTime throws RangeError for non-finite
- Switching between 2 Microphones HOT 1
- No way to convert data from WebCodecs AudioData to AudioBuffer HOT 7
- Add frequency of one oscillator to be based on another HOT 1
- Define TextEncoderStream(), and TextDecoderStream() in AudioWorkletGlobalScope HOT 1
- Add Travis CI HOT 1
- RawPCMStreamNode (StreamNode, or InputStreamNode) HOT 8
- Set up PR review HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web-audio-api-v2.