Autotune

GitHub

As a simple signal processing project, I build an autotune program from scratch. The key implementation here is a manual implementation of the Fast Fourier Transform. This program allows the user to speak into their computer microphone and apply an autotune onto their voice.

Theoretical Background

Fourier Analysis in Signal Processing

We are given some audio signal and wish to decompose it into the different frequencies making it up. We can do this by representing this signal vector in the orthonormal basis of frequencies , for integers . We get

The Fourier Transform allows us to solve for the coefficients by mapping the function from the time domain to the frequency domain .

The Fourier Transform is defined as:

Here, represents the inner product of our audio samples with the -th frequency mode.

And the Inverse Fourier Transform is defined similarly, reversing the mapping back to the time domain.

The Numerical Approach: Discrete Fourier Transform

We sample discrete points from the continuous signal according to the Nyquist-Shannon Sampling Theorem.

The Discrete Fourier Transform is:

The job of performing a Fourier Transform comes down to computing the coefficient for all frequencies . If there are and (?) samples, each frequency computation requires multiplications, and thus the runtime of this procedure is .

Cooley-Tukey Algorithm for Fast Fourier Transform

The computational cost of the naive DFT approach is very expensive. Fast-Fourier-Transform exploits the fact that the twiddle factors are periodic to perform the same transformation in time. Notice .