Course:PHYS341/2018/Calendar/Lecture07

From UBC Wiki

Phys341 Lecture 07: Summary and web references

2018.01.17

Textbook: -

Slide List

  1. Measuring sound
    • Sound waves arriving at a point in space cause the local air pressure to oscillate up and down around its mean value tens to thousands of times per second
    • The amplitude of these oscillations is tiny compared to standard air pressure
    • The oscillating pressure difference is called the acoustic pressure
    • This pressure is measured by a microphone
    • Many ways of doing this
    • Small, cheap microphones are usually of the electret type
    • A small diaphragm oscillates in response to the changing pressure and produces a small electrical signal which can be transmitted along a wire and amplified, or recorded, or both
    • The ratio of voltage signal to acoustic pressure is called the microphone’s sensitivity
  2. ADCs and FFTs
    • Analog-digital conversion (ADC):
    • The process by which an analog signal (microphone output, varying rapidly in time) gets converted into a time-series of numbers that a computer can store and analyze.
    • Fast fourier transform (FFT):
    • The process by which the time series of numbers from the ADC get converted into a frequency spectrum.
    • This is what your ear does directly.
    • The frequency spectrum also varies in time but at a much slower rate than acoustic pressure in a sound wave.
    • The FFT is call “fast” because of the invention of an ultra-efficient computer algorithm in 1965 that sped the process up a million times, making it feasible to do without a super-computer.
  3. Binary numbers
    • Computers work with binary numbers; the only digits allowed are 0 and 1.
    • These are “bits” of information.
    • With 2 bits one can count from 0 to 3: 000,001,010,011 (22 = 4 possibilities)
    • With 16 bits one can count from 0 to 65,535 (216 = 65,536 possibilities)
    • How many bits do we need to describe sound?
    • How good are our ears?
  4. Digitization
    • This physical wave (blue) is being represented by a 5-bit number (red).
    • • 32 possibilities, 16 positive and 16 negative.
    • • The smallest signal that can be seen this way has an amplitude of 1; the largest, 16.
    • • The more bits, the more faithful will be the representation, and the bigger the possible dynamic range.
  5. Recording sound
    • Microphone output voltages easy to measure and convert to a recordable digital form.
    • We hear sound up to 20,000 Hz, so the measurement has to be done at least 40,000 times a second (one crest, one trough per wave period).
    • The range of numbers used to represent the signal has to be great enough to encompass the dynamic range of the human ear (from the quietest sounds we can hear to the loudest sounds we can tolerate), which is very large.
    • 65,536 (216) is the minimum (“16 bits”) - more later
    • 16 bits with a sampling rate of 44.1 kHz* is “CD-quality”.
    • These speed and storage requirements are trivial for modern personal computers, although “compression” is used to reduce file sizes – more later.
      1. there is a lot of 1970s technical history behind the reason why this is not a nice round number like 40 kHz.
  6. Extracting frequency components
  7. FFT of the waveform
  8. The big trade-off
    • Short measuring time, good time resolution, poor frequency resolution.
    • Long measuring time, poor time resolution, good frequency resolution.
    • For musicians:
    • Long notes need to be better in tune than short notes.
    • (For physicists:
    • This is direct analogy with Heisenberg’s Uncertainty Principle:
    • Know the time of an event accurately, poor knowledge of the energy, and vice versa.
    • In quantum mechanics, energy and frequency go hand-in-hand.)
  9. How to choose analysis time
    • FFTs analyze data in time-slices consisting of 2n samples (n is an integer).
    • i.e. you have a choice of, say, 4096, 8192, 16384, etc. samples (called the “FFT size”).
    • At a sample rate of 44.1 kHz, 4096 samples represent about 1/10 second, so the frequency resolution is about 10 Hz.
    • At a sample rate of 44.1 kHz, 16384 samples represent about 1/3 second, so the frequency resolution is about 3 Hz.
    • How good does the frequency resolution have to be?
    • Compare with a musical semitone – 6%, i.e. 26 Hz at 440 Hz (concert A).
    • Sometimes it helps to lower the sample rate (“Project Rate” in Audacity) to improve the resolution for the same FFT size.
  10. Recording/editing with audacity http://www.audacityteam.org/
  11. Sonograms