title: Plotting an audio spectrum
body: <p>I'm trying to implement an app that plot the spectrum of an audio using bass audio (<a href="http://www.un4seen.com/" rel="nofollow">http://www.un4seen.com/</a>). My understanding is that I will have to: </p>
  
  <ol>
  <li><p>Get the FFT data from the stream
   float[] buffer = new float[256];
     Bass.BASS_ChannelGetData(handle, buffer, (int)(BASS_DATA_FFT_COMPLEX|BASS_DATA_FFT_NOWINDOW));</p></li>
  <li><p>For each fft, compute it’s magnitude</p></li>
  <li><p>Apply a window function to the FFT (Hanning or Hamming will do)</p></li>
  <li><p>then, draw a beautiful spectrum analysis</p></li>
  </ol>
  
  <p>The problem however is that:</p>
  
  <ul>
  <li>It seems that the BASS_DATA_FFT_COMPLEX BassData isn't reachable. I can see it supposed to be available in the documentation <a href="http://www.bass.radio42.com/help/html/a13cfef0-1056-bb94-81c4-a4fdf21bd463.htm" rel="nofollow">http://www.bass.radio42.com/help/html/a13cfef0-1056-bb94-81c4-a4fdf21bd463.htm</a> but I cannot use it since I get an error that BassData does not include such enum</li>
  <li>Further, I'm wondering if what I'm doing is right. To plot a spectrum, should I be simply plot the magnitude of fft or plat the magnitude of fft against the frequency of that fft? In this case, how would I get the frequency corresponding to that fft? I don't mind any code snipped from any language (C/C++, C#, VB, Java, etc..)</li>
  </ul>
  
  <p>Note: I'm not sure if this helps but this is what I'm using:
  Plotting using Microsoft Chart control.
  C# with the BASS.NET API by
  <a href="http://www.bass.radio42.com/" rel="nofollow">http://www.bass.radio42.com/</a>
  Any help and suggestions in greatly appreciated</p>