Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.

Slides:



Advertisements
Similar presentations
Introduction to Digital Audio
Advertisements

Digital Signal Processing
CMPS1371 Introduction to Computing for Engineers PROCESSING SOUNDS.
Information Sources & Signals
The frequency spectrum
4-Integrating Peripherals in Embedded Systems (cont.)
Analog to Digital Conversion. 12 bit vs 16 bit A/D Card Input Volts = A/D 12 bit 2 12 = Volts = Volts = 2048 −10 Volts = 0 Input Volts.
From the air to the iPod. Minute disturbances in the air, caused by a vibrating object Air molecules bunch together, then spread out Changes in density.
Presented by- Md. Bashir Uddin Roll: Dept. of BME KUET, Khulna-9203.
Lecture 9: D/A and A/D Converters
SIMS-201 Characteristics of Audio Signals Sampling of Audio Signals Introduction to Audio Information.
IT-101 Section 001 Lecture #8 Introduction to Information Technology.
Digital Audio.
CHAPTER 5 Discrete Sampling and Analysis of Time-Varying Signals Analog recording systems, which can record signals continuously in time, digital data-acquisition.
Chapter 2 : Business Information Business Data Communications, 4e.
Fundamentals of Digital Audio. The Central Problem n Waves in nature, including sound waves, are continuous: Between any two points on the curve, no matter.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
Representing Sound in a computer Analogue  Analogue sound is produced by being picked up by a transducer (microphone) and converted in an electrical current.
Computer Science 101 Introduction to Programming with Sounds.
Introduction to Sound Sounds are vibrations that travel though the air or some other medium A sound wave is an audible vibration that travels through.
Audio Fundamentals Lesson 2 Sound, Sound Wave and Sound Perception
LE 460 L Acoustics and Experimental Phonetics L-13
Digital Audio What do we mean by “digital”? How do we produce, process, and playback? Why is physics important? What are the limitations and possibilities?
Computer Science 121 Scientific Computing Winter 2014 Chapter 13 Sounds and Signals.
School of Informatics CG087 Time-based Multimedia Assets Sampling & SequencingDr Paul Vickers1 Sampling & Sequencing Combining MIDI and audio.
Ni.com Data Analysis: Time and Frequency Domain. ni.com Typical Data Acquisition System.
Fall 2004EE 3563 Digital Systems Design Audio Basics  Analog to Digital Conversion  Sampling Rate  Quantization  Aliasing  Digital to Analog Conversion.
Sampling Terminology f 0 is the fundamental frequency (Hz) of the signal –Speech: f 0 = vocal cord vibration frequency (>=80Hz) –Speech signals contain.
Key terms Sampling rate – how often we read the value of the signal Resolution – the separation between “levels” for our samples (can we read the value.
Radio production worktext.  Analog to Digital  Analog signal – continuously variable electrical signal whose shape is determined by the shape of the.
Lecture # 22 Audition, Audacity & Sound Editing Sound Representation.
COMP Representing Sound in a ComputerSound Course book - pages
Lecture 5: Signal Processing II EEN 112: Introduction to Electrical and Computer Engineering Professor Eric Rozier, 2/20/13.
CSC361/661 Digital Media Spring 2002
1 4-Integrating Peripherals in Embedded Systems (cont.)
Computer Some basic concepts. Binary number Why binary? Look at a decimal number: 3511 Look at a binary number: 1011 counting decimal binary
Announcements Chapter 11 for today No quiz this week Instructor got behind…. We'll be back in MGH389 on Friday.
Media Representations - Audio
Professor: Dr. Miguel Alonso Jr.
Basics of Digital Audio Outline  Introduction  Digitization of Sound  MIDI: Musical Instrument Digital Interface.
COSC 1P02 Introduction to Computer Science 4.1 Cosc 1P02 Week 4 Lecture slides “Programs are meant to be read by humans and only incidentally for computers.
CIS-325: Data Communications1 CIS-325 Data Communications Dr. L. G. Williams, Instructor.
Introduction to SOUND.
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
1 Rev 07/28/2015.  Describe: examples, definition,? 2.
Sound and Digital Sound v © Allan C. Milne Abertay University.
Encoding and Simple Manipulation
1 Data-Converter Circuits A/D and D/A Chapter 9 1.
1 What is Multimedia? Multimedia can have a many definitions Multimedia means that computer information can be represented through media types: – Text.
ECE 101 An Introduction to Information Technology Analog to Digital Conversion.
Digital Audio I. Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul.
Design of a Guitar Tab Player in MATLAB Background Lecture
Physical characteristics of sound Amplitude – The measure of displacement of the air pressure wave Frequency – Represents the number of periods.
Introduction to Digital Audio
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
The Physics of Sound.
COMPUTER NETWORKS and INTERNETS
Analog to digital conversion
Multimedia Systems and Applications
Introduction to Digital Audio
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Fundamentals Data.
MECH 373 Instrumentation and Measurements
Introduction to Digital Audio
Introduction to Digital Audio
Introduction to Digital Audio
COMS 161 Introduction to Computing
Introduction to Digital Audio
Presentation transcript:

Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.

Recall transducer concept convert input signal into numbers. Signal: a quantity that changes over time – Body temperature – Air pressure (sound) – Electrical potential on skin (electrocardiogram) – Seismological disturbances – Stock prices Intro to Sounds & Signals

We will study audio signals (sounds), but the same issues apply across a broad range of signal types. Two different approaches to doing the same thing: – Commercial GUI program (Audacity, Pro Tools) – Programmatic (Python) Intro to Sounds & Signals

13.1 Basics of Computer Sound >>> x, fs, bits = wavread("fh.wav") >>> len(x) >>> min(x), max(x) ('\x00', '\xff') >>> fs >>> bits 8

Basics of Computer Sound

x contains the sound waveform (signal) – essentially, voltage levels representing transduced air pressure on microphone. fs is the sampling frequency (rate) – how many time per second (Hertz, Hz), did we measure the voltage? bits is the number of bits used to represent each sample.

Questions Why does the sound waveform range from hexadecimal 00 to FF, whereas we plot it as - 1 to +1? – These values are essentially arbitrary. One nice feature of a ±x representation is that zero means silence. But the audio player likes values between 0 and 255. What role does the sampling frequency play in the quality of the sound? – The more samples per second, the closer the sound is to a “perfect” recording.

Questions What happens if we double (or halve) the sampling frequency at playback, and why? What is it about the waveform that determines the sound we're hearing (which vowel), and the speaker's voice?

Questions What is it about the waveform that determines the sound we're hearing (which vowel), and the speaker's voice? – Most of this information is encoded in the frequencies that make up the waveform – roughly, the differences between locations of successive peaks – and not in the actual waveform values themselves. – We can do some useful processing on the “raw” waveform, however – e.g., count syllables:

Syllable Counting by Smoothing and Peak-Picking

Perception and Generation of Sound Sound is the perception of small, rapid vibrations in air pressure on the ear. Simplest model of sound is a function P(t) expressing pressure P at time t: P(t) = A sin(2πft + φ) where A = amplitude (roughly, loudness) f = frequency (cycles per second) φ = phase (roughly, starting point) This is the equation for a pure musical tone (just one pitch)

Perception and Generation of Sound – Inverse of frequency is period (distance between peaks):

Perception and Generation of Sound –E.g., whistling a musical scale:

Transducing and Recording Sound Convert sound pressure to voltage, then digitize voltage into N discrete values in interval [x min, x max ], by sampling at frequency F s. This is done by a analog /digital converter. Another device must pre-amplify sound to match input expectations of a/d converter. N is typically a power of 2, so we can use bits to express sampling precision (minimum 8 for decent quality). This is called quantization. Various things can go wrong if we don't choose these values wisely....

A segment of the sound “OH” transduced to voltage. Top: The preamplifier has been set appropriately so that the analog voltage signal takes up a large fraction of the A/D voltage range. The digitized signal closely resembles the analog signal even though the A/D conversion is set to 8 bits. Bottom: The preamplifier has been set too low. Consequently, there is effectively only about 3 bits of resolution in the digitized signal; most of the range is unused. Transducing and Recording Sound

Figure Clipping of a signal (right) when the preamplifier has been set too high, so that the signal is outside of the −5 to 5 V range of the A/D converter. Transducing and Recording Sound

Aliasing and the Sampling Frequency Someone has an alias when they use more than one name (representation) In the world of signals, this means having more than one representation of an analog signal, because of inadequate sampling frequency Familiar visual aliasing from the movies (when 32 frames per second is too slow) Wagon wheel / propeller going backwards Scan lines appearing on computer screen Inadequate F s can result in aliasing for sounds too....

Aliasing and the Sampling Frequency

Aliasing. A set of samples marked as circles. The three sine waves plotted are of different frequencies, but all pass through the same samples. The aliased frequencies are F +m/∆T, where m is any integer and ∆T is the sampling interval. The sine waves shown are m = 0, m = 1, and m = 2.

Aliasing and the Sampling Frequency Nyquist's Theorem tells us that F s should be at least twice the maximum frequency F max we wish to reproduce. Intuitively, we need two values to represent a single cycle: one for peak, one for valley:

Aliasing in the Time Domain