0

Im played with the javascript webaudio api to visualizing the audiostream of the song. Like I saw its using fft transform, and the result looking quite nice.

fft visualizer pic

But when I see other visalizers, they are using other algorithm, or transform the fft to something else. They are looks more closer to the rythm and the bass. On the spectrum more "hills" and them moving linear, and dancing.

spectrum_example

Lots of visualized song on the youtube using this other algorithm. What kind of analyser are they using? It is possible to earn that from js webaudio api, or from the fft?

S. Zee
  • 3
  • 1
  • Hi and welcome to StackOverflow. Please refer to https://stackoverflow.com/help/how-to-ask on how to ask a proper question and improve yours according the guidelines. – Fabian S. Aug 25 '17 at 08:40
  • Thank you Fabian, I will check that. – S. Zee Aug 25 '17 at 08:57

2 Answers2

0

There are lots of possible parameters in audio spectrum measurement and presentation (including, but not limited to): sample rate, FFT length, overlap, window function, time filtering of the sequence of FFT results (low pass, momentum, etc.), coloring scheme, frame rate, and etc. The Javascript webaudio API may or may not allow you to vary all those parameters to get many of the possible presentations.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153
0

You can get frequency data using the analyser node in the web audio Api, it has a configurable fft size, frequency bin count and smoothing constant. The getFloatFrequencyData method returns an array with the amplitudes of frequency ranges devided over the bin count. You can use this data to visualize it however you like.

David Sherman
  • 320
  • 2
  • 9
  • getFloatFrequencyData was the keyword, what I need. I tried to manipulate the getByteFrequencyData, and didn't know about Float function. Thanks so much, – S. Zee Nov 21 '17 at 21:05