As many parents have discovered, those big monthly charges from the internet service provider have a lot to do with their teenage children downloading music over the web. The court-ordered demise of music-swapping pioneer Napster caused barely a hiccup in the daily trade of music, with services such as Audiogalaxy, Kazaa, Morpheus and WinMX being used to fill the void. Mp3 co.
There is a particular irony to all this activity. The entire online music industry is built upon a school subject that most of those young music fans would claim to dislike most: mathematics. What they are really downloading each night are streams of numbers, computed using a calculus-based technique first developed more than 200 years ago.
In the early 19th century, the French mathematician Joseph Fourier worked out some mathematical equations to describe the way heat disperses. Those same equations can be used to describe any wave form as a sequence of numbers, including sound waves. In the 60s, an American engineer called R A Moog used Fourier's maths to design electronic music synthesizers.
In the 80s, Yamaha, the Japanese electronics company, used the same maths to revolutionise the music industry with the introduction of electronic keyboard instruments. And today, Fourier's equations live on as part of the mathematical framework on which the music encoding scheme MP3 is based. A particularly fascinating aspect to MP3 is that it combines maths with knowledge of the way the human auditory system works. First, let's look at the maths.
Fourier showed how any wave form (including a sound wave) can be broken down into constituent sine waves, those perfectly regular waves that engineers generate on oscilloscopes. The exact pattern of sine waves that combine to form a given sound wave can be represented by a sequence of numbers.
Those numbers may be computed from the original wave by a mathematical process known today as a Fourier Transform. In this way, sound may be turned into numbers. Actually, there is a bit more to it than that. The Fourier Transform works not on a wave but on a mathematical description of that wave. So first you have to convert a wave into a mathematical description.
Mpe free download
Engineers do this by taking note of a trick nature performed many years ago when she developed animal hearing systems. A sound wave consists of a ripple in the air.
What makes it sound is that our ears and, more generally, our hearing system interpret that air wave as sound. The motion of the air causes a skin membrane in the inner ear to vibrate, and those vibrations are converted into tiny electrical currents that flow into the brain. It is those electrical waves that the brain actually experiences as sound.
A microphone works in essentially the same way, converting an incoming sound wave in air into an electrical signal. If we feed that electrical signal into a loudspeaker, then the speaker recreates (a copy of) the original sound wave. But we can also do something else to that electrical wave: we can use a method known as sampling to generate a sequence of numbers. The most common procedure is called Pulse Code Modulation (PCM).
This takes an electrical wave and measures the voltage of the signal at moments of time a small, fixed interval apart. In the case of an audio compact disc, the sampling is done 44,100 times a second. Thus, for each second of sound input, the PCM analog-to-digital converter generates 44,100 numbers, each one the measurement of the voltage at the instant it is sampled.
In the case of a compact disc, each voltage is measured to 16-bit accuracy; that is, the system can distinguish up to 65536 (or 2 to the power of 16) different voltages. A sample rate of 44,100 per second coupled with 16-bit voltage measurement is sufficient to encode any sound as a sequence of numbers that, when converted back into sound, the human ear cannot distinguish from the original.
Unfortunately, it takes a lot of storage capacity to capture music in this fashion: 10 megabytes for every minute of (stereo-recorded) music, to be precise.
Given modern compact disc technology, this is fine for the recording industry, but would create a major problem if everyone were to ship CD music files around the internet. This is where Fourier's maths and a knowledge of the human hearing system comes in. Anyone with a computer is aware that there are algorithms that can compress data files (PK-ZIP and Stuffit are two well-known examples). When applied to a typical text file, these packages can reduce the size of the file by as much as 80%. But with CD quality PCM files, the reduction is only around 10%.
Algorithms specially designed to operate on PCM files have achieved a 60% reduction, but that is nothing like enough to support internet music swapping. MP3 works by forgetting the idea of compressing the entire file so that the original sampled sound wave can be reproduced exactly. Instead, it deliberately discards some of the information. Thus, anything in the original sampled sound wave that the human hearing system cannot detect may be discarded.
There is a lot of stuff that can be thrown away without our noticing. MP3 is short for MPeg3, or more fully MPeg - Level 3. MP3, an industry standard developed in 1992 by the German Frauenhofer Research Institute, achieves a spectacular compression ratio of a sampled audio wave, ranging from a factor of eight to a factor of 12, depending on the source. This means that the 10MB of storage capacity needed to encode one minute of hi-fi music on a compact disc is reduced to a 1 MB MP3 file on a computer hard drive.
MP3 divides the frequency range into 32 bands, each of which the human ear hears separately. The component of the input signal (sampled wave) in each of those ranges is then subjected to a Fourier-like mathematical transformation that separates it into a further 18 constituents, generating a total of 576 individual frequency bands. Within each of those bands, components undetectable to the human ear are removed.
The resulting signal is then compressed further by Huffmann coding, a technique familiar to computer scientists, which represents frequently occurring values by shorter codes than used for less frequently occurring values. (For instance, it would be highly wasteful to use the default 141,120 bits of the sampled wave to encode a 1/10 second silence in a song.) The result of all this maths?
Free music at the stroke of a few keys on the keyboard for any teenager with a computer. (Discounting the internet connection charges their parents pay at the end of the month.) With consumer electronics stores offering new MP3 players every few months, and with millions of PC owners swapping music files illegally (as well as occasionally downloading them legitimately), the modern music industry is built on mathematics as much as anything else. What Joseph Fourier would have made of today's applications of his original mathematical analysis of heat waves is anybody's guess.
· Dr Keith Devlin, a Yorkshire born mathematician, is the executive director of the Center for the Study of Language and Information at Stanford University in California. His most recent book is The Maths Gene: Why Everybody Has It But Most People Don't Use It, published by Weidenfeld and Nicolson.