Reliable Software Logo
Home >Science  >  The Fourier Transform

The Fourier Transform

by Bartosz Milewski


How do we split sound into frequencies? Our ears do it by mechanical means, mathematicians do it using Fourier transforms, and computers do it using FFT.

  1. The Physics of Sound
    1. Harmonic Oscillator
  2. Sampling Sounds
  3. Fourier Analysis
  4. Complex Numbers
  5. Digital Fourier Transform
  6. FFT

The Physics of Sound

As you know, sound is vibration that propagates through air (or any other medium; don't be fooled by cheap science fiction movies--sound cannot cross the vacuum of empty space). What causes the vibration of the air is usually the vibration of other objects--vocal chords, musical instruments, speakers, and so on. Being able to detect and process these vibrations has tremendous evolutionary advantage--that's why higher species of animals have rather sophisticated ears.

Most noises in nature, such as those made by wind blowing through branches or by ocean surf breaking at the shore have no distinct frequency signature. They also carry very little useful information for us. What carries more information are sudden changes in volume (a broken branch) or sounds with definite frequency signature (animal call or insect buzz). Detecting changes in volume is rather easy, but recognizing frequency signatures is not.

To understand the importance of frequencies in the sound, we have to look both at how sounds are generated and how they are perceived. Many objects generate sound waves when they oscillate. When you pluck a string, it starts oscillating--repeating a pattern of movement. Similarly, when you blow into a tube (a flute, a trumpet, a didgeridoo), the air inside it starts oscillating with characteristic frequencies. When you speak or sing, your vocal chords oscillate like a plucked string and the volume of air in your throat, mouth and nose oscillates like a hollow tube.

What is important is this repeating pattern of movements that distinguishes sounds from noises. A sound has a pitch, which is determined by the frequency with which the pattern repeats itself. But a movement of a plucked string usually consists of a superposition of several more regular movements--modes of vibration. Such a regular movement is described by a sine wave which has a particular frequency. (If you are curious what makes the sine wave so special, read the digression on harmonic oscillators.)

Sine wave

Fig 1. Sine wave. Imagine, for instance, that this graph describes the position of a point on a string, varying with time. The vertical axis corresponds to the position of the point, the horizontal axis corresponds to time.


Our ears analyze sounds--vibrations of different frequencies are extracted from the sound and sent to different nerve endings. So the audio signals that enter our brain are already sorted by frequencies. High pitch sounds are separated from low pitch sounds, piccolos are separated from dickered, and C# is separated from C (excuse me the programming pun). Nature came up with this solution because different frequencies carry different information. As a side effect, we are now equipped not only to detect the approach of a predator, but also to understand speech and appreciate music.

The way our ears separate various frequencies is also interesting. It is based on the principle of resonance. An object that, when struck, can vibrate with a certain frequency, will also start vibrating in response to a sound wave of this frequency. Try this simple experiment: strike a wineglass with a spoon or a fork (try not to break it). It will emit a sound. Now try to imitate this sound using your voice. If you hit the right note, the glass will start vibrating. Some opera singers were known to be able to break glasses with their voices (Guenter Grass exploited this idea in his novel "The Tin Drum"). What happens is that sound vibrations of air molecules push and pull the surface of the glass. When these tiny pushes and pulls are in sync with the natural frequency of the glass, they will excite the glass to oscillate, the same way you can excite a swing by pushing it lightly at the right intervals.

Exciting the oscillations of various objects with your voice can be fun. Try singing into a bottle or a tube. You can sometimes find resonant frequencies of small rooms by singing low notes (bathrooms are best, because they don't contain a lot of sound-absorbing materials).

Back to our ears: the resonance happens in the part of the inner ear called the cochlea. It has the shape of a snail's shell and various parts of it resonate with different frequencies. When a particular part of the cochlea starts resonating, the nerve receptors located there pick up the signal and send it to the brain. We perceive it as a particular pitch. Most sounds will excite resonance in multiple areas of the cochlea at once. We perceive such sounds as more complex (containing higher "harmonics") or as musical chords.


Next PointerNext: Sampling sounds.