1.
1 INFORMATION REPRESENTATION                                                                          AHMED THAKUR
    1.1.3   SOUND
                Understanding of what is meant by transmission of data
        Sound
        Sound is an oscillation of pressure transmitted through a solid, liquid, or gas (there is no sound in outer space as space
        is a vacuum and there is no solid, liquid or gas to transmit sound through!). A speaker works by moving its centre cone
        in and out, this causes the air particles to bunch together forming waves. These waves spread out from the speaker
        travelling at 340 m / s. If your ear is in the way, then the waves of sound particles will collide with your ear drum,
        vibrating it and sending a message to your brain. This is how you hear:
        When you hear different volumes and pitches of sound all that is happening is that each sound wave varies in energy
        for the volume (larger energy waves, the louder the sound), or distance between sound waves which adjusts the pitch,
        (smaller distances between waves leads to higher pitched sound).
                                              1 - base volume         and      frequency
                                              2 - double volume and frequency
                                                 3 - same volume treble the frequency
        Sound is often recorded for two channels, stereo, feeding a left and right speaker whose outputs may differ massively.
        Where one channel is used, this is called mono. 5.1 surround sound used in cinemas and home media set ups use 6
        channels.
                                             A computer representation of a stereo
                                             song, if you look carefully you'll see the
                                             volume of the song varying as you go
                                             through it
        This section of the book will cover how we record, store and transmit sound using computers. Sound waves in nature are
        continuous, this means they have an almost infinite amount of detail that you
                                      https://www.facebook.com/groups/OAComputers/                                               Page 1
COMPUTER SCIENCE
      9608                            ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                          AHMED THAKUR
    1.1.3     SOUND
        could store for even the shortest sound. This makes them very difficult to record perfectly, as computers can only store
        discrete data, data that has a limited number of data points.
                                                              The discrete approximations (in red) can be used to Sound is a
            continuous set of data points recreate the original sound (grey). However, due to formed by a wave. Computers
            sample limitations in the number of samples we take we are this sound at discrete points to store a often unable to
            truly represent a sound wave, though
            digital    approximation      we     can    get     close     enough     for  the     human       ear     not    to
                                                              notice the difference.
        Analog and digital
        For a computer to store sound files we need to get the continuous analogue sound waves into discrete binary values:
                 An analogue sound wave is picked up by a microphone and sent to an Analogue to Digital (ADC) converter in
                 the form of analogue electrical signals. The ADC converts the electrical
                 signals      into    digitalvalues            which     can       be     storedona             computer.
                 Once in      a   digital format you         can edit    sounds     with   programs such            as audacity.
                 To play digital audio you convert the sound from digital values into analogue electrical signals using the DAC,
                 these signals are then passed to a speaker that vibrating the speaker cone, moving the air to create sound waves
                 and analogue noise.
             nalogue to Digital Converter (ADC) - Converts analogue sound into digital signals that can be stored on a computer
        Digital to Analogue Converter (DAC) - Converts digital signals stored on a computer into analogue sound that can be
        played through devices such as speakers
                                        https://www.facebook.com/groups/OAComputers/                                                Page 2
COMPUTER SCIENCE
      9608                              ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                             AHMED THAKUR
    1.1.3   SOUND
                                                fig 1. The original analogue sound wave is a
                                        continuous               set           of           points
                                        fig 2. A C converts sound into digital data
                                        fig 3. DAC converts digital data into analogue
                                        sound, the analogue wave produced may differ
                                        significantly from the original sound wave
        Sampled sound
        Sound waves are continuous and computers can only store discrete data. How exactly does an Analogue to Digital
        Convert convert a continuous sound wave into discrete digital data? To do this we need to look at how computers
        sample sound.
        Sampling is amplitude of sound wave taken at different points in time and measurement of value of analogue signal at
        regular time intervals/a point in time.
        Sampling Rate - The number of samples taken per second
        Hertz (Hz) - the SI unit of frequency defined as the number of cycles per second of a periodic phenomenon
        To create digital music that sounds close to the real thing you need to look at the analogue sound waves and try to represent
        them digitally. This requires you to try to replicate the analogue (and continuous) waves as discrete values. The first step in
        doing this is deciding how often you should sample the sound wave, if you do it too little, the sample stored on a computer
        will sound very distant from the one being recorded. Sample too often and sound stored will resemble that being recorded but
        having to store each of the samples means you'll get very large file sizes. To decide how often
                                       https://www.facebook.com/groups/OAComputers/                                                  Page 3
COMPUTER SCIENCE
      9608                             ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                       AHMED THAKUR
    1.1.3      SOUND
        you are going to sample the analogue signal is called the sampling rate. Take a look at the following example:
         Original Sound                          High sample rate
            original continuous sound wave        digital looks like original
            1/2 high sample rate                  1/3 high sample rate                      1/4 high sample rate
            digital loses sharpness               loss of peaks                             poor resemblance to original!
        To create digital sound as close to the real thing as possible you need to take as many samples per second as you can.
        When recording MP3s you'll normally use a sampling rate between 32,000, 44,100 and 48,000Hz (samples per second).
        That means that for a sampling rate of 44,100, sound waves will have been sampled 44,100 times per second!
        Recording the human voice requires a lower sampling rate, around 8,000Hz. If you speak to someone on the phone it
        may sound perfectly acceptable, but try playing music down a telephone wire and see how bad it sounds.
                                       https://www.facebook.com/groups/OAComputers/                                         Page 4
COMPUTER SCIENCE
      9608                             ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                      AHMED THAKUR
    1.1.3   SOUND
            Comparison of the same sound sample recorded at 8k z, 22k z and 44kHz sample rate. Note the spacing of the
            data points for each sample. he higher the sample rate the more data points we'll need to store
        Sampling resolution
        Sampling resolution - the number of bits assigned to each sample
        As you saw earlier, different sounds can have different volumes. The sampling resolution allows you to set the range of
        volumes storable for each sample. If you have a low sampling resolution then the range of volumes will be very
        limited, if you have a high sampling resolution then the file size may become unfeasible. The sampling resolution for a
        CD is 16 bits used per sample.
        Amplitude
        Amplitude is the fluctuation or displacement of a wave from its mean value. With sound waves, it is the extent to which
        air particles are displaced, and this amplitude of sound or sound amplitude is experienced as the loudness of sound.
        Dynamic range
        Abbreviated DR or DNR, is the ratio between the largest and smallest values of a changeable quantity, such as in
        signals like sound and light.
        The 16-bit compact disc has a theoretical dynamic range of about 96 dB for a triangle wave or 98 dB for
        sinusoidal signals.The perceived dynamic range of 16-bit audio can be as high as 120 dB with noise-shaped dither,
        taking advantage of the frequency response of the human ear. Digital audio with undithered 20-bit digitization is also
        theoretically capable of 120 dB dynamic range. Similarly, 24-bit digital audio calculates to 144 dB dynamic range. All
        digital audio recording and playback chains include input and output converters and associated analog circuitry,
        significantly limiting practical dynamic range. Observed 16-bit digital audio dynamic range is about 90 dB.
        Dynamic range in analog audio is the difference between low-level thermal noise in the electronic circuitry and high-
        level signal saturation resulting in increased distortion and, if pushed higher,
                                     https://www.facebook.com/groups/OAComputers/                                            Page 5
COMPUTER SCIENCE
      9608                           ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                      AHMED THAKUR
    1.1.3   SOUND
        clipping. Multiple noise processes determine the noise floor of a system. Noise can be picked up from microphone self-
        noise, preamp noise, wiring and interconnection noise, media noise, etc.
        File sizes
        Bit rate - the number of bits required to store 1 second of sound
        To work out the size of a sound sample requires the following equation:
        File Size = Sample Rate * Sample Resolution * Length of sound
        This is the same as saying:
        File Size = Bit Rate * Length of sound
        Let's look at an example:
        To work out the size of a sound sample requires the following equation:
        File Size = Sample Rate * Sample Resolution * Length of sound
        This is the same as saying:
        File Size = Bit Rate * Length of sound
        Let's look at an example:
         Example: Sound File Sizes
         If you wanted to record a 30 second voice message on your mobile phone you would use the following:
         Sample Rate = 8,000Hz
         Sample Resolution = 16 bit
         Length of Sound = 30 seconds
         Therefore the total file size would be:
         8,000 * 16 * 30 = 3 840 000 Bits = 480 000 Bytes
                                      https://www.facebook.com/groups/OAComputers/                                           Page 6
COMPUTER SCIENCE
      9608                            ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                          AHMED THAKUR
    1.1.3    SOUND
         Extension: Sound Editing
         If you are interested in sound editing you can start editing your own music using a program called Audacity. Using
         Audacity you can create your own sound samples with different sample rates and sample resolutions, listening to the
         difference between them and noting the
         different file sizes.
        Additional Info
        Sound
        In physics, sound is a vibration that propagates as a typically audible mechanical wave of pressure and displacement,
        through a medium such as air or water. In physiology and psychology, sound is the reception of such waves and their
        perception by the brain.
        OR
        Sound is defined by ANSI/ASA S1.1-2013 as "(a) Oscillation in pressure, stress, particle displacement, particle
        velocity, etc., propagated in a medium with internal forces (e.g., elastic or viscous), or the superposition of such
        propagated oscillation. (b) Auditory sensation evoked by the oscillation described in (a).
        Sound wave properties and characteristics
        Sinusoidal waves of various frequencies; the bottom waves have higher frequencies than those above. The horizontal
        axis represents time.
        Sound waves are often simplified to a description in terms of sinusoidal plane waves, which are characterized by these
        generic properties:
                 Frequency, or its inverse, the period
                 Wavelength
                 Wave number
                 Amplitude
                 Sound pressure
                 Sound intensity
                 Speed of sound
                 Direction
         Frequency is the number of occurrences of a repeating event per unit time. It is also referred to as temporal
          frequency, which emphasizes the contrast to spatial frequency and angular frequency. The period is the duration of
          time of one cycle in a repeating event, so the period is the reciprocal of the frequency. For example, if a newborn
          baby's heart beats at a frequency of 120 times a minute, its period – the interval between beats – is half a second
          (60 seconds (i.e., a minute) divided by 120 beats). Frequency is an important parameter used in science and
          engineering to specify the rate of oscillatory and vibratory phenomena, such as mechanical vibrations, audio
          (sound) signals, radio waves, and light.
                                                                              https://en.wikipedia.org/wiki/Frequency
             The SI unit for period is the second. For counts per unit of time, the SI unit for frequency is hertz (Hz), named
             after the German physicist Heinrich Hertz; 1 Hz means that an event repeats once per second. A previous name for
             this unit was cycles per second (cps).
             A traditional unit of measure used with rotating mechanical devices is revolutions per minute, abbreviated r/min or
             rpm. 60 r/min equals one hertz
                                      https://www.facebook.com/groups/OAComputers/                                             Page 7
COMPUTER SCIENCE
      9608                            ahmed_thakur@hotmail.com, 0300-8268885
     1.1 INFORMATION REPRESENTATION                                                                           AHMED THAKUR
   1.1.3    SOUND
        Wavelength
         In physics, the wavelength of a sinusoidal wave is the spatial period of the wave— the distance over which the
         wave's shape repeats. and the inverse of the spatial frequency. It is usually determined by considering the distance
         between consecutive corresponding points of the same phase, such as crests, troughs, or zero crossings and is a
         characteristic of both traveling waves and standing waves, as well as other spatial wave patterns. Wavelength is
         commonly designated by the Greek letter lambda (λ). The concept can also be applied to periodic waves of non-
         sinusoidal shape. The term wavelength is also sometimes applied to modulated waves, and to the sinusoidal
         envelopes of modulated waves or waves formed by interference of several sinusoid
             In the physical sciences, the wavenumber (also wave number) is the spatial frequency of a wave, either in cycles
             per unit distance or radians per unit distance. It can be envisaged as the number of waves that exist over a specified
             distance (analogous to frequency being the number of cycles or radians per unit time).
        Amplitude
         The amplitude of a periodic variable is a measure of its change over a single period (such as time or spatial
         period). There are various definitions of amplitude (see below), which are all functions of the magnitude of the
         difference between the variable's extreme values. In older texts the phase is sometimes called the amplitude
        Sound pressure
         Sound pressure or acoustic pressure is the local pressure deviation from the ambient (average, or equilibrium)
         atmospheric pressure, caused by a sound wave. In air, sound pressure can be measured using a microphone, and in
         water with a hydrophone. The SI unit of sound pressure is the pascal (Pa)
        Sound Intensity
         Sound intensity or acoustic intensity is defined as the sound power per unit area. The SI unit of sound intensity is
         the watt per square metre (W/m2). The usual context is the noise measurement of sound intensity in the air at a
         listener's location as a sound energy quantity.
             Sound intensity is not the same physical quantity as sound pressure. Hearing is directly sensitive to sound pressure
             which is related to sound intensity. In consumer audio electronics, the level differences are called "intensity"
             differences, but sound intensity is a specifically defined quantity and cannot be sensed by a simple microphone.
             Sound energy passing per second through a unit area held perpendicular to the direction of propagation of sound
             waves is called intensity of sound.
             Sound intensity, denoted I, is defined by
             where
COMPUTER SCIENCE                          https://www.facebook.com/groups/OAComputers/                                           Page 8
           9608                       ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                       AHMED THAKUR
    1.1.3   SOUND
              p is the sound pressure;
              v is the particle velocity.
                 where
             P is the sound power;
             A is the area.
            Both I and v are vectors, which means that both have a direction as well as a magnitude. The direction of sound
            intensity is the average direction in which energy is flowing. The average sound intensity during time T is given by
         Speed of Sound
          The speed of sound is the distance travelled per unit time by a sound wave propagating through an elastic medium.
          The SI unit of the speed of sound is the metre per second (m/s). In dry air at 20 °C, the speed of sound is 343.2
          metres per second (1,126 ft/s). This is 1,236 kilometres per hour (768 mph; 667 kn), or a kilometre in 2.914 s or a
          mile in 4.689 s.
         Direction
          Direction is the information contained in the relative position of one point with respect to another point without the
          distance information. Directions may be either relative to some indicated reference (the violins in a full orchestra
          are typically seated to the left of the conductor), or absolute according to some previously agreed upon frame of
          reference (New York City lies due west of Madrid). Direction is often indicated manually by an extended index
          finger or written as an arrow. On a vertically oriented sign representing a horizontal plane, such as a road sign,
          "forward" is usually indicated by an upward arrow. Mathematically, direction may be uniquely specified by a unit
          vector, or equivalently by the angles made by the most direct path with respect to a specified set of axes.
                                     https://www.facebook.com/groups/OAComputers/                                             Page 9
COMPUTER SCIENCE
      9608                           ahmed_thakur@hotmail.com, 0300-8268885
      1.1 INFORMATION REPRESENTATION                                                                         AHMED THAKUR
    1.1.3   SOUND
        Decibel
        The decibel (dB) is a logarithmic unit that expresses the ratio of two values of a physical quantity, often power or
        intensity. One of these quantities is often a reference value and in this case the decibel expresses the absolute level of
        the physical quantity. The number of decibels is ten times the logarithm to base 10 of the ratio of two power quantities,
        or of the ratio of the squares of two field amplitude quantities. One decibel is one tenth of one bel, named in honor of
        Alexander Graham Bell; however, the bel is seldom used.
                                     https://www.facebook.com/groups/OAComputers/                                             Page 10
COMPUTER SCIENCE
      9608                           ahmed_thakur@hotmail.com, 0300-8268885