CHAPTER ONE

Mathematics and the Measurement of Sound

Contents

Mathematics

Sinusoids

Logarithms and Exponents

Vectors

Polar Coordinates

Complex Numbers

Calculus

Statistics

Units of Measure

Sound is inherently a transient phenomenon. Natural sounds fade quickly, and we can’t just bottle up the air as it vibrates with sound waves and expect to hear the sounds again when we open the bottle. Although this behavior keeps the world from becoming a total cacophony, it also complicates the process of recording sounds. We need a method of converting such air vibrations into a form of energy that we can preserve over time. Metrology, the science of measurement, is a most important consideration in the recording of sound. To record and manipulate audio signals, we must first measure characteristics of the sound – generally pressure amplitude as a function of time – and in some manner preserve those measurements. Analog magnetic tape stores a continuous magnetic pattern representation of the measured signal. Digital audio systems store the signal as a list of discrete measurements at regular times that can then be treated like any other computer data. Because these measurements are a function of time, we must have a way of measuring time as well. Once we have a reliable record of time and the signal amplitude is stored, we can manipulate the signal electronically as analog audio or numerically as digital audio and then make changes to suit our artistic desires; we can process and mix sounds into sonic landscapes that never before existed. Appreciating that the quality of a recording depends on how well we are able to make a measurement is an important first step in the study of sound recording.

A measurement is an attempt to determine the value of a quantity using some form of calibrated tool or procedure. The number we obtain from our measurement should be exactly equal to the true value of the quantity under measure, a quality we refer to as accuracy. The tools available will ultimately determine the accuracy of measurements because there is always a limit to their resolution – that is, their ability to distinguish between two close values. When dealing with calculations, we must also be careful that we do not generate a false increase in accuracy simply through mathematical processing of the data. For example, if we make a measurement accurate to two decimal places, multiplying that value on a computer may result in a 15-decimal-place answer, but it is still accurate only to the two decimal places of our original measurement. A second term related to measurement quality is precision, a measure of how closely that measurement can be replicated in repeated attempts. These two terms are sometimes used synonymously but in fact have slightly different meanings.

MATHEMATICS

To study the recording process in an organized way, we should first familiarize ourselves with the tools involved in the investigation. We are interested in the processes that allow the permanent storage of information contained in the transient air pressure variations we call sound. Because sound recording involves acoustics, mechanics, electronics, magnetism, and ultimately physiology and psychology, we need to employ the tools of science. Because we are concerned initially with measurements of the behavior of air pressures, electronic signals, and magnetism, physics is the branch of science that will help develop our understanding of these systems, and mathematics is the descriptive language used by physicists. It turns out that similar mathematical descriptions apply to electronics, acoustics, and mechanics, so understanding what equations mean will help us explain the fundamental principles of sound recording.

When we want to see how two quantities are related, we can plot a graph comparing pairs of values termed variables. The variable we set by choosing its value is called the independent variable; it determines the placement of the point along the x-axis. The variable we measure is called the dependent variable because its value depends on the value of the independent variable we choose. The dependent variable determines the y-axis placement of the point. For example, we might wonder how the amplitude of a sound system varies with frequency. We measure the dependent variable (amplitude) at a number of frequencies we choose (the independent variable) and plot amplitude against frequency. The shape of the resulting curve shows us the function that describes the relationship between the two properties, in this case the frequency response of the system. Sometimes there is no obvious relationship, and sometimes the relationship between the variables can be described by an equation, called a function, detailing how they are related mathematically.

When our measurements fall along a straight line, we call the relationship linear. Linearity is a requirement of most audio processing systems. For instance, we want the output of an audio amplifier to be a linearly scaled version of the input. The gain of an amplifier is the ratio of its output amplitude to its input, so a gain greater than 1 indicates amplification; a gain less than 1 means attenuation. In Figure 1-1 (left), the slope of the line plotting output voltage (y-axis) against input voltage (x-axis) shows the gain. For a linear system, this value is a constant; in our example, the output is always half (× 0.5) the input level regardless of the input voltage. Other relationships, such as the intensity of a sound as a function of the distance from the source, are not linear (Figure 1-1, right.) Nonlinear relationships can cause distortion, a change in the shape of a signal. Comparing linear and nonlinear systems may help clarify the difference.

As long as the dependent variable depends only on constant multiples of the independent variable, there is a linear relationship between them. Linear audio processes include mixing, in which signals are added together, and amplification, in which a signal is multiplied by a constant, the gain factor. Nonlinear audio relationships include modulations, with one variable multiplied by another (as in AM and FM radio) and exponential or logarithmic relationships found in dynamic range compressors and expanders. Nonlinear systems can create distortion of the original signal by introducing harmonics (multiples) of signal frequency components that were not present in the original signal source.

image

Figure 1-1 Amplifier gain, left, is linear; sound intensity at a distance, right, is a nonlinear function.

SINUSOIDS

Audio signals, whether measured as sound pressure levels or electronic voltages, are often represented as sine waves. Music – in fact, all sounds – may be described using combinations of sine waves with varying amplitudes, frequencies, and phase relationships. The Fourier series equation is commonly used to describe the combination of sinusoidal components that constitute a sound. Although real musical signals are more complex, we often use sinusoidal test signals when measuring audio systems. Sine waves themselves are actually functions (see Figure 1-2).

In Figure 1-2, the signal voltage y equals a maximum value A (A = 1 in Figure 1-2) multiplied by the sine of the variable x, with x values ranging from 0 to 2π to generate one complete cycle. The sine function can be generated by the rotation of a point on a circle with a radius of 1, called the unit circle (Figure 1-3). If the point starts at the 3 o’clock position and rotates counterclockwise along the circle circumference, its x and y values generate a sine wave. (When the point starts at the maximum y = 1 (12 o’clock) instead of y = 0, it generates the cosine function.) At any angle of rotation, the height of the sine wave along the y-axis will be the sine of the angle and the x-position will be the angle of rotation in radians. Though we are familiar with degrees as the measure of angles, where 360° describes a full circle, mathematics uses the radian as the angular measure. There are 2π radians in a full circle and therefore in a complete sine wave cycle. For a point (x,y) on the sine function, the sine is the y value; the cosine is the x value.

image

Figure 1-2 A graph of the function y = A sin(x).

image

Figure 1-3 The unit circle and its relationship to the sine wave. As we rotate counterclockwise along the unit circle, the y-axis value moves up and down as a function of the angle of rotation. The angle gives the corresponding x-axis value in radians.

The phase of a sine wave is a measure of the displacement from the origin (0,0), along the x-axis, of its beginning, where it crosses zero on its way up. When beginning at the origin, the phase is taken to be zero. The amount of rotation along the unit circle required to turn one sine into the other is the relative phase angle between them. As we add sine waves together to make a complex signal, the relative starting points of the various sine components determine the phase relationship between them. If two sine waves of the same frequency are exactly in phase, they add constructively. If they are 180° (π radians) out of phase, they cancel completely – provided they are of the same amplitude. We will see examples of such cancelations when we consider room acoustics and microphone polar patterns. The combination of constituent sine waves determines the timbre, or sonic texture, of the sound. Electronic circuits known as filters alter the timbre by changing the balance of sinusoidal components. Filtering often alters the relative phases of the different frequency sine components of a signal in rather complex ways. We will explain in later chapters how both analog and digital filters affect the relative positions in time of a signal’s component sinusoids as a function of frequency.

To keep track of our work, we are interested in displaying information about our audio signals graphically. By far the most common audio measurement is the signal amplitude. We need to create a meaningful display of the amplitude measurement that is easily interpreted and relatively inexpensive to duplicate, especially if we’re dealing with dozens of separate signals, as is often the case with multitrack recording. Early audio recording equipment solved this problem by using mechanical meters with a moving needle that were carefully calibrated so that all such meters had the same mechanical characteristics. More recently, we have seen the popularity of light-emitting diode (LED) ladder displays. Each of these graphical indicators must conform to a set of rules about how we measure and display signal levels in order to be unambiguous. Because there are alternative methods of measuring the amplitude of signals, we should know which of these is used in our graphical display.

image

Figure 1-4 Sine wave amplitude measures.

The amplitude of a sine wave can be measured in different ways (Figure 1-4). The peak-to-peak measurement will tell us the swing between maximum and minimum values of our signal, but this measurement may not directly correspond to the apparent loudness of that signal when it is not a simple sine wave. The method that most closely approximates how we experience the loudness of a signal is the root-mean-squared (RMS) measure, in which we analyze the signal level over some time window and compute the square root of the mean of the squared values of the measured levels (see Equation 1-5, below). This is a complicated measurement to make electronically, so a simpler method is often used: the average value. This value can be computed with simple analog circuitry, but it is a slightly less accurate measure of the perceived loudness of the signal. One problem with both of these approaches is that they average the signal – a process that will fail to track the maximum value of the signal. Because the maximum value determines how much signal amplitude the audio system must be able to accommodate, we are in danger of overloading the electronics if we simply measure the average level and ignore the peaks. Therefore, very fast displays have evolved to augment the loudness-oriented displays. These peak-oriented displays may be as simple as an LED that flashes as the signal level approaches the limits of the electronic system.

image

Figure 1-5 Sine wave amplitude measurement conversion factors.

For sine waves, there is a simple conversion factor between these different measurements (see Figure 1-5). We notice that for sinusoidal signals, the average level is 63.7% of the peak value and RMS is 70.7%. Unfortunately, for actual complex audio signals, this simple relationship does not hold, so meters using different methods may not agree. In the studio, we often use equipment calibrated to different standards of measurement, so we need to understand how they relate if we want to get the best performance from the system. The sine wave test signals often used for measuring circuit performance are steady state, meaning that they do not change in amplitude or frequency over time. It is this characteristic that allows the simple relationship between peak, average, and RMS measurements. Real audio signals are continuously changing in both amplitude and frequency content. Short, rapid changes in the signal are known as transients, which cause circuits to behave differently from steady-state signals when the circuits contain capacitors or inductors, as these elements are sensitive to the rate of change of the applied voltage or current. The difference between steady-state and non-steady-state signals also becomes important when evaluating circuits that deal with dynamic range–processing devices, for example.

Figure 1-6 shows a typical audio signal. The peaks exceed the average level by many decibels. The ratio of peak amplitude to RMS amplitude is known as the crest factor. A type of meter designed to measure the peak amplitude of a signal is known as a peak program meter (PPM). Many digital meters display both RMS and PPM measurements simultaneously.

image

Figure 1-6 A typical music waveform. The RMS level corresponds to the perceived loudness; peaks may exceed the average level by 10 decibels or more.

LOGARITHMS AND EXPONENTS

The range of values we encounter when measuring amplitude and frequency is enormous. The “ideal” human can hear frequencies from 20 Hz to 20 kHz (few people actually can) and hear sound levels from silence to painfully loud – about six orders of magnitude in sound pressure amplitude. Working with numbers over this large range is inconvenient, so we use logarithms. The logarithm function is graphed in Figure 1-8. Logarithms are exponents: the power to which a base number must be raised to equal the number in question. For example, the log10 (log base 10) of 100 (= 102) is 2. In the audio world, we generally use base10 (unless otherwise designated, “log” implies base10); however, many physical processes are described by the so-called natural logarithm ln (base e = 2.718…– don’t ask) and digital signal processing is conducted ultimately in binary, or base 2. By using logarithmic measures, we avoid lots of zeros and minimize the number of digits.

There are properties of logs that simplify their use. Any base to the zero power equals 1. The power ½ is the square root. Negative exponents yield numbers less than 1. Positive and negative exponents are reciprocals, for example 102 = 100, 10−2 = 1/100. Positive whole-number exponents (base10) correspond to the number of zeros following the 1. Logarithms exist only for numbers greater than zero. The exponential notation used for large and small numbers in the metric system has been standardized with prefixes denoting the exponent. These are listed in Figure 1-7. Scientific notation makes use of exponents. The expression 6.02 × 1023 (the number of “things” in one mole) is expressed in scientific notation.

The primary audio application of the logarithm is the decibel. Because signal amplitude measurements must be made over many orders of magnitude, the bel (log10[power1/powerref]) was adopted as a unit of measure by the early telecommunications industry. Though appropriate in telegraphy where signal power transmission was important, the unit was too large to be convenient for electronic audio circuits and the decibel (1/10th bel, abbreviated dB) is now used. An important attribute of the decibel is that it isn’t an absolute measure, but rather a ratio. It is used to describe how much larger or smaller a sound level or signal amplitude is than a standard reference level. Reference levels are chosen according to the application: they may represent the quietest sound we can perceive (dB sound pressure level), the maximum signal a system can produce (dB full scale), the recommended input level a device is designed to see (dBv), a power level (dBm), or whatever we choose (VU – volume units). Each of these assumes a different reference quantity (Figure 1-9). Power ratios are 10log(x); voltage, current, and sound pressure levels are 20log(x). Appendix 1 shows some examples of calculations using decibels.

image

Figure 1-7 Exponents in powers of ten. The metric prefixes are used in scientific notation.

image

Figure 1-8 A graph of the function y = log10(x)

image

Figure 1-9 Amplitude reference levels.

image

VECTORS

In dealing with physical systems, we are often describing actions involving forces. A force has two components: a magnitude and a direction or phase. In order to mathematically describe a force, we must use vector math. An example of a vector measurement we commonly encounter is wind velocity: it has a magnitude (speed) and a direction. (Measures of magnitude without a direction are called scalars – temperature or mass, for example.) We can draw a vector as an arrow of length proportional to its magnitude and pointing in the direction of the action. If we wish to add or combine two forces, we must use vector math in order to find the resulting force.

image

Figure 1-10 Vector addition.

Figure 1-10 shows how vectors add graphically. Vectors image and image combine to produce vector image; in order to get the magnitude and phase or direction correct, we must use vector addition. Here the origin of the second vector image is placed so that it originates at the terminal point of the first vector image. This behavior is possible because absolute vector position is arbitrary; that is, the action is the same no matter where in space it occurs. As using vector math simplifies computations for mechanical, acoustic, and electronic systems, you need to understand only that vector math is computed differently from scalar math.

POLAR COORDINATES

Another technique often used in describing magnitude and direction is polar coordinates (Figure 1-11). Instead of plotting vectors by giving (x,y) pairs, polar coordinates consist of a magnitude and an angle (r,θ). This technique simplifies tasks like describing microphone directional sensitivity patterns and sound radiation patterns. For example, in a microphone sensitivity pattern chart, the length of the line r indicates the microphone’s sensitivity (output voltage for a given sound level input) and the angle θ indicates the direction from which the sound originates. In Chapter 6, we will use polar coordinates to describe the spatial sensitivity of microphones.

COMPLEX NUMBERS

image

Figure 1-11 Polar coordinates.

Vectors can also be represented as complex numbers (Equation 1-2) numbers with real (x) and imaginary (yi) components. Though this is not our usual way of thinking about numbers, the use of imaginary numbers simplifies the analysis of acoustic and electronic systems. The square root of –1 is an imaginary number, because there is no real number that, when squared, generates a negative number. So we make some up: i and j. These are simply defined as the square root of –1, even though we don’t come across such numbers in our daily activities (unless we’re physicists or engineers). The real part of the number represents the magnitude of the vector, and the imaginary part determines the direction or phase, so we can use a single number to represent both components of the vector. Using complex numbers, vector computations become more convenient. The complex numbers used in electrical engineering are known as phasors. We will not need to use vector mathematics much in our quest for a conceptual scientific understanding of sound recording, but we need not be intimidated by vector math when we encounter it in technical papers. It is merely a way to simplify the task of analyzing the behavior of electronic and acoustic systems.

image

Complex numbers are important in describing both analog and digital audio processes. Analog circuits are analyzed using complex numbers known as phasors (from phase vector), allowing an AC circuit to be analyzed in a simpler fashion, similar to the frequency-independent DC case. In digital signal processing, the Fourier transform used to analyze and process audio signals takes advantage of complex numbers. Regardless of whether we can grasp the idea of imaginary numbers, their use simplifies many analyses by providing a convenient mathematical method.

CALCULUS

Another branch of mathematics employed in many of the physical analyses we encounter in sound recording is calculus. Calculus is considered mystifying by many and is often avoided for that reason. Although algebra may be sufficient to describe simple physical systems, the application of calculus actually simplifies the analysis of many of the changing physical interactions we encounter in the processes of sound recording. Calculus is the mathematics of change. It consists of the derivative, the function that describes the rate of change of a function, and its inverse function the integral, which describes the area below the function and above the x-axis between two specified points.

Figure 1-12 shows the two basic forms of calculus. The derivative of function f(x) is the slope at each point along the curve, which becomes a new function dy/dx. The shaded area under the curve is the integral, in this case from 2 to 4, of the function f(x) (see Equation 1-3):

image

Figure 1-12 Calculus – derivatives and integrals.

In many cases, a function contains more than one variable. For instance, a moving object in space has variables for position along the x-, y-, and z-axes and one for time, f(x,y,z,t). If we are interested in only one of these variables, a partial differential may be taken. The symbol for a partial derivative is ∂, so a partial derivative of f(x,y,z,t) with respect to x would be ∂f/∂x where y, z, and t would be regarded as constants.

Integration and differentiation are inverse processes like multiplication and division or addition and subtraction. Although the ideas of calculus are essentially rather simple, when they are applied to real-world physical descriptions, the resulting equations can get quite complicated. Furthermore, many differential equations do not have exact solutions and must be evaluated using numerical methods. For our purposes, you need understand only what derivatives and integrals mean to see what many of the equations used to describe sound wave propagation or magnetic field interactions are telling us about the underlying physics.

STATISTICS

Frequently, the mathematical analyses we encounter describing the physics of sound recording deal with large numbers of individual events. For example, the behavior of air is ultimately the result of enormous numbers of individual molecular interactions: collisions between spinning diatomic gas molecules that transfer kinetic energy with each collision. When we attempt to understand why a sound system is perceived to sound a certain way, we must analyze the perceptions of many individuals in order to begin to explain what causes us to hear what we hear. These are examples of “population effects” that are best analyzed using the techniques of statistics.

Many people use the concept of the average in everyday life without knowing the mathematical definition. The average with which we are most familiar is technically the arithmetic mean (image, Equation 1-4), the sum of all individual measurements divided by the number of events measured.

image

A very common measurement in sound recording that benefits from statistics is the average amplitude of a signal that is continuously changing. We measure the signal over time and create a statistic that describes its value over the period of measurement: the root-mean-squared or RMS value.

The RMS value is the square root of the arithmetic mean of the squares of the individual values (Equation 1-5).

image

For RMS measurements of a continuous function, like a signal, the mathematical definition is more complicated but conceptually similar. The RMS measurement can be performed by dedicated integrated circuits or through digital computation. RMS measures the average power dissipated in a circuit when the voltage is changing over time. The arithmetic mean is most often used in statistics and is the most common statistic we encounter both in everyday life and in scientific experiments. The mean tells us the average value of the variable under consideration.

UNITS OF MEASURE

In order to apply mathematical analysis to our measurements, we need a standardized set of units of measure. Unfortunately, the quest to standardize a system of measurement has led to several competing systems in different parts of the world. Most of the world uses the metric system while the United States continues to use the older British system. The scientific community has adopted the metric system, which will be used here, although we will sometimes include British measurements as well because they are more commonly understood in the United States.

The metric system uses the meter as a unit of length, the kilogram as the unit of mass, and the second as the unit of time. For large measurements, the MKS (meter-kilogram-second) system is convenient; for smaller measurements, the CGS (centimeter-gram-second) system can be used. Scientists have adopted a system known as the International System of Units (SI) as their preferred system of measure. There are several units considered base units; that is, they are the fundamental unit of measure. They may be combined to generate derived measures that are more convenient to use. The derived measures are defined in terms of combinations of base units. The SI base units are listed in Figure 1-13.

Some frequently used SI and CGS units of measure are shown in Figure 1-14.

image

Figure 1-13 SI base units of measure.

image

Figure 1-14 SI and CGS units of measure.

Derived SI units can be expressed as combinations of the base units. For example, the newton can be expressed as m·kg/s2; volts are m2·kg/s3·A. It is easy to see why we prefer to use the derived units.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.153.212