You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The analyser.getByteFrequencyData method gives us an array of values, which is just what we want! Unfortunately, the number of values in the array is always a power of two (half of analyser.fftSize) and we need 19.
I think our only option is to use far more bins than we need, and simply average length/19 of the bins for each bar. It's going to lead to some inaccuracy along the way, but I can't see a better approach.
Currently we are getting 32 bins and drawing all of them, even though many are off the canvas. Gross.
The text was updated successfully, but these errors were encountered:
The
analyser.getByteFrequencyData
method gives us an array of values, which is just what we want! Unfortunately, the number of values in the array is always a power of two (half ofanalyser.fftSize
) and we need 19.I think our only option is to use far more bins than we need, and simply average length/19 of the bins for each bar. It's going to lead to some inaccuracy along the way, but I can't see a better approach.
Currently we are getting 32 bins and drawing all of them, even though many are off the canvas. Gross.
The text was updated successfully, but these errors were encountered: