<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
  <HEAD>
    <META name="generator" content="HTML Tidy, see www.w3.org">

    <TITLE></TITLE>
  </HEAD>

  <BODY>
    <H1>Basic acoustics and Signal Processing</H1>

    <H4>ArticleCategory: [Do not translate this]</H4>
    Forum 

    <H4>AuthorImage:[Do not translate this]</H4>
    <IMG src="../../common/images/John-Perr.gif" alt="[Photo of the author]" width="154" height="205"> 

    <H4>TranslationInfo:</H4>

    <P>original in fr <A href="mailto:johnperr(at)linuxfocus.org">John
    Perr</A></P>

    <P>fr to en <A href="mailto:johnperr(at)linuxfocus.org">John
    Perr</A></P>

    <H4>AboutTheAuthor:[Do not translate this]</H4>

    <P>Linux user since 1994; he is one of the French editors of
    LinuxFocus. Mechanical Engineer, MSc Sound and Vibration
    Studies</P>

    <H4>Abstract:[Do not translate this]</H4>

    <P><I>This is Basic acoustics and Signal Processing for musicians
    and computer scientists</I>.<BR>
     If you ever dreamed of making your own recordings or fiddling around
    with sound on your computer, then this article is just for you.</P>

    <H4>ArticleIllustration:[Do not translate this]</H4>
    <IMG src="../../common/images/article271/illustration271.png"
    width="278" height="102" alt="[Illustration]" hspace="10"> 

    <H4>ArticleBody:[Do not translate this]</H4>

    <H2>Introduction</H2>

    <P>This article intends to be educational. It hopes to provide the
    reader with a basic knowledge of sound and sound processing. Of
    course music is one of our concerns but all in all, it is just some
    noise among other less pleasant sounds.<BR>
    First the physical concepts of sound are presented together with
    the way the human ear interprets them. Next, signals will be looked
    at, i.e. what sound becomes when it is recorded especially with
    modern digital devices like samplers or computers.<BR>
    Last, up to date compressions techniques like mp3 or Ogg vorbis
    will be presented.<BR>
    The topics discussed in this paper should be understandable by a
    large audience. The author tried hard to use "normal terminology"
    and particularly terminology known to musicians. A few mathematical
    formulas pop up here and there within images, but do not matter
    here (phew! what a relief...).</P>

    <H2>A bit of physics</H2>

    <H3>Sound</H3>

    <P>Physically speaking, sound is the mechanical vibration of any
    gaseous, liquid or solid medium. The elastic property of the
    medium allows sound to propagate from the source as waves, exactly
    like circles made by a stone dropped in a lake.<BR>
    Every time an object vibrates, a small proportion of its energy is
    lost in the surroundings as sound. Let us say it right now, sound
    does not propagate in a vacuum.<BR>
    Figure 1a shows how a stylus connected to a vibrating source, like
    a speaker for example, converts to a wave when a band of paper
    moves under it.<BR>
    </P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_01a.png" width="604"
      height="153"><BR>
      <BR>
       

      <TABLE>
        <TR>
          <TD align="left"><I>z: Vibrating stylus of amplitude
          &plusmn;A0<BR>
          &lambda;: wavelength<BR>
          x: band speed at speed c<BR>
          w: Resulting wave<BR>
          </I> <BIG>Figure 1a: Vibrating stylus on a moving paper
          band</BIG><BR>
          </TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>As far as air is concerned, sound propagates as a pressure
    variation. A loudspeaker transmits pressure variations to the air
    around it. The compression (weak) propagates through the air.
    Please note that only the pressure front moves, not the air. For
    the circles in water mentioned earlier, waves do move whereas
    water stays in the same place. A floating object only moves up and
    down. This is why there is no "wind" in front of the loudspeaker.
    Sound waves propagate at about 344 meters per second, in air at
    20&deg;C, but air particles only move a few microns back and
    forth.<BR>
    </P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_01b.png" width="548"
      height="214"><BR>
      <I>P: Vibrating piston<BR>
      T: Tube<BR>
      t: time<BR>
      </I> <BIG>Figure 1b: vibrating piston in a fluid</BIG><BR>
    </CENTER>
    <BR>
    <BR clear="all">
     

    <H3>Frequency and Pitch</H3>

    <P>We know now, from the above drawings, that sound waves have a
    sine shape. Distance between two crests is called wavelength and
    the number of crests an observer sees in one second is called
    frequency. This term used in physics is nothing but the pitch of a
    sound for a musician. Low frequencies yield bass tones whereas high
    frequencies yield high pitched tones.<BR>
    Figure 2 gives values for both frequency and wavelength of sound
    waves propagating through the air:<BR>
    </P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_02.png" width="505"
      height="83"><BR>
      &lambda;: Wavelength<BR>
      F: Frequency<BR>
      <BIG>Figure 2: Wavelength and frequency in the air</BIG><BR>
    </CENTER>
    <BR>
    <BR>
     

    <H3>Amplitude and loudness</H3>

    <P>Another characteristic of sound is its amplitude. Sound can be soft
    or loud. Through the air it corresponds to small or large variation
    in pressure depending on the power used to compress air.
    Acousticians use decibels to rate the strength of sound. Decibel is
    a rather intricate unit as shown on drawings 3a and 3b. It has been
    chosen because figures are easy to handle and because this
    logarithmic formula corresponds to the behavior of the human ear
    as we shall see in the next chapter. Undoubtedly you are doing math
    without knowing it:</P>

    <CENTER>
      <TABLE border="0">
        <TR>
          <TD><IMG src="../../common/images/article271/fig_03a.png"
          width="201" height="34"></TD>

          <TD>&nbsp;</TD>

          <TD><IMG src="../../common/images/article271/fig_03b.png"
          width="122" height="34"></TD>
        </TR>

        <TR>
          <TD><BIG>Figure 3a: Noise level and pressure</BIG></TD>

          <TD>&nbsp;</TD>

          <TD><BIG>Figure 3b: Noise level and power</BIG></TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>Up to now, we only need to know that dB are related to the power
    of sound. 0 dB corresponds to the lower threshold of human
    hearing and not to the absence of noise. Decibels are a
    measure of noise relative to human capabilities. Changing the
    reference (Po or Wo) above will change the dB value accordingly.
    This is why the dB you can read on the knob of your Hi-Fi amplifier
    are not acoustic levels but the amplifier electrical output power.
    This is a totally different measure, 0 dB being often the maximum
    output power of your amplifier. As far as acoustics is concerned,
    the sound level in dB is much greater, otherwise you would not have
    bought that particular amplifier, but it also depends on the
    efficiency of you loud speakers... Figure 4 helps you locate a few usual
    sound sources both in amplitude and frequency. The curves
    represents levels of equal loudness as felt  by the human ear; we shall detail
    this later:<BR>
    <BR>
    </P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_04.png" width="400"
      height="542"><BR>
      <BIG>Figure 4: acoustic levels of usual sound sources</BIG><BR>
    </CENTER>

    <P>The array below shows levels in decibels and watts of a few
    usual sound sources. Please note how the use of decibels eases
    notation:</P>

    <CENTER>
      <TABLE border="1" bgcolor="#C0FFFF">
        <TR>
          <TH>Power (Watt)</TH>

          <TH>Level dB</TH>

          <TH>Example</TH>

          <TH>Power (W)</TH>
        </TR>

        <TR>
          <TD>100 000 000</TD>

          <TD>200</TD>

          <TD rowspan="3">Saturn V Rocket<BR>
          <BR>
           4 jet air liner</TD>

          <TD rowspan="3">50 000 000<BR>
          <BR>
           50 000</TD>
        </TR>

        <TR>
          <TD>1 000 000</TD>

          <TD>180</TD>
        </TR>

        <TR>
          <TD>10 000</TD>

          <TD>160</TD>
        </TR>

        <TR>
          <TD>100</TD>

          <TD>140</TD>

          <TD>Large orchestra</TD>

          <TD>10</TD>
        </TR>

        <TR>
          <TD>1</TD>

          <TD>120</TD>

          <TD>Chipping hammer</TD>

          <TD>1</TD>
        </TR>

        <TR>
          <TD>0.01</TD>

          <TD>100</TD>

          <TD rowspan="2">Shouted speech</TD>

          <TD rowspan="2">0.001</TD>
        </TR>

        <TR>
          <TD>0.000 1</TD>

          <TD>80</TD>
        </TR>

        <TR>
          <TD>0.000 001</TD>

          <TD>60</TD>

          <TD>Conversational speech</TD>

          <TD>20x10<SUP>-6</SUP></TD>
        </TR>

        <TR>
          <TD>0.000 000 01</TD>

          <TD>40</TD>

          <TD>&nbsp;</TD>

          <TD>&nbsp;</TD>
        </TR>

        <TR>
          <TD>0.000 000 000 1</TD>

          <TD>20</TD>

          <TD>Whisper</TD>

          <TD>10<SUP>-9</SUP></TD>
        </TR>

        <TR>
          <TD>0.000 000 000 001</TD>

          <TD>0</TD>

          <TD>&nbsp;</TD>

          <TD>&nbsp;</TD>
        </TR>

        <TR>
          <TD colspan="4"><BIG>Sound power output of some typical sound
          sources</BIG></TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>Sound amplitude can be measured in different ways. This also
    applies to other wave signals as Figure 5 demonstrate it:</P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_05.png" width="494"
      height="215"><BR>
      <BIG>Figure 5: Various measures of signal amplitude</BIG><BR>
      <BR>
      <BR>
    </CENTER>
    <CENTER>

    <TABLE border="1">
      <TR>
        <TH>Symbol</TH>

        <TH>Name</TH>

        <TH>Definition</TH>
      </TR>

      <TR>
        <TD>A<SUB>average</SUB></TD>

        <TD>Average Amplitude</TD>

        <TD>Arithmetic average of positive signal</TD>
      </TR>

      <TR>
        <TD>A<SUB>RMS</SUB></TD>

        <TD>Root mean square</TD>

        <TD>Amplitude proportional to energy content</TD>
      </TR>

      <TR>
        <TD>A<SUB>peak</SUB></TD>

        <TD>Peak Amplitude</TD>

        <TD>Maximal positive amplitude</TD>
      </TR>

      <TR>
        <TD>A<SUB>peak-peak</SUB></TD>

        <TD>Amplitude peak to peak</TD>

        <TD>Maximal positive to negative amplitude</TD>
      </TR>
    </TABLE>
    </CENTER>

    <P>The average amplitude is only a theoretical measure and
technically not used. On the
    other hand, the root mean square value is universally adopted to
    measure equivalent signals and especially sine waves. For
    instance, the equivalent current available on one of your home
    plugs is rated 220 volts sinusoidal varying at a constant
    frequency of 50 Hz. Here the 220 volts are RMS volts so that the
    voltage is really oscillating between -311 volts and +311 volts.
     Using the other definitions, this signal is 311
    volts peak or 622 Volts peak to peak. The same definitions apply
    for the output of power amplifiers, fed to speakers. An amplifier
    able to yield 10 watts RMS will have a peak value of 14 watts and a
    peak to peak value of 28 watts. These peak to peak measurements of
    sine waves are called musical watts by audio-video retailers
    because the figures are good selling arguments.</P>

    <H3>Time and space</H3>

    <P>As it does with music, time plays a fundamental role with
    acoustics. A very close relationship binds time to space because
    sound is a wave that propagates into space over time.<BR>
    Taking this into account, three classes of acoustic signals are
    defined:</P>

    <UL>
      <LI>Periodic: Signals repeating over time</LI>

      <LI>Random : Signals not being periodic. In the following, we
      will deal with a restricted class of these signals; those having
      stable statistic properties over time. They are called random
      ergodic signals. This is the case for noises like white or pink
      noise used by scientists or some musicians.</LI>

      <LI>Pulse: Signals not repeating over time but with a defined
      shape.</LI>
    </UL>

    <P>The diagrams of figure 6 show some sound signals. We take
    advantage of these diagrams to introduce the notion of spectrum.
    The spectrum of a signal shows the different "notes" or pure sounds
    that make a complex sound. If we take a stable periodic signal like
    a siren or a whistle, the spectrum is stable over time and only
    shows one value (one line on figure 6a). This is because it is
    possible to consider each sound as the combination of pure sounds
    which are sine waves. We shall see later on that this decomposition
    of periodic signals into sine waves has been demonstrated by a
    French mathematician named Fourier in the 19th century. This will
    also allow us to talk about chords as far as music is concerned.
    Meanwhile, I shall stick to sine waves because it is a lot easier
    to draw than solos from Jimmy Hendrix.</P>

    <CENTER>
        <IMG src="../../common/images/article271/fig_06a.png" width=
        "495" height="170" border="1"><br>
      <BIG>Figure 6a: Pure sinusoide (simple and
      periodic)</BIG><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_06b.png" width=
        "492" height="175" border="1">
      <br>
      <BIG>Figure 6b: Combination of two sinusoids</BIG><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_06c.png" width=
        "490" height="189" border="1">
      <br>
      <BIG>Figure 6c: Square wave (complex but periodic)</BIG><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_06d.png" width=
        "481" height="164" border="1">
      <br>
      <BIG>Figure 6d: Random signal (complex and non
      periodic)</BIG><BR>
      <BR>
      <BIG><B>Figure 6: Sound signals and their spectra</B></BIG>
    </CENTER>

    <P>In order to be able to process sound with a computer, we have to
    acquire it. This operation will allow us to transform the variation
    in pressure of the air into a series of numbers that computers
    understand. To do so, one uses a microphone which converts pressure
    variations into electrical signals and a sampler which convert the
    electric signal into numbers. A sampler is a general term and ADC
    (<I>Analog to Digital Converter</I>) is often used by
    electricians. This task is often devoted to the sound card of
    personal computers. The speed at which the sound card can record
    points (numbers) is called the sampling frequency. Figure 7 below
    shows the influence of the sampling frequency on a signal and its
    spectrum calculated by mean of the Fourier transform. Formula are
    here for the math addicts:</P>

    <CENTER>
        <IMG src="../../common/images/article271/fig_07a.png" width=
        "401" height="222" border=1>
      <BR>
      <BIG>Figure 7a: Integral Transform.</BIG><BR>
      <I>Infinite and continuous in time and frequency domains</I><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_07b.png" width=
        "400" height="199" border=1>
      <BR>
      <BIG>Figure 7b: Fourier Series.</BIG><BR>
      <I>Periodic in time and discrete in frequency domain</I><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_07c.png" width=
        "401" height="195" border=1>
      <BR>
      <BIG>Figure 7c: Sampled Functions.</BIG><BR>
      <I>Discrete in time and periodic in frequency domain</I><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_07d.png" width=
        "399" height="174" border=1>
      <BR>
      <BIG>Figure 7d: Discrete Fourier Transform.</BIG><BR>
      <I>Discrete and periodic both in time and frequency
      domains</I><BR>
      <BR>
    </CENTER>

    <P>This demonstrates (please believe me) that the transformation of
    a continuous wave into a series of discrete points makes the
    spectrum periodic. If the signal is also periodic, then the
    spectrum is also discrete (a series of points) and we only need to
    compute it at a finite number of frequencies. This is a good news
    because our computer can only compute numbers and not waves.<BR>
    So we are now faced with the case of fig. 7d where a sound signal
    and its spectrum are both known as a series of points which where the
    fluctuate over time and in the frequency domain between 0 Hz and
    half the sampling frequency.<BR>
    All these figures lining up have finally lost some part of the
    original sound signal. The computer only knows the sound at some
    precise moments. In order to be sure that it will be played
    properly and without any ambiguity, we have to be careful while
    sampling it. The first thing to do is to be sure that no frequency
    (pure sounds) greater than half the sampling frequency is present
    in the sampled signal. If not, they will be interpreted as lower
    frequencies and it will sound awful. This is shown in figure 8:</P>

    <CENTER>
        <IMG src="../../common/images/article271/fig_08a.png" width=
        "300" height="221" border=1>
      <br>
      <BIG>Figure 8a: Aliasing.</BIG><BR>
      <I>Above: Sampling frequency equal to max. freq. and a DC signal as
	seen by the sampler.<BR>
      Below: Frequency component at the sampling frequency fs is
      interpreted as DC</I><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_08b.png" width=
        "271" height="218" border=1>
      <br>
      <BIG>Figure 8b: Aliasing.</BIG><BR>
      <I>Above: Frequency at (1/N)fs<BR>
      Below: Frequency component at [(N+1)/N]fs is interpreted as
      (1/N)fs</I><BR>
      <BR>
    </CENTER>

    <P>This particular behavior of sampled signals is best known as
    the Shannon theorem. Shannon is the mathematician who has
    demonstrated this phenomenon. A similar effect can be observed on
    the cart wheels in films, e.g westerns. They often appear to run backward
    because of the stroboscopic effect of films. For daily use of sound
    acquisition, this means that you need to eliminate all frequencies
    above half the sampling frequency. Not doing so will mangle the
    original sound with spurious sounds. Take for instance the sampling
    frequency of compact discs (44.1 KHz); sounds above 22 KHz must be
    absent (<I>tell your bats to keep quite because they chat with
    ultra sounds</I>).</P>

    <P>In order to get rid of the unwanted frequencies, filters are
    used. Filter is a widely used term that applies to any device able
    to keep or transform partial sound. For example, low pass filters
    are used to suppress high frequencies which are not audible but
    annoying for sampling (<I>the gossiping of the bats</I>). Without
    going into details, the following diagram shows the characteristics
    of a filter:</P>

    <CENTER>
        <IMG src="../../common/images/article271/fig_09.png" width=
        "300" height="274" border=1><BR>
      <BIG>Figure 9: Practical vs ideal filter.</BIG><BR>
      <I>I: Ideal filter<BR>
      P: Practical filter<BR>
      R: Ripple<BR>
      B: Effective bandwidth</I>
    </CENTER>

    <P>A filter is a device that changes the signal both the time and
    spectrum of the sound wave. A 100 Hz square wave low pass filtered
    at 200 Hz will become a sine wave because the upper part of its
    spectrum is removed (see figure 6c). Similarly, a note at 1000 Hz
    played by a piano (C 6) will sound like a whistle if it is filtered
    at 1200 or 1500 Hz. The lower frequency of the signal is called
    fundamental frequency. The others are multiples and are called
    harmonic frequencies.<BR>
    In the time domain, a filter introduces modifications of the wave
    called distortions. This is mainly because of the delay taken by
    each harmonic relatively to the others.</P>

    <P>In order to show the influence of a filter on a signal, let us
    consider a simple square pulse (figure 10a),the amplitude of its
    spectrum (figure 10b) and the phase of its spectrum (figure 10c).
    This square pulse acts as a filter allowing sound to go through
    between t=0 and T seconds. The spectrum of the pulse represents the
    frequency response of the filter. We see that the higher the
    frequency of the signal, the bigger is the delay between the
    frequency components and the lower is their amplitude.</P>

    <CENTER>
        <IMG src="../../common/images/article271/fig_10a.png" width=
        "400" height="127" border=1>
      <BR>
      <BIG>Figure 10a: Time signal.</BIG> <I>Rectangular pulse at
      t=0.</I><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_10b.png" width=
        "400" height="127" border=1>
      <BR>
      <BIG>Figure 10b: Spectrum (Amplitude).</BIG><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_10c.png" width=
        "400" height="141" border=1>
      <BR>
      <BIG>Figure 10c: Spectrum (Phase).</BIG><BR>
      <BR>
    </CENTER>

    <P>Figure 11 represents the influence of the rectangular filter on
    a simple signal like a sine wave.</P>

    <CENTER>
        <IMG src="../../common/images/article271/fig_11a.png" width=
        "399" height="119" border=1>
      <BR>
      <BIG>Figure 11a: Rectangular pulse.</BIG><BR>
      <I>Impulsion at t=0.</I><BR>
      <BR>

        <IMG src="../../common/images/article271/fig_11b.png" width=
        "400" height="163" border=1>
      <BR>
      <BIG>Figure 11b: Sound pulse.</BIG><BR>
      <BR>
    </CENTER>

    <P>Cutting sound abruptly at time T introduces new frequencies in
    the spectrum of the sine wave. If the filtered signal is more
    complex, like the square wave of figure 6c, the frequency
    components will lag giving a distorted signal on the output of the
    filter.</P>

    <H2>Physico-acoustics</H2>

    <H3>The human ear</H3>

    <P>For a better understanding of acoustics and sound, let us focus
    on the part we use to receive sound: the ear.<BR>
    Figure 12 shows a cross section of the ear. Sound is collected in
    the pinna and channeled through the auditory canal toward the ear
    drum which acts more or less like a microphone. The vibrations of
    the ear drum are amplified by three small bones acting like levers
    and named the hammer, the anvil and the stirrup.</P>

    <CENTER>
      <TABLE>
        <TR>
          <TD><IMG src="../../common/images/article271/fig_12.png"
          width="488" height="354" border=1></TD>

          <TD>
          &nbsp;</TD>

          <TD>a) Outer ear<BR>
          b) Middle ear<BR>
          c) Inner ear<BR>
          d) Pinna<BR>
          e) Ear Canal<BR>
          f) Ear Drum<BR>
          g) Stapes<BR>
          h) Malleus<BR>
          i) Incus<BR>
          j) Oval Window<BR>
          k) Round Window<BR>
          l) Eustachian Tube<BR>
          m) Scala Tympani<BR>
          n) Scala vestibuli<BR>
          o) Cochlea<BR>
          p) Nerve Fiber<BR>
          q) Semicircular canal<BR>
          </TD>
        </TR>

        <TR>
          <TD colspan="3" align="center"><BIG><BIG>Figure 12: The main
          parts of the ear</BIG></BIG></TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>The movements of the stirrup are transmitted via the oval window
    to the cochlea. The cochlea contains two chambers separated by the
    basilar membrane which is covered with sensitive hair cells linked
    to the auditory nerve (As shown on figure 13 and 14 below). The
    basilar membrane acts as spatial filter because the various parts
    of the cochlea are sensitive to the various frequencies thus
    allowing the brain to differentiate the pitch of notes.</P>

    <CENTER>
      <TABLE border="0">
        <TR>
          <TD><IMG src="../../common/images/article271/fig_13.png"
          width="464" height="382"></TD>

          <TD>
          &nbsp;&nbsp;</TD>

          <TD>f) Ear Drum<BR>
          g) Stirrup<BR>
          h) Hammer<BR>
          i) Anvil<BR>
          j) Oval Window<BR>
          k) Round Window<BR>
          m) Scala Tympani<BR>
          n) Scala vestibuli<BR>
          r) Basilar Membrane<BR>
          s) Helicotrema<BR>
          <BR>
          R) Relative response<BR>
          F) Frequency response<BR>
          D) Distance along membrane<BR>
          </TD>
        </TR>

        <TR>
          <TD colspan="3" align="center"><BIG><BIG>Figure 13:
          Longitudinal section of the cochlea</BIG></BIG></TD>
        </TR>
      </TABLE>
    </CENTER>
    <BR>
    <BR>
     

    <CENTER>
      <TABLE border="0">
        <TR>
          <TD><IMG src="../../common/images/article271/fig_14.png"
          width="471" height="196"></TD>

          <TD>
          &nbsp;</TD>

          <TD>m) Scala Tympani<BR>
          n) Scala vestibuli<BR>
          p) Auditive Nerve<BR>
          r) Basilar Membrane<BR>
          t) Scala media<BR>
          u) Hair cell<BR>
          </TD>
        </TR>

        <TR>
          <TD colspan="3" align="center"><BIG><BIG>Figure 14: Section
          across the cochlea</BIG></BIG></TD>
        </TR>
      </TABLE>
    </CENTER>

    <H3>Perception</H3>

    <P>The brain plays a very important role because it does all the
    analysis work in order to recognize sounds, according to
    pitch of course, but also according to  duration. The brain
    also performs the correlation between both ears in order to locate
    sound in space. It allows us to recognize a particular instrument
    or person and to locate them in space. It seems that most of the
    work done by the brain is learned.<BR>
    Figure 15 shows how we hear sounds according to frequencies.</P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_15.png" width="300"
      height="243"><BR>
      <BIG>Figure 15: Equal loudness contours</BIG><BR>
    </CENTER>

    <P>The curves above have been drawn for an average population and
    are a statistical result for people aged between 18 and 25 and for
    pure tones. The differences between individuals are explained by
    many factors among which:</P>

    <UL>
      <LI>experience: being a musician or not for example.</LI>

      <LI>exposure to noise.</LI>

      <LI>age.</LI>

      <LI>...</LI>
    </UL>

    <P>Figure 16 shows the influence of age on hearing loss for
    different frequencies. According to the sources the results are
    different. This is explained easily by the large variations that
    can be observed in a population and because these studies cannot
    easily take only age into account. It is not rare to find aged
    musicians with young ears as well as there are young people with
    important hearing loss due to long exposure to strong noises like
    those found in concerts or night clubs.</P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_16.png" width="500"
      height="249"><BR>
      <BIG>Figure 16: Age related hearing loss according to Spoor and
      Hinchcliffe</BIG><BR>
    </CENTER>

    <P>Noise induced hearing loss depends both on the duration of
    exposure and on the noise intensity. Note that all sounds are
    considered here as "noise" and not only the unpleasant ones. Thus,
    listening to loud music with headphones has the same effect on the
    auditive cells as listening to planes taking off on the end of
    the runway.<BR>
    Figure 17 shows the effect of exposure to noise on hearing. Notice
    that the effects are not the same as those induced by age where
    the ear loses sensitivity at high frequencies. On the other hand,
    noise induced hearing loss makes the ear less sensitive around 3-4
    Khz. At those frequencies, the ear is the most sensitive. This kind
    of hearing loss is usually seen among firearms users.</P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_17.png" width="499"
      height="348"><BR>
      <BIG>Figure 17: Development of noise induced hearing
      loss</BIG><BR>
      <I>Exp.: Years of exposure.</I>
    </CENTER>

    <P>If you take a look at the chapter about decibels and their
    calculation, you will notice that about ten decibels corresponds to a very
    large acoustic pressure change. Having a linear decibel scale is
    equivalent to an exponential pressure scale. This is because the
    ear and the brain are able to handle very large variation of both
    amplitude and frequency. The highest frequency sound the healthy
    human can ear is 1000 times the frequency the lowest, and the
    loudest can have a sound pressure one billion times that of the
    quietest that can be heard (an intensity ratio of 10<SUP>12</SUP>
    to 1).<BR>
    Doubling pressure only represents 3 dB. This can be heard but an
    increase of 9 dB of the sound intensity is needed for the human
    being to have a subjective feeling of double volume. This is an
    acoustic pressure 8 times stronger!<BR>
     In the frequency domain, changing octave is equivalent to doubling
    the sound frequency. Here too, we hear linearly the exponential
    increase of a physical phenomenon. Do not rush to your calculator
    yet, calculating the pitches of notes will be done later on.</P>

    <H2>Recording</H2>

    <P>Recording sound using an analog device like a tape recorder or
    a vinyl disc is still a common operation even if it tends to be
    overcome by digital systems. In both cases, transforming a sound
    wave into magnetic oscillations or digital data, introduces limits
    inherent to the recording device. We quickly talked earlier about
    the effects of sampling on the spectrum of sound. Other effects can
    be expected when recording sound:</P>

    <H3>Dynamic range</H3>

    <P>"Dynamic" is the term used for a recording device in order to
    express the difference between the minimum and maximum amplitude
    the device can record. It generally starts with the microphone,
    converting sound into an electrical signal, up to the recording
    medium, disc, tape or computer...<BR>
    Remember that decibels do express a ratio. As far as dynamic range
    is concerned, the value given is relative to the minimum of the
    scale which is 0 dB. Here are a few examples:</P>

    <UL>
      <LI>Vinyl disc: 65 dB</LI>

      <LI>Magnetic tape: 55 dB</LI>

      <LI>16 bits sampling (CD): 96 dB</LI>

      <LI>8 bits sampling: 48 dB</LI>
    </UL>

    <P>A symphonic orchestra can play sounds ranging up to 110 dB. This
    is why disc editors use dynamic compression systems so that louder
    sounds are not clipped and quieter ones not lost into noise.</P>

    <H3>Ground noise</H3>

    <P>In addition to being less capable than the human ear, recording
    devices also have the drawback of generating their own noise. It
    can be the rubbing of the diamond on the vinyl disc or the snoring
    of the amplifier. This kind of noise is usually very low but do not
    allow for quietest sounds to be recorded. It is best heard most of
    the time with good quality headphones and sounds like a waterfall
    because it has a very wide spectrum including many frequencies.</P>

    <H3>Distortion</H3>

    <P>We saw earlier that filters have an important effect on the
    phase of a spectrum because they shift signals according to their
    frequency. This type of signal distortion is called harmonic
    distortion because it affects the harmonic frequencies of the
    signal.<BR>
    Every single device recording a signal behaves like a filter and
    thus induces signal distortions. Of course, the same happens
when you play any recorded sound again. Additional distortion and
noise will be added.
    </P>

    <H3>Compression</H3>

    <P>More and more, compression algorithms like mp3 or Ogg Vorbis are
    used to gain precious disk space on our recording media.<BR>
    These algorithms are said to be destructive because they do
    eliminate part of the signal in order to minimize space.
    Compression programs use a computer model of the human ear in order
    to eliminate the inaudible information. For instance, if two
    frequency components are close to each other, the quietest can be
    safely taken off because it will be masked by the louder one. This
    is why tests and advice can be found on the Internet in order to
    best use this software, i.e. keep the best part of the signal.
    According to those read by the author, most mp3 compressions do
    low pass filter sounds at 16 KHz and do not allow for bit rates
    higher than 128 KiloBits/seconds. These figures are most of the
    time unable to maintain sound at CD quality.<BR>
    On the other hand, compression software like gzip, bzip2, lha or
    zip do not alter data but have lower compression ratios. Moreover,
    it is necessary to uncompress the whole file before listening to
    it, which is not what is needed for a walkman or any other sound
    playing device.</P>

    <H2>What about music?</H2>

    <P>In order to settle things, here is a comparison of terms used
    by music and science. Most of the time, these comparisons have
    limits because the terms used by music lovers describe human
    hearing and not physical phenomenons.</P>

    <H3>Notes and pure frequencies</H3>

    <P>A note is defined, amongst others, by its pitch and this pitch
    can be assumed to be the fundamental frequency of the note. Knowing
    this, the frequencies of notes can be calculated with the following
    formula:</P>

    <CENTER>
      <B>FREQUENCY (in hertz)= REF &times; 2<SUP>( (OCTAVE - 4) + (
      TONE - 10) / 12 )</SUP></B><BR>
    </CENTER>

    <P>If we use <B>REF</B> for A at 440 Hz from octave 4 as base, we
    can compute the others for tones ranging from 1 to 12 from C to
    B:</P>

    <CENTER>
      <TABLE border="1" cellpadding="8" cellspacing="1">
        <TR>
          <TH rowspan="2">Note</TH>

          <TH colspan="8">Octave</TH>
        </TR>

        <TR>
          <TH>1</TH>

          <TH>2</TH>

          <TH>3</TH>

          <TH>4</TH>

          <TH>5</TH>

          <TH>6</TH>

          <TH>7</TH>

          <TH>8</TH>
        </TR>

        <TR>
          <TD>C</TD>

          <TD>32,70</TD>

          <TD>65,41</TD>

          <TD>130,8</TD>

          <TD>261,6</TD>

          <TD>523,3</TD>

          <TD>1047</TD>

          <TD>2093</TD>

          <TD>4186</TD>
        </TR>

        <TR>
          <TD>C #</TD>

          <TD>34,65</TD>

          <TD>69,30</TD>

          <TD>138,6</TD>

          <TD>277,2</TD>

          <TD>554,4</TD>

          <TD>1109</TD>

          <TD>2217</TD>

          <TD>4435</TD>
        </TR>

        <TR>
          <TD>D</TD>

          <TD>36,71</TD>

          <TD>73,42</TD>

          <TD>146,8</TD>

          <TD>293,7</TD>

          <TD>587,3</TD>

          <TD>1175</TD>

          <TD>2349</TD>

          <TD>4699</TD>
        </TR>

        <TR>
          <TD>E b</TD>

          <TD>38,89</TD>

          <TD>77,78</TD>

          <TD>155,6</TD>

          <TD>311,1</TD>

          <TD>622,3</TD>

          <TD>1245</TD>

          <TD>2489</TD>

          <TD>4978</TD>
        </TR>

        <TR>
          <TD>E</TD>

          <TD>41,20</TD>

          <TD>82,41</TD>

          <TD>164,8</TD>

          <TD>329,6</TD>

          <TD>659,3</TD>

          <TD>1319</TD>

          <TD>2637</TD>

          <TD>5274</TD>
        </TR>

        <TR>
          <TD>F</TD>

          <TD>43,65</TD>

          <TD>87,31</TD>

          <TD>174,6</TD>

          <TD>349,2</TD>

          <TD>698,5</TD>

          <TD>1397</TD>

          <TD>2794</TD>

          <TD>5588</TD>
        </TR>

        <TR>
          <TD>F #</TD>

          <TD>46,25</TD>

          <TD>92,50</TD>

          <TD>185,0</TD>

          <TD>370,0</TD>

          <TD>740,0</TD>

          <TD>1480</TD>

          <TD>2960</TD>

          <TD>5920</TD>
        </TR>

        <TR>
          <TD>G</TD>

          <TD>49,00</TD>

          <TD>98,00</TD>

          <TD>196,0</TD>

          <TD>392,0</TD>

          <TD>784,0</TD>

          <TD>1568</TD>

          <TD>3136</TD>

          <TD>6272</TD>
        </TR>

        <TR>
          <TD>A b</TD>

          <TD>51,91</TD>

          <TD>103,8</TD>

          <TD>207,6</TD>

          <TD>415,3</TD>

          <TD>830,6</TD>

          <TD>1661</TD>

          <TD>3322</TD>

          <TD>6645</TD>
        </TR>

        <TR>
          <TD>A</TD>

          <TD>55,00</TD>

          <TD>110,0</TD>

          <TD>220,0</TD>

          <TD>440,0</TD>

          <TD>880,0</TD>

          <TD>1760</TD>

          <TD>3520</TD>

          <TD>7040</TD>
        </TR>

        <TR>
          <TD>B b</TD>

          <TD>58,27</TD>

          <TD>116,5</TD>

          <TD>233,1</TD>

          <TD>466,2</TD>

          <TD>932,3</TD>

          <TD>1865</TD>

          <TD>3729</TD>

          <TD>7459</TD>
        </TR>

        <TR>
          <TD>B</TD>

          <TD>61,74</TD>

          <TD>123,5</TD>

          <TD>246,9</TD>

          <TD>493,9</TD>

          <TD>987,8</TD>

          <TD>1976</TD>

          <TD>3951</TD>

          <TD>7902</TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>The true music lovers will notice that we do not make any
    distinction between diatonic or chromatic half tones. With minimal
    changes, the same calculations can be done using commas as a
    subdivision instead of half tones...<BR>
    Assuming notes are frequencies is far from being enough to
    distinguish a note played by one instrument from another one.. One
    also needs to take into account how the note is played (pizzicato or
    legato), from which instrument it comes, not counting all
    possible effects like glissando, vibrato, etc... For this purpose,
    notes can be studied using their sonogram which is their spectrum
    across time. A sonogram allows all the harmonic frequencies to be
    viewed along time.</P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_18.png" width="255"
      height="191" border=1><BR>

      <TABLE>
        <TR>
          <TD colspan="2"><BIG>Figure 18: A sonogram</BIG></TD>
        </TR>

        <TR>
          <TD><I>T: Time</I></TD>

          <TD><I>A: Amplitude</I></TD>

          <TD><I>F: Frequency</I></TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>Nowadays, electronic sound recording and playing uses totally
    artificial devices like synthesizers for creating sounds out of
    nothing or samplers to store sound and play it at different pitches
    with various effects. It is then possible to play a cello concerto
    replacing the instruments with sampled creaking of chairs. Every
    body can do it, no need to be able to play any instrument.<BR>
    The characteristics of a single note are given in the diagram
    below:</P>

    <CENTER>
      <IMG src="../../common/images/article271/fig_19.png" width="309"
      height="169"><BR>

      <TABLE>
        <TR>
          <TD colspan="2"><BIG>Figure 19: Characteristics of a note:
          envelop</BIG></TD>
        </TR>

        <TR>
          <TD><I>1: Attack</I></TD>

          <TD><I>A: Positive Amplitude</I></TD>
        </TR>

        <TR>
          <TD><I>2: Sustain</I></TD>

          <TD><I>T: Time</I></TD>
        </TR>

        <TR>
          <TD><I>3: Decay</I></TD>

          <TD>&nbsp;</TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>The curve shows the evolution of the global loudness of sound
    along time. This type of curve is called an envelop because it does
    envelop the signal (grey part of the drawing). The rising part is
    called the attack and can differ tremendously according to the type
    of instrument. The second part is called sustain and is the body of
    the note and is often the longest part except for percussion
    instruments. The third part can also change shape and length
    according to the instrument.<BR>
    Moreover, instruments allow musicians to influence each of the three
    parts. Hitting differently the keys of a piano will change the
    attack of the note whereas the pedals will change the decay. Each of
    the three parts can have its individual spectrum (color) which make
    the sound diversity infinite. Harmonic frequencies do not change at
    the same rate. Bass frequencies tend to last longer so that the
    color of the sound is not the same at the beginning and at the end
    of the note.</P>

    <H3>Range</H3>

    <P>According to its definition, the frequency range of a device can
    be associated to the range of an instrument. In both cases the
    terms describe a range of frequencies or pitches an instrument can
    play. However, the highest pitch an instrument can play is
    equivalent to the fundamental frequency given in the array above.
    In other words, recording a given instrument requires a device
    having a frequency range much higher to the highest note the
    instrument can play if the color of the notes are to be recorded. A
    short frequency range will low pass filter all the upper 
    harmonics of the higher pitch notes and this will change sonority.
    In practice, a device with the frequency range of the human ear,
    i.e. 20hz to 20Khz, is needed. Often it is necessary to go
    higher than 20 Khz, because devices introduce distortion well
    before the cut off frequency.</P>

    <H3>Harmonics and chords</H3>

    <P>Analysing the frequency array of notes above, musicians will
    find similarities between harmonic frequencies and notes making a
    chord.<BR>
    Harmonic frequencies are multiples of the fundamental frequency. So
    for a C 1 at 32,7 Hz The harmonic frequencies are:</P>

    <CENTER>
      <TABLE border="1" cellpadding="8" cellspacing="1">
        <TR>
          <TH>Harmonic</TH>

          <TH>1</TH>

          <TH>2</TH>

          <TH>3</TH>

          <TH>4</TH>

          <TH>5</TH>

          <TH>6</TH>

          <TH>7</TH>

          <TH>8</TH>
        </TR>

        <TR>
          <TH>Frequency</TH>

          <TD>32,7</TD>

          <TD>65,4</TD>

          <TD>98,1</TD>

          <TD>130,8</TD>

          <TD>163.5</TD>

          <TD>196,2</TD>

          <TD>228,9</TD>

          <TD>261,6</TD>
        </TR>

        <TR>
          <TH>Note</TH>

          <TD>C</TD>

          <TD>C</TD>

          <TD>G</TD>

          <TD>C</TD>

          <TD>E</TD>

          <TD>G</TD>

          <TD>B b</TD>

          <TD>C</TD>
        </TR>
      </TABLE>
    </CENTER>

    <P>Here we see why a chord is known as perfect (C-E-G-C) or seventh
    (C-E-G-Bb): The frequencies of the notes within the chord are
    aligned with the harmonic frequencies of the base note (C). This is
    where the magic is.</P>

    <H2>Conclusion</H2>

    <P>Without much going into the details, we have looked at the
    physical, human and technical aspects of sound and acoustics. This
    being said, your ear is will always be the best choice criterion.
    Figures given by mathematics or sophisticated measuring devices can
    help you understand why one particular record sounds weird but they
    will never tell you if the Beatles made better music than the
    Rolling Stones in the sixties.</P>

    <H2>Bibliography</H2>

    <P><A href="http://www.bkhome.com/">Br&uuml;el &amp; Kjaer</A>:
    Danish company making measurement instruments for
    acoustics and vibrations. This company has published for a long time
    (fifty years or so) free books where most of the drawings for this
    article come from. These books are available on line in PDF format
    under the following <A href="http://www.bksv.com/bksv/2148.htm">http://www.bksv.com/bksv/2148.htm</A>
    link.</P>
  </BODY>
</HTML>