1

I'm currently struggling with a number of DSP concepts when trying to make sense of the data returned from the Visualizer class's getFft() method.

Ultimately I'm looking to accomplish something like this:

float[] getBarSpectrum(int barCount)
{
    _visualizer.getFft(_myByteArrayFftBuffer);

    // Stuff to convert _myByteArrayFftBuffer to float[barCount]
}

A call to this method would look like:

// Get current audio split into 32 spectrum bands, ideally normalized in a 0.0 to 1.0 range
float[] spectrumBars = getBarSpectrum(32); 

I feel like I'm lost in a world of sample aggregators, Hanning Windows, byte[] formats, etc.

Sadly I don't even understand the "Trouble understanding getFft()" question here: Android 2.3 Visualizer - Trouble understanding getFft()

Could anyone provide some barebones pseudocode to help me implement my "getBarSpectrum" method?

Jon Halliday
  • 395
  • 3
  • 14
  • A little too broad. You many want to break this down into multiple questions. (sample format, byte to sample conversion, windowing, complex magnitude of fft results, scaling fft results, equal octave bands from fft results, and etc.) – hotpaw2 Mar 09 '18 at 00:04

0 Answers0