Fourier Transform Visualizer - Swamp Hacks

Project By: Vedant Karalkar, Ronan Morris, Bill Zhao, and Pranav Guduru

Record Audio

Fourier Transform Visualizer

Project Outline

  1. Record and save audio in the browser
  2. Convert that audio from opus to AudioBuffer to PCM (essentially an array of samples from the audio wave)
  3. We then truncate this PCM object, keeping only the last 512 points (at a sample rate of 44100 Hz, this is about a hundredth of a second)
  4. We plot these points from a 3D perspective, then perform a Discrete Fourier Transform on them using a public library
  5. From the results of the transform, we determine the amplitudes and phase shifts of 512 sin waves
  6. The 4 of these with the largest amplitudes we animate and plot on our 3D axes

Fourier Algorithm Explanation

A mathematical tool used to separate a wave into its individual frequency components is the Fourier algorithm, sometimes referred to as the Fourier Transform. By disassembling complicated signals and images into simpler sinusoidal components, which can then be adjusted or examined independently, it enables the investigation of signals and images.

The Fast Fourier Transform (FFT) is an algorithm which is used quite often to find the transform as it reduces the number of calculations needed to obtain it. This reduces the run time and is also easier for the programmer to program the code required for obtaining the transform.

Fourier Algorithm Applications

The Fourier Transform has many valuable applications especially in the fields of science and technology. According to Rajvardhan Patil, it is useful in Application to IBVP, Circuit Analysis, Signal Analysis, Cell phones, Image Processing, and Signal Processing & LTI system (Patil). The Fourier Transform is a technique used in signal processing that can be applied to examine audio signals like speech or music and extract data about the frequencies contained in the signal. This can be useful in other ways too with image compression where you can remove redundant data without losing the crucial data. This can further be applied with object recognition in images which is something we have seen being implemented by Apple recently into their phones.