MultiThreaded FFT

AN-2: Threading an FFT for Parallel Processing in a Plug-In

by Will Pirkle

This App Note describes using a FFT for signal analysis in a Plug-In. The FFT is run on a separate thread, therefore this App Note includes concepts on multithreading and thread synchronization using Windows Events. It also covers double-buffering since we need to buffer new audio samples in parallel with processing current buffers of data. The accompanying project is called MTFFT (Multithreaded FFT) and the FFT of the input signal is used to drive the assignable LED Meters in RackAFX to produce a 10-band FFT spectrum analyzer. The FFT length can be changed programmatically. There is no signal processing in this plug-in, only signal analysis. The Plug-In uses the built-in RackAFX object CFFT (you enable this when you create or edit your Project Properties). However the reader is encouraged to try other FFT packages such as FFTW. The FFT in this project is bare-boned. There is no windowing or overlap/add for the FFT in order to keep the project as simple as possible however you are encouraged to implement windowing and overlap/add as your homework/exercise.

AN-2 PDF File

AN-2 Project Files