How do speakers produce multiple sounds at the same time.



I have never really fully understood how a speaker vibrating air molecules which then in turn vibrate the membrane in your ear works. How can a speaker make multiple sounds at the exact same time if its based on movement of a physical object?

In: Physics

It’s a bit hard to visualise but they use a principle called linear superposition which basically means that you can add any number of sine waves (single, pure notes) on top of each other to create any sound profile you want.

Think of it like moving a steering wheel: you can do small changes to align yourself to the road, while also doing a big movement to get round a corner (sorry it’s not a great analogy).

The key thing is that the speaker is only making one, very complex noise. It isn’t making separate noises for drums, guitar and voice. It just adds them all together and plays the result. Your brain can separate them out again because we know the difference.

The way sound works is by compressing the air in waves, leaving waves of compressed and decompressed air. These compressions can interfere with each other and carry multiple vibrations at once through the air, much like your tv cable sends red, green, blue, and brightness signals all at once, but since the electrons are vibrating differently, the tv can pick them out.

With sound, these interferences can be made by vibrating a speaker in the same pattern. Rather than being purely “on” or “off,” a speaker’s driver can vibrate in many different ways and stop anywhere in it’s translation depending on how electricity hits the driver. This can make funky shaped waves that carry all of the different sounds inside of them, more or less. Otherwise, you get closer to a pure sine wave which has equal peaks and troughs and looks rather pleasant. The same kind of sound you get from a simple PC speaker made for post beeps and codes.

Basically you’re adding together sounds. All the sounds added together make a pattern, and the speaker vibrates that pattern.

It’s a bit like… Imagine painting. Splash blue paint on a page, the light reflects and you see the page and blue marks. Splash yellow on the page, the light reflects and you see yellow. Splash those two exact same patters on the same page, you’ll see blue, yellow, and green where they mix together.

It’s a bit like that, except instead of the light reflecting off the page and paint and into your eye, the speaker vibrates the mix of sounds together into your ears.

Sounds are waves. “Pure sounds” are perfectly shaped sine waves, but composite sounds happen because of a property of waves that [they can add up](, basically the effect of simple sine waves all compounded onto a single “complex” wave.

If you want to visualize it, the [surface of the ocean](×800.jpg) has bass (the big swells), and also high pitched “sounds” in the little waves created by the wind. A fishing floater on that surface would “feel” both the bass (big waves) and the high pitched sounds (small waves) at the same time.

So you recognize drums vs. violins vs. trumpets vs. the voice of the opera singer because your brain is very good at decomposing the “complex” wave it hears, to the individual waves. Part of the process of “decomposition by frequency” is your [inner ear](, where the sound waves from outside go around this spiral of hairs and sensors, and the sound frequencies are “separated” by the hairs at one end vibrating with only the deep sounds, whereas the much more fine hairs at the other end vibrate only with the high pitched sounds. So your inner ear splits the sound into multiple frequencies.

And then the brain takes it from there and recognizes not just frequencies, but also that they belong to certain instruments, or voices belong to certain people, and not only that, but your brain figures out the *meaning* behind words. Brain does the same with light, by the way: light frequences are color, you see color, but you don’t just see splotches of color, you recognize objects, faces, *emotions on faces*.

There is only one sound. As you said yourself, sound is caused by vibrating air molecules, or we can say air pressure. At any given location and moment there is only 1 air pressure. So, all of the different sources of vibrations that we interpret as sounds all vibrate the same air. We can consider the different sources together or apart because waves are added just like other numbers. So, is it 3 or 1 + 2? Yes. Is it a song, or is it a singer and a guitar? Yes. Both. Think of waves on the surface of a pond. We can see separate waves caused by a bird there or a water drop here, but there is only 1 pond and the water surface is only 1 shape. (Each little spot on the surface can be higher or lower. All of them contribute to the overall shape.) The entire pond is a single wave that is made up of individual waves from different sources.

Take a music. Draw the sound wave of that music. A squiggly line up and down denoting signal amplitude and frequency.

The speaker is reproducing this line with its cone movements.

A pure analog audio solution captures that complex wave intact. The grooves in a record are analog to that sound wave. That gets played back in an analog speaker

Your ear does only one thing; vibrate. Your brain interprets all the overlapping sounds it hears in those vibrations. A microphone does the same thing and turns vibrations into electrons. A speaker does the inverse. The first telephones only had a single combination mouth / ear piece. It all works because the multiple waves from the environment combine together. This happens whether the waves are air, electrons, light, etc.

Any combination of sounds can be represented as a single waveform. The more sounds you add together, the more complex and “squiggly” the waveform becomes, but it is still a single waveform. The speakers are simply producing those complex waveforms.

If you’re interested, how do people know how to “add sounds”, there’s a special idea in maths for handling that (and much more, like multiplying polynomials!). It’s called “Fourier Transformation” and it’s really interesting!


I higly recommend watching [this]( video for understanding it.


For understanding how it works in the computer, as an algorithm, I found [this lovely]( video.