I am trying to find the frequency in hertz for every bin in the fft spectrum. Below is my code just adding the fft spectrum values inside a float list.
for (int len = 0; len < nyquistLength; ++len)
{
for (int channel = 0; channel < numChannels; ++channel)
{
channs += dspFFT.spectrum[channel][len];
if (channel == numChannels - 1)
{
spectrum.Add(Math.Abs(Mathf.Log10(channs)));
Debug.Log(spectrum[len]);
channs = 0;
}
}
}
How can I use this information to obtain the Hz of each entry in the spectrum? Thanks.