Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: AudioWorklet-based filter bank spectrum analyzer (Read 76 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

AudioWorklet-based filter bank spectrum analyzer

Hi, I've have been written some JS code and posted this project "Analog-style spectrum analyzer and sliding DFT visualization using AudioWorklet" over CodePen, which I started out as testbed to figure out how to implement AudioWorklet-based stuffs (e.g. a type of real-time audio analysis like this not possible with AnalyserNode.getFloatTimeDomainData) and evolved into a spinoff of " Frequency bands spectrum analyzer using either FFT or CQT" project

Summary of this project:
  • Perform the sample acquisition on the AudioWorkletProcessor part similar to AnalyserNode.getFloatTimeDomainData but better (65536 or larger samples + ChannelSplitterNode-less multichannel analysis support perhaps). In this case, getting audio samples ranging from last samples since previous calculation to latest samples
  • Transfer the audio chunk into main thread through postMessage() and onMessage() function on each ports
  • Then in the main thread, before processing for realtime spectral analysis, downmix all channels into single mono (all channels incl. LFE, same as "Downmix channels to mono" DSP from foobar2000) audio chunk
  • Perform time-domain filter bank analysis (either analog-style IIR filter bank, sliding windowed infinite Fourier transform, or constant-Q/variable-Q sliding DFT)
  • Finally, plot the bargraph of the resulting spectrum data

Here's the screenshot of this visualization project (1/24th octave bands, color gradient similar to fb2k's built-in "Spectrum" visualization, 4th order analog-style filter bank):
X

Of course, you can also try analog-style and SWIFT filter bank analyzer on foobar2000 using Spectrum Analyzer (foo_vis_spectrum_analyzer) component, though any inquiries about this component should be posted on a thread about this foobar2000 component instead and any inquiries and questions about the project itself (e.g. performance and possible optimizations on VQ-sDFT) should be posted here