AndWaves, LLC‎ > ‎Outreach‎ > ‎

About Fourier transforms

This page is added to supplement the description of the Spectrum Analyzer posted in the Android Marketplace.  A tutorial is posted here for the convenience of users who are new to frequency analysis of waves.  

The Fourier spectrum is simply a graph of the strength of each of the frequencies that compose a sound, exactly as the spectrum of colors produced by a prism shows relative strength of the different colors that compose the yellowish-white light from the sun.   Or to use another analogy, each of the musical notes from an instrument has a different primary frequency.   For example, the musical note, A, is at 440 Hertz, middle C is at 261.626 Hertz.  (By the way, the term Hertz means cycles-per-second.)  

If you are interested, pure tones can be generated with the AndWaves AudioGenerator software.  I've also posted a YouTube video that consists just of pure tones that you can listen to or play and view in the AndWaves Android applications, SpectrumAnalyzer or Spectrogram..  The pure notes will look like perfect vertical lines in the SpectrumAnalyzer display.    


A mathematical artiface called a Fast Fourier Transform calculates the strength of each of the frequencies in the sound picked up by the microphone.  In the SpectrumAnalyzer application, the Fast Fourier Transform does this by processing about 0.1 seconds of sound every half second.  During the 0.1 seconds of the sound sample, 4096 samples are collected at the CD recording rate of 44,100 samples per second.   Due to a mathematical constraint, this means that the maximum frequency that can be extracted by the Fast Fourier Transform from these data is 22,050 Hertz, that is, half of the sample rate.  That is why the maximum frequency on SpectrumAnalyzer graph is 22,050 Hertz.   It also means that the frequency resolution is 5.4 Hertz (=22,050/4096).  But because there are not 4096 pixels on the Android screen, this level of resolution will not be seen on the display.  For example, on my Evo 4G there are 480 pixels, so the resolution is more like 46Hz (= 5.4 * 4096/480) per pixel on the x-axis of the display.  


Another mathematical characteristic of the Fourier Transform is that it is symmetrical around the zero frequency.  Yes it has positive and negative frequencies.  This is known as the 2-sided transform.  The 2-sided transform is not that useful, except for pedagoical purposes, because one side is a mirror image of the other.  A 2-sided display is included as a menu option in SpectrumAnalyzer for just this reason. 


The 1-sided Fast Fourer Transform  is more useful because the graph is spread over the entire Android display.  The vertical ferrules are at intervals of 2000 Hertz.  This means that the musical note A will appear on the far left of the display between the first (0 Hertz) and second (2000 Hertz) ferrules.  On the other hand, a dog whistle may be in the range of 16,000 to 20,000 Hertz and will appear on the far right of the SpectrumAnalyzer display.