'' For a 16.384 samples 8 bit quantized sound
sample = 16384
Dim sound(sample) as Byte
Dim soundD(sample) as Double
'' Here you need to store your data in "sound"
'' .....
'' And convert them to Double
for cont= 0 to sample-1
soundD(cont) = sound(cont)
'' Aply fft
Dim fft as FFT
Dim re(sample/2) as Double
Dim im(sample/2) as Double
Dim amp(sample/2) as Double
fft.Transform2(soundD, re, im)
amp = fft.ToAmplitude(re,im)
Dim max as int = 0
for cont= 0 to sample/2
If (amp(cont)> amp(max)) Then
max = cont
End
Next