#timbre

LIVE

This question was asked today on Reddit’s /r/AskScience by /u/silverben10, and I decided to pitch in and give an in-depth answer.

Below is a reproduction of my answer there. I figured my Tumblr followers might enjoy it as well.


In order to understand this better, we gotta talk about the frequency spectrum of a sound.

An important result in mathematics is that any “reasonable” function (exact details of what’s “reasonable” don’t matter for our case, as I’ll explain in a bit) can be decomposed into a sum of a bunch of sines and cosines of different frequencies. This decomposition is called a Fourier transform of the function. Think of the sine and cosine waves as ingredients that you can add up together to make up the other wave. This is a great result because most functions are complicated, but sines and cosines are pretty simple.

Sound is a pressure wave, where pressure changes through time. So we can describe any sound by some pressure amplitude as a function of time, P(t). This is always going to be a “reasonable” function (pressure changes smoothly, doesn’t go to infinity, etc), so we can decompose it into sines and cosines using a Fourier transform.

Adding a sine and a cosine of the same frequency together just makes another wavy function that’s shifted around in time. That shift is called a phase. We can change the phase by changing how much of sine or how much of cosine we add together.

Here’s an animation I did showing how to make a sinusoidal wave of constant amplitude but different phase (in green) by adding together a sine wave (in red) and a cosine wave (in blue), just by changing the amplitude of sine and cosine.

To simplify the math, we usually turn these two into a complex number, which are a compact representation of amplitude (how tall the wave is) and phase (how much it’s shifted in time).

Here’s a diagram of that. The blue and red lines are the amplitudes of the sine and cosine wave in that previous animation. The yellow angle is the phase.)

So the Fourier transform of our pressure wave, P(t), is going to be another function, Q(f) that gives us a complex number for a given frequency f of a wave.

This is like if someone gave you a cake, and you ran it through a machine that told you all the ingredients that went into making it, how much of each ingredient was used (the amplitude) and when it was added into the mix (the phase).

So now, instead of talking about amplitude of pressure at a time t, we talk about the amplitude (and phase) for a frequency f.

Both are complete descriptions of the same thing, it’s just a change of perspective.


Now, when you hit a thing, you create a pressure wave that propagates through the object and bounces around inside of the materials that make it up. That energy goes into making it vibrate at several different frequencies.

The vibration of the surface of the object is what pushes air around and makes a pressure wave in air, which is what we hear as sound. We can use Fourier’s trick to find out which frequencies are in this sound generated by the object when we made it vibrate.

To better visualize this, we can create a “spectrogram”, which is just a graph that tells us how much of each frequency there is at each moment in time in the sound. This works by taking a “small slice” of the sound, running the Fourier transform on it, getting the amplitude of the complex number returned for each frequency, and squaring it. (The squaring part is important, because it’s related to the amount of energy on each frequency.)

Here’s a bunch of spectrograms of some sounds I made just for you. The vertical axis is frequency, and the horizontal axis is time.

The first two are the spectrograms for this sound file, which is the sound of a violin, clarinet, bassoon and trombone playing the same note (an F5 if I recall correctly, sorry, I already closed the program).

Linear scale spectrogram of four different instruments playing the same note.

The first graph is a linear scale. You can see how for each instrument, there’s a bunch of nice, equally spaced horizontal stripes. The lowest stripe is usually the brightest and longest, meaning it has the most energy in it and takes longer to decay. This is the fundamental frequency of the sound of the instrument: this is the note it is playing. The other stripes are called harmonics, and they are all nicely spaced because they are always integer multiples of that fundamental frequency. (Sometimes, there are also other stripes that are not exactly integer multiples. Those are called overtones, and create an even richer sound.)

Notice how all these lines line up for all four instruments, since they are playing the same note: the fundamental frequency and its harmonics all match.

This is what makes them all “tonal”. But the brightness changes between each, and also changes as time moves on (to the right) in different ways (different frequencies dissipate faster or slower for different instruments). It’s this unique mix of frequencies and how fast they decay that makes all of them sound different.

Tonal instruments all have this characteristic “stripey” pattern.

Logarithmic scale spectrogram of four different instruments playing the same note.

The second graph is the same graph as before, but now on a logarithmic scale. Here, you can see more easily the frequencies that make up most of the sound. (check the scale on the right).


On the other hand, I also recorded me punching my table, and did the same thing to it. That’s the last two graphs.

Linear scale spectrogram for the sound of a table being hit.

You can see that there’s no nice structure to the spectrum in that case. No stripes show up in the spectrogram. It’s just a mess, with a bunch of frequencies everywhere. (Those vertical lines are probably the different stuff on the table bouncing back on it.)

So there’s no easy way to pinpoint a “pitch”, because there’s no one frequency that stands out in the sound, along with those stripey harmonics that make it sound richer and more interesting. (A single line in the spectrogram would sound like a pure, constant tone, like a tuning fork. Boring!)

And that’s why some things don’t really have a noticeable “pitch”.


However, it’s important to note that everything DOES like to vibrate at particular frequencies. The spectrum of the table being hit shows us exactly which frequencies the table “likes” to vibrate at.

But if these frequencies are not sharply defined, then they don’t stand out in the spectrum of the sound the object makes, and neither will any of the harmonics stand out in relation to a fundamental frequency. They all just blend into a one big blob in the spectrum.

So the sound is just going to sound pitch-less, because there’s no immediately apparent “main frequency” for the sound.


Bonus stuff: But why does our *ear* and *brain* care about any of this frequency stuff?

Well, it turns out, our ears work because they are pretty much doing a Fourier transform of the sound we hear!

The key component of our inner ear is the cochlea, which is a spiral shaped thing full of liquid with a bunch of tiny little hairs inside. The tiny little hairs like to vibrate at specific frequencies too, and when sound comes into the cochlea they vibrate and produce an electric signal.

So the cochlea and its little hairs are acting pretty much like the Fourier transform. This is why frequency components are so important to the way we hear.

Sketches of Venli with Timbre. I’ve been listening to the Stormlight audiobooks again so OF COURSE i

Sketches of Venli with Timbre. I’ve been listening to the Stormlight audiobooks again so OF COURSE it’s fanart time.


Post link
loading