Tags

, , , , , , , ,

This post is discusses some interesting properties of sound itself, not all of which can be easily measured. This is part of a series of articles on the general subject of audio signal processing from air to information.

What is Sound?

Sound is a propagating pressure wave in a medium. It has a number of properties, some of which are strongly defined (or limited) by the medium, and some by the mechanism that produces the sound.

We don’t require a listener to have sound (the tree falling in a lonely forest does make noise), or necessarily limit ourselves to sounds that can be heard, or sounds that one could survive hearing. But we do use some properties of (human) hearing as reference points for convenience.

Our most common experience of sound is as pressure waves in air. While there are lots of qualitative properties of sound, quantitatively we have speed, amplitude, and frequency or spectral content.

The speed of sound is of interest in some applications. We don’t generally directly perceive the speed of sound, but effects caused by variations in path length to each ear and to distinct sound sources are important for localizing particular sound sources around us.

The actual sound waves are variations in pressure, which naturally have an amplitude. Generally speaking, amplitude corresponds to loudness: the larger the pressure variation, the louder the sound. But the relationship is complex enough that it is quite difficult to measure “loudness”. But it is easy to measure amplitude, with a sensor that responds to small variations in pressure.

We experience frequency as pitch. As with most senses, relating pitch to frequency is more complicated than it seems. For pure tones, pitch is frequency. But few real sounds are pure tones, most have a much richer spectral content. Speech is particularly complex, even relatively simple vocal sounds have very rich spectral content. Some literature defines the terms “infrasound” and “ultrasound” for sounds too low in pitch or too high in pitch to be heard, and implicitly uses “sound” to mean only the band that can be heard.

Speed of sound

Sound waves in air propagate at just over 1100 feet per second at room temperature, but the speed is proportional to the square root of the absolute temperature. Humidity is also a factor, but on the order of only a 1% variation, with wet air raising the speed of sound. For dry air at sea level we have1:

 °C   °F  m/s  ft/s
-40  -40  306  1004
-20   -4  319  1046
  0   32  331  1085
 20   68  343  1126
 40  104  355  1165

Human hearing does not directly detect the speed of sound, but we do perceive overlapping copies of the same sound in a way that gives a sense of depth or presence to a room. Differences in wave timing (either arrival time or phase) at each ear are used to spatially localize sound sources.

The wavelength of a sound wave is of interest in some applications. It has a simple inverse relationship to the frequency, scaled by the speed of sound.

\lambda = \frac{c}{f} = \frac{1126\, \text{ft} \cdot  \text{sec}^{-1} }{ f}

The tuning of resonant structures such as trumpets and organ pipes (pretty much all brass and woodwind instruments, actually) is dependent on the wavelength. For example, an unstopped organ pipe is one half wavelength long2 (ideally, but in practice a little shorter by approximately twice the diameter of the pipe). At common shirtsleeve conditions the C two octaves below middle C (65.4 Hz) is produced by an 8 foot pipe a little more than 3.5 inches wide:

\lambda_\mathrm{C2} = \frac{c}{f} = \frac{1126\, \text{ft} \cdot  \text{sec}^{-1} }{ f} = \frac{1126\, \text{ft} \cdot  \text{sec}^{-1} }{ 65.4\, \text{Hz}} = 17.2\, \text{ft}
L_\mathrm{open\,C2} = \frac{\lambda_\mathrm{C2}}{2} - 2 W_\mathrm{C2}
L_\mathrm{open\,C2} + 2 W_\mathrm{C2} = \frac{\lambda_\mathrm{C2}}{2} = \frac{17.2\, \text{ft}}{2} = 8.6\, \text{ft} = 8\,\text{ft}\;7.3\,\text{inches}

Choosing the length to be 8 feet, the width is then half of the remaining 7.3 inches. Approximately, assuming the temperature and humidity don’t change by too much. Such a pipe is tuned by a sliding section, by shading the end, or by bending the end out into a bell shape, all of which modify the effective length and the resonant frequency.

Pressure Waves

In a gas, sound is a simple travelling pressure wave centered on the ambient gas pressure. Undistorted sound is only possible for amplitudes up to the ambient pressure. The wave pressure excursion from the ambient pressure is called the sound pressure level, or SPL.

SPL can be directly measured with a sensor that measures pressure excursions on a short time scale, widely known as a microphone. Some past posts here have demonstrated using a microphone and a small CPU to measure SPL.

The quietest sound that a healthy human can hear3 is generally accepted to be a pressure wave with a root mean squared (RMS) amplitude of 20 µPa, this level is taken as the reference level to which sound pressure in air is compared. (In other media, especially water, a reference level of 1 µPa is commonly used.)

Given the RMS pressure p_\mathrm{rms} in Pascals (Pa) and the reference level p_0 = 20\, \mathrm{\mu Pa}, the sound level L_p is given as:

L_p = 10 \log_{10}\left(\frac{{p_\mathrm{rms}}^2}{{p_0}^2}\right) = 20 \log_{10}\left(\frac{p_\mathrm{rms}}{p_0}\right)~\mathrm{dB (SPL)}

By well established convention, sound level is expressed as the unit-less ratio of the measured pressure to the reference pressure, and usually expressed on a logarithmic scale. Using any logarithmic scale changes multiplication to addition. The particular logarithmic scale chosen for SPL is the decibel (dB), again by well established convention.

A logarithmic scale is commonly used because it matches well with our perception of loudness which also roughly follows a logarithmic curve. While the details are complicated, it isn’t wrong to say that a sound that is twice as loud as another has an SPL that is greater by about 6 dB(SPL).

Pitch, Frequency, and Spectrum

Most sounds we hear around us are rich and complicated wave forms if looked at in detail. When describing sounds, we often use terms like noise, pitch, timbre, loudness, and other qualitative terms.

Pitch our perception of frequency4, which we generally perceive on a logarithmic scale. And for pure tones (a pressure wave that is a sinusoid[sine] at a single frequency) pitch is (usually) the same as the base 2 logarithm of frequency. Things get interesting when the spectral content of a sound is not a single pure tone.

The spectrum of a sound is a way to describe it as a sum of sinusoidal waves. This is a complicated field in its own right, but for musical notes it can be simplified to discussion of a fundamental tone and harmonics. The fundamental is generally the lowest frequency sinusoid. Harmonics are sinusoids at frequencies that are related to the fundamental, usually by small integer multiples. The sounds of many musical instruments can be quite successfully described by the relative levels of harmonics to the fundamental along with some amount of noise.

The interval in pitch described by a doubling of frequency is particularly important, is given the name “octave“, and is broken into a scale twelve5 (roughly) equally spaced intervals called semitones of 100 cents each given the names C through B6. This makes musical pitch also be a logarithmic scale with base 2. More specifically, there are 1200 cents per octave, so given two frequencies a and b, the number of cents between them is7:

n = 1200 \cdot log_2 \left( \frac{a}{b} \right) \,\mathrm{cents}

In music, pitches have conventional names, referenced to “middle C” or “concert A” (the A above middle C). In the literature, “middle C” is the first note of the octave containing “concert A”. There is a conventional notation which includes the octave number, in that notation middle C and concert A are called C4 and A4; the lowest C on a conventional piano keyboard is C1, and the lowest key is A0; and the 8 foot organ pipe discussed earlier plays C2.

Pure tones are not very aesthetically pleasing. Most instruments include multiple harmonics along with the fundamental tone, using the shapes of resonators and properties of materials to control the mix. Of course, electronic synthesizers can also produce sounds that are physically implausible to get from a playable instrument.

So?

I’ve only scratched the surface here. Sound is a richly complex field of study. As we move our microphone toys more completely into the ARM-based LPC812, we will have the compute power available to play with some measures other than SPL. We have already demonstrated recording from our microphone.

Watch this space for more toys to come.

Context

Previous installments include:

All of the code supporting this project is in a public fossil repository. This post doesn’t include any code, but at the time of this writing the most recent check-in was checked in as [1d38441bbc].


(Written with StackEdit.)


  1. http://en.wikipedia.org/wiki/Speed_of_sound 
  2. http://www.rwgiangiulio.com/math/pipelength.htm 
  3. http://en.wikipedia.org/wiki/Equal-loudness_contour 
  4. I’m simplifying this a lot here. Pitch is a complicated subject with lots of philosophical arguments, cultural assumptions, and has been a source of distraction for many great mathematicians and physicists. 
  5. Twelve in Western European music systems. The familiar scale (do re mi fa so la ti do) spanning an octave has some intervals between notes that are twice as large as others. These total twelve approximately equal intervals. Other cultural traditions use different numbers of intervals in an octave, and even the octave itself isn’t actually that universal even in “Western” music. As with all the arts, its complicated. 
  6. The notes of an octave are conventionally named C, C♯/D♭, D, D♯/E♭, E, F, F♯/G♭, G, G♯/A♭, A, A♯/B♭, B. Yes, some notes have more than one name. Yes there is a reason for that. No, they aren’t actually always the same frequency depending on tuning, instrument, and historical era. The use of seven letters for some of the notes hints at the etymology of the word “octave”. Starting the octave at C and not A is a quirk as well. There is a lot of rich history to this system, way too much to fit into this footnote. For a taste, start at scale and the related articles, and if that doesn’t scare you, go on to an entry level course in music theory. 
  7. http://en.wikipedia.org/wiki/Cent_(music)#Use 
Advertisements