The Fast Fourier Transform (FFT) is a mathematical technique used in many devices and processes to perform a dizzying assortment of digital tricks. Cut, copy, and paste capability is considered a prerequisite for remix, but FFT manipulations (such as pitch shifting, time stretching, and beat matching) are also very important factors in the prevalence of remix, because FFT makes many sophisticated transformations trivial.
Processing has a simple audio FFT library in processing.sound, which will be used in these examples. Install Processing if you don’t have it already. Then download version 1.21 of processing.sound, unzip it, and put the folder into your Processing libraries directory. Restart Processing if you had it open before you installed the library.
Simple code examples showing how to use FFT in processing are available in my fft_examples repo. The three examples are:
- fft_spectrogram - this is the basic FFT example provided with the processing.sound library, which shows you the relative frequency content of the incoming sound
- fft_spectrogram2 - an augmented version of the basic spectrogram, which shows frequency labels, and scales the visualization to match the number of bands used for the FFT
- fft_resynth - a simple resynthesizer, which does an FFT analysis on audio and attempts to synthesize it using nothing but sine wave oscillators