Most modern digital audio compression CODECs are based around the same basic principle. An audio signal, plotted on a graph would look something like this: (vertical axis-magnitude, horizontal axis-time, dots represent the signal)

```|
|.         . .         . .
| .       .   .       .   .
|  .     .     .     .     .
|--.-----.-----.-----.-----.--
|  .     .     .     .     .
|   .   .       .   .       .
|    . .         . .         .
|
```

Regular, uncompressed audio files work by converting the analog signal into digital, a process known as sampling is used. The ADC (analog-to-digital converter] measures the magnitude of the signal at regular intervals, and records these values into a file, like this:

```|
|.         . .         . .
| .       .   .       .   .
|  .     .     .     .     .
|--.-----.-----.-----.-----.--
|  .     .     .     .     .
|   .   .       .   .       .
|    . .         . .         .
|^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
S S S S S S S S S S S S S S S
3 |-3 | 0 | 3 |-3 | 0 | 3 |-3
0  -3   3   0  -3   3   0
```

While this process produces fairly good quality audio reproduction, it tends to create MASSIVE files. To create a digital audio file at CD quality requires that you sample 44,000 times a second...a raw digital audio file at that quality is roughly 10 times larger than a regular everyday MP3 (that's about 10 Mb for every minute of audio). Audio compression uses a method that's actually over 150 years old, developed by Jean-Baptiste Joseph Fourier, a French mathematician.

In 1822. Fourier discovered that you could describe any periodic function (such as our audio signal) with an infinite series (known as a fourier series) consisting of a fundamental sine or cosine wave and its harmonics. The series is basically the same for every wave, except for a constant at the beginning of each term, and a value describing the frequency of the wave. In layman's terms: we can plug a few numbers into our equation, and it'll reproduce the wave almost exactly the same as the original.

```|
|.         . .         . .
| .       .   .       .   .
|  .     .     .     .     .
|--.-----.-----.-----.-----.--
|  .     .     .     .     .
|   .   .       .   .       .
|    . .         . .         .
|<------f(t)--------->|
```

We break our audio signal into blocks (short bites of time), and the computer examines each block, and finds a group of constants to satisfy the fourier series for that block, then moves on to the next block. The result? all we have to do is record our constants and the length of our blocks into a file, and tada...a compressed audio file, which is miraculously much much smaller than the raw digital audio file we started with.