[JPG image artwork that is a companion to the text]

Sound Physics



introduction

Suppose you want to build your own synthesizer? Or suppose you want to synthesize music using software? Or suppose you would like to understand better the physics of sound generation?

Computer technology is becoming powerful enough that the idea of creating a music synthesizer with just your PC and PC software is almost practical. The introduction of the PC sound adapter to the consumer in the early 1990's made possible digital sound reproduction that was previously only possible with special-pupose, and expensive, digital signal processing hardware. Another technology was emerging in the 1990's that will ultimately make possible home-built, DIY digital synthesizers: Linux. This awesome technology is the future of PC computing, as well as being capable of special-pupose, high-throughput digital processing. Increasingly, the electronic gadgets around us have little PCs inside running Linux--your DSL modem, for example. This is because Linux is software that you can change yourself. You can convert it from a general purpose operating system into an embedded processor system, like converting your family SUV into a formula one race car. In time, we will see Linux PC software available to the public capable of performing all the well-known music studio effects processing. I will go so far as predict that, in time, kits will be sold with rack-mount PCs running super-modified Linux kernels with your choice of synthesis software packages.

The information contained on this site is mostly about software techniques for generating sound, and about the acoustic modeling and frequency (harmonic) analysis of musical sounds. Software synthesis is cheap, much cheaper than building electronic circuits, but you have to learn how to do it. And you will need some basic software tools, which you can download for free.



basic sound generation

This is the obligatory section on "sound is made of waves". In my experience, this is about all you get on an internet search for synthesizer technology. However, this is the starting point for discussing music synthesis. We should like to get this over with quickly and move on to subjects that are too difficult for most people to understand, such as sound physics.

Sound is made of waves. The basic idea is that different sounds are different because they have different harmonic content. The fundamental approach to engineering frequency analysis is to represent a sound waveform as the sum of sine waves having various freqencies and amplitudes. The idea is this: any waveform can be mathematically broken down into a set of sine waves, and they can be added together again to re-create the original waveform. There are lots of rules on how this is done in practice, which forms the subject in mathematics called fourier analysis.

To begin, you should get some math software like Scilab and mathematically add some sine waves for yourself to see what shapes you get. And then, you should use the Scilab FFT (fast fourier transform) tool to get back the frequencies in your wave shape.



Adding Waves

In Scilab, create a sine wave and plot it with the following commands:

x = 0 : 0.01 : %pi * 2;
y = sin(x);
plot(x, y);

and you will get a graph that looks like this:

[JPG image artwork that is a companion to the text]

Now create a sine wave with twice the frequency with the following command:

y2 = sin(2*x);
plot(x, y2);

and you will get a graph that looks like this:

[JPG image artwork that is a companion to the text]

Now add these two frequencies together:

z = y + y2;
plot(x, z);

and you will get a graph of the sum of waves:

[JPG image artwork that is a companion to the text]

That is a lot easier than when I had to add sine waves for my trigonometry class with graph paper and a ruler!

That is how wave components (sine waves) are added in software to produce a basic sound wave, and it is called additive synthesis.

These Scilab functions cal be used to create a wave file which you can then actually play back through your PC sound adapter.

Additive synthesis is not the only way to create sound (mathematically), it is just the simplest concept. Additive synthesis actually takes a lot of computation, even for a computer, and so shortcuts have always been sought. Among these shortcuts, the simplest way is to just draw a waveform that is not a sine wave! Since any wave can be broken down to a sum of sine waves, whatever you do will be a sum of sine waves. The trick is to know what wave shape sounds interesting. There are several wave shapes that are known to sound interesting, namely the square wave, the triangle wave and the sawtooth wave. In the days before digital sound generation, these wave shapes were easily created with analog electronic circuits.

The basic tools for synthesizing sound have been, ever since the analog electronics days, the following four basic components:

  • tone generators
  • envelope amplifiers
  • filters
  • effects

The tone generator creates the wave shape, the envelope amplifier gives the whole sound its shape, filters do more adjustment on the sound's tone, and effects are such things as echo, stereo, chorus, etc.

If you read through the documentation for Csound you will find terminology that still harkens back to the days when synthesis was limited exclusively to the tools listed above.



introducing fm synthesis

After digital synthesis became possible in the late 1970's, a new way of taking a shortcut to generate waveforms was found. John Chowning introduced the idea of creating a waveform with frequency modulation, or FM synthesis. The basic idea can be shown with a simple mathamatical statement. Instead of generating a pure sine wave with

y = sin(x)

you can modulate, that is, change the argument of the sine function to create an more interesting shape:

ym = sin(x + sin(2*x))

By simply adding the extra sine function inside the first sine wave the result is a wave shape that contains many pure sine waves.

The Yamaha DX7 keyboard synthesizer used FM synthesis for generating sound. Although some realistic sounds were found and incorporated into the DX7's patch bay, FM synthesis is not as much of a shortcut to producing waveforms as simply recording it and playing it back. And so the most recent Yamaha synthesizers are based on resampling, which is a fancy way of saying that they record the sounds and play them back.



other synthesis techniques

Modern synthesisers use sound file resampling to generate sounds. Analog patch bays and even FM keyboards are now used only by enthusiasts.

In recent years, the technique of physical modeling has been taken up commercially by synthesizer manufacturers, but this new technique has not taken off as some people would have hoped. Whether or not the technique itself has promise is pehaps less important than the fact that it is still easier, with the recent explosion in digital computing power, to just record a sound and then play it back.




Music Synthesis and Physics Home
[JPG image artwork that is a companion to the text]
© Alfred Steffens Jr., 2007