[fpc-pascal] Good FFT example anywhere?
Adriaan van Os
fpc at microbizz.nl
Sun Apr 9 10:27:34 CEST 2017
Bo Berglund wrote:
> I am looking for some good example of FFT functions in pascal but it
> seems like what Google serves up is rather old and refers to
> Turbo-pascal and the like...
> So maybe someone here knows about some open-source example of FFT
> using FreePascal (or Delphi)?
> I want to analyze the frequency content of transient responses
> measured using a 24 bit A/D converter. It will produce 8192 samples
> for each measurement.
> Any suggestions welcome!
For maximum speed you would use vector-code. This could be assembly from Pascal. But it is easier
to use Intel IPP <https://software.intel.com/en-us/intel-ipp> or Apple Accelerate Framework
<https://developer.apple.com/reference/accelerate> when you are on OS X or iOS. Apple also has a
lib with C-source code <http://raquo.net/MatrixFFT-12.tar> that is much faster than the FFT in the
Accelerate Framework when the FFT size is large, see
Pascal interfaces for IPP are here <http://adriaan.biz/intel/ipp.pas.zip>.
There are also the FFTs in the GNU Scientific library
<https://www.gnu.org/software/gsl/manual/html_node/Fast-Fourier-Transforms.html> but it has license
I have a Pascal FastFourierTransform.pas unit (without vector code), but it is not written by me.
You would have to contact the author for permission to use it. I can give the email address by
Adriaan van Os
More information about the fpc-pascal