Just for info - to whom it might concern:
In the latest BASS .NET API 2.2.0.3 I have added some helper methods for FFT handling, which might be useful:
a) In Un4seen.Bass.Utils:
//Returns the index of a specific frequency for FFT data.
int FFTFrequency2Index(int frequency, int length, int samplerate)
b) In Un4seen.Bass.Utils:
// Returns the frequency of a specific index in FFT data.
int FFTIndex2Frequency(int index, int length, int samplerate)
c) Un4seen.Bass.Misc.Visuals:
// Gets the interpolated amplification value for a given frequency band.
float DetectFrequency(int channel, int freq1, int freq2, bool linear)
Example:
// The following line would adjust the scaling factor...
//Un4seen.Bass.Misc.Visuals.ScaleFactorSqr = 5;
//Un4seen.Bass.Misc.Visuals.ScaleFactorLinear = 10;
float amp = Un4seen.Bass.Misc.Visuals.DetectFrequency(_stream, 16495, 16505, false);
// depending on the scaling factor the amp value would be a float between 0..1..Scale:
// scaling-linear just applies the factor, scaling Sqr makes low values more visible
if (amp > 0.45)
{
// detected...
}