L 19 Electronic Sound- Analog and Digital. Electronics in Music 1.Intro 2.Basic Analog Electronics 3.Digital Audio.

Slides:



Advertisements
Similar presentations
Analog Representations of Sound Magnified phonograph grooves, viewed from above: When viewed from the side, channel 1 goes up and down, and channel 2 goes.
Advertisements

Adam Diel.  In 1981 IBM PC 150 introduced the first PC Speaker.  Each game had to write support for it (sound cards were impractical during this time)
Tamara Berg Advanced Multimedia
Sound in multimedia How many of you like the use of audio in The Universal Machine? What about The Universal Computer? Why or why not? Does your preference.
Sound can make multimedia presentations dynamic and interesting.
4.1Different Audio Attributes 4.2Common Audio File Formats 4.3Balancing between File Size and Audio Quality 4.4Making Audio Elements Fit Our Needs.
Time-Frequency Analysis Analyzing sounds as a sequence of frames
Chapter 5-Sound.
I Power Higher Computing Multimedia technology Audio.
SWE 423: Multimedia Systems Chapter 3: Audio Technology (2)
Speech Compression. Introduction Use of multimedia in personal computers Requirement of more disk space Also telephone system requires compression Topics.
Eee116j1 1 Digital Information Engineering Science EEE116J1 Prof Paul Maguire w.
4-Integrating Peripherals in Embedded Systems (cont.)
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
Comp 1001: IT & Architecture - Joe Carthy 1 Review Floating point numbers are represented in scientific notation In binary: ± m x 2 exp There are different.
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.
Digital Representation of Audio Information Kevin D. Donohue Electrical Engineering University of Kentucky.
Image and Sound Editing Raed S. Rasheed Sound What is sound? How is sound recorded? How is sound recorded digitally ? How does audio get digitized.
Chapter 2: Fundamentals of Data and Signals. 2 Objectives After reading this chapter, you should be able to: Distinguish between data and signals, and.
Chapter 1: Introduction Business Data Communications, 4e.
SIMS-201 Representing Information in Binary. 2  Overview Chapter 3: The search for an appropriate code Bits as building blocks of information Binary.
How CD’s Work Speros Shepherd The Anatomy of a CD Piece of simple plastic- 4/100 of an inch thick Injection-molded, clear, polycarbonate piece of.
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.
Analogue and Digital Signals SL – Option C.1. Signals When talking about electronics we will talk about ‘signals’ –This is simply the transfer of information.
1 Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET201.
Digital audio. In digital audio, the purpose of binary numbers is to express the values of samples that represent analog sound. (contrasted to MIDI binary.
Media File Formats Jon Ivins, DMU. Text Files n Two types n 1. Plain text (unformatted) u ASCII Character set is most common u 7 bits are used u This.
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?
Digital Sound and Video Chapter 10, Exploring the Digital Domain.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
COMP Representing Sound in a ComputerSound Course book - pages
CSCI-235 Micro-Computers in Science Hardware Part II.
Audio. Why Audio Essential tool for – Interface – Narrative – Setting & Mood.
1 4-Integrating Peripherals in Embedded Systems (cont.)
 Refers to sampling the gray/color level in the picture at MXN (M number of rows and N number of columns )array of points.  Once points are sampled,
 Around billion CDs have been sold all over the world  CD’s revolutionized the way that data could be stored and moved  DVDs replaced VHS  CDs.
A CD is a fairly simple piece of plastic, about (1.2 mm) thick. Most of a CD consists of an injection-moulded piece of clear polycarbonate plastic. During.
Storage Devices: CD-ROM Drives Copyright © Texas Education Agency, All rights reserved. 1 Computer Maintenance.
Chapter 11 Audio © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
Analogue and Digital Signals SL – Option C.1 HL – Core 14.1.
Overview of Multimedia A multimedia presentation might contain: –Text –Animation –Digital Sound Effects –Voices –Video Clips –Photographic Stills –Music.
Compact Discs Rebecca Martin May The CD in General Invented in 1980s Used to hold music, data, or computer software Cheap and easy to distribute.
STORAGE DEVICES Presentation By: Saurabh Mishra. A data storage device is a device for recording (storing) information (data). CD, Hard Disk and Flash.
Multimedia Technology and Applications Chapter 2. Digital Audio
Sound element Week - 11.
Multimedia ITGS. Multimedia Multimedia: Documents that contain information in more than one form: Text Sound Images Video Hypertext: A document or set.
1 Introduction to Computers By Masseta ICT Dept. Mzumbe University.
HOW CDs WORK ? By Attapon Ashinetongkhum Paveen Suwannawat Surawut Suntalodom Pipat Shutishupibul Pipatpong Tuntivaranon.
How Analog and Digital Recording Works Analog converted to digital via an ADV (Analog to Digital Converter = stream of numbers) On playback: digital converted.
IMGD-1001 The Game Development Process Game Audio (Content by professor Brian Moriarty)
Digital Recording. Digital recording is different from analog in that it doesn’t operate in a continuous way; it breaks a continuously varying waveform.
Analogue & Digital. Analogue Sound Storage Devices.
Introduction to Digital Media. What is it? Digital media is what computers use to; Store, transmit, receive and manipulate data Raw data are numbers,
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
1 Lecture 14 - Digital Audio Turning sound into bits, and bits back into sound.
CSCI-100 Introduction to Computing Hardware Part II.
Chapter 1 Background 1. In this lecture, you will find answers to these questions Computers store and transmit information using digital data. What exactly.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
1 Digital Audio Turning sound into bits, and bits back into sound.
CD and DVD Technology using laser light to reproduce music and movies.
Concepts of Engineering and Technology Copyright © Texas Education Agency, All rights reserved. 1.
Engr: Sajida Introduction to computing Optical storage The storage devices which use laser to read data from or write data to the reflective surface store.
Properties of Sound Sound is caused by the disturbance of air molecules by an object that sets those molecules in motion. Those molecules travel in waves.
Analogue & Digital.
Web Design and Development
Digital Music Scott Bennett 1/3/2019.
COMS 161 Introduction to Computing
Presentation transcript:

L 19 Electronic Sound- Analog and Digital

Electronics in Music 1.Intro 2.Basic Analog Electronics 3.Digital Audio

Edison Phonograph

Cylindrical Phonogram (Thomas Edison 1877 ) (Youtube video)

Acoustic Recording Session ca. 1920

Voltage (Potential Drop) The potential energy an electron has divided by its charge

Ohm’s Law The current (charge per unit time) flowing through a circuit element is equal to the potential drop across this element divided by the resistance of the element. I= V/R

I VR Suppose the current is 3 A and the voltage is 6 V. What it the resistance? a)3  b)2  c)1/2  d) 1/3 

Alternating Current (AC)

Power Amplifier Driving Loudspeaker V I Z = 8  AmplifierSignal Source Speaker

26 Capturing Sound Waves

Dynamic Microphone or Moving Coil Loudspeaker

Moving Coil Loudspeaker

Demo: Eddy Current

Digital Electronics Introduction to Binary Numbers

We can write the number 752 as 2x x x10 2 Similarly, we could use the base 2 instead of 10, e.g. 3 = 1x x2 1, which we represent as 11. Hence the binary 01 is our old friend 2. Keep in mind that the numbers written are the coefficients of 10 0, 10 1, etc. 11 and 01 are called 2-binary digit (bit) numbers.

Note the possible combinations of 2 bits: 00 = 0 01 = 2 10 = 1 11 = 3, 4 possible combinations = 2 n where n= # of bits

Some examples of 4-bit binary numbers The 2 nd of these binary numbers, for example, corresponds to the number 0x x x x2 3 = 2 Note that there are 2 4 = 16 possible combinations for a 4-bit binary number.

Note also that we have chosen the sequence as the coefficient of 2 0 first, then 2 1, then 2 2, etc. This convention is used by many electrical engineers, but it is arbitrary (e.g. Wikipedia uses the opposite convention).

35 Digital Audio - What is it? Really a method to capture and transform audio signals for the purpose of storage, transmission, manipulation, and playback Digital Approximation of the real event and sound waves Requires A/D and D/A Converters – Devices used to change analog to digital and back again. – These are generally found on computer sound cards A/D converters perform sampling of waveforms D/A converters convert digital data back into a waveform Employ various forms of encoding and decoding the bit stream using CODECS (Compressor/De-compressors)

Digital Sampling

Suppose we wish to represent a complex wave form digitally. We will now introduce the concept of sampling the wave form. The idea is to measure the amplitude at various times during the cycle and represent those amplitudes digitally.

Analog to Digital Recording Chain ADC Continuously varying electrical energy is an analog of the sound pressure wave. Microphone converts acoustic to electrical energy. It’s a transducer. ADC (Analog to Digital Converter) converts analog to digital electrical signal. Digital signal transmits binary numbers. DAC (Digital to Analog Converter) converts digital signal in computer to analog for your headphones.

Analog versus Digital Analog Continuous signal that mimics shape of acoustic sound pressure wave Digital Stream of discrete numbers that represent instantaneous amplitudes of analog signal, measured at equally spaced points in time.

[a.k.a. “sample word length,” “bit depth”] Precision of numbers used for measurement: the more bits, the higher the resolution. Example: 16 bit Analog to Digital Overview Sampling Rate How often analog signal is measured Sampling Resolution [samples per second, Hz] Example: 44,100 Hz

Common Sampling Rates Sampling RateUses 44.1 kHz (44100)CD, DAT 48 kHz (48000)DAT, DV, DVD-Video 96 kHz (96000)DVD-Audio kHz (22050)Old samplers Most software can handle all these rates. Which rates can represent the range of frequencies audible by (fresh) ears?

Common Sampling Resolutions Word lengthUses 8-bit integerLow-res web audio 16-bit integerCD, DAT, DV, sound files 24-bit integerDVD-Video, DVD-Audio 32-bit floating point Software (usually only for internal representation)

3-bit Quantization A 3-bit binary (base 2) number has 2 3 = 8 values A rough approximation Amplitude Time — measure amp. at each tick of sample clock

4-bit Quantization A 4-bit binary number has 2 4 = 16 values Amplitude A better approximation Time — measure amp. at each tick of sample clock

47 Low Quality Sampling (low-res)

48 Low Quality Results

49 Higher Quality

50 Even higher quality

51 The Nyquist Theorem This theorem holds that in order to preserve a reasonable representation of a waveform it must be sampled at least twice at its highest frequency Since the limits of human hearing are around 22khz (22,000 cycles per second), the sampling for CDs was established at 44.1 khz….

A “sampler” which we describe might have 16 bits, in which case the number of possible combinations is 2 16 = 65,536 This enables us to represent 65,536 sample amplitudes (in actuality, half of these are used for the positive amplitudes, the other half for the negative ones).

16-bit Sample Word Length A 16-bit integer can represent 2 16, or 65,536, values (amplitude points). We typically use signed 16-bit integers, and center the 65,536 values around 0. 32, ,768 0

A digital computer represents data using the binary numeral system. Text, numbers, pictures, audio, and nearly any other form of information can be converted into a string of bits, or binary digits, each of which has a value of 1 or 0. The most common unit of storage is the byte, equal to 8 bits. A piece of information can be handled by any computer whose storage space is large enough to accommodate the binary representation of the piece of information, or simply data. For example, using eight million bits, or about one megabyte, a typical computer could store a short novel.digital computerdatabinary numeral systembitsbytedatamegabyte

We now calculate the bit rate and file size for 16 bit “resolution”.

Calculating Bit-rates (CD quality) Sampling Rate xResolutionx # of Channels =Bit-rate 44,100x16x2=1,411,200 Calculating File Sizes (one minute of CD audio) Sampling Rate xResolutionx Number of Channels x Time in Seconds / Bits / Byte = File Size (in Bytes) 44,100x16x2x60/8=10,584,000 MP3 compression at 128 kbps compresses this by a factor of 11

For the ultimate in high-fidelity, you might want to sample five 20-bit channels at 44,100 Hz. What is the bit rate? a)4.4 kbps b)44 kbps c)440 kbps d) 4.4 Mbps In this case, how big of a file is 40 minutes of uncompressed audio? a)13 Gbytes b)1.3 Gbytes c)130 Mbytes d)13 Mbytes

Audio File Size CD characteristics… - Sampling rate: 44,100 samples per second (44.1 kHz) How big is a 5-minute CD-quality sound file? - Sample word length: 16 bits (i.e., 2 bytes) per sample - Number of channels: 2 (stereo)

DAC: Sample and Hold To reconstruct analog signal, hold each sample value for one clock tick; convert it to steady voltage Amplitude Time

DAC: Smoothing Filter Apply an analog low-pass filter to the output of the sample-and- hold unit: averages “stair steps” into a smooth curve Amplitude Time

61 CD’s and your Computer CD standard is 16 bits at 44.1 KHz. Using CD Ripper software, you can take digital data from the CD which is in.cda format and convert it to.wav or MP3 format all in the digital domain Not dependent upon the sound card capabilities The sound file contains all the music but the vast number of samples makes such files big Approx: 10 Mbytes per stereo minute

62 Digital Compression Concepts Compression techniques are used to replace a file with another that is smaller Decompression techniques expands the compressed file to recover the original data -- either exactly or in facsimile A pair of compression/decompression techniques that work together is called a codec for short

63 What is MP3? (Motion Pictures Experts Group Layer 3) MP3 is a compression system developed specifically for music. It had its birth as a result of the desire to send music over the internet It reduces the amount of data on a CD without “hurting” the sound of the music too much It actually achieves a data reduction of about 90%! It achieves this dramatic reduction by eliminating things that our ears don’t hear very well – soft sounds that are masked by louder sounds – frequencies that are outside of our hearing range – frequencies that we don’t hear well – advanced compression techniques

64 MP3 Takes Advantage of the theory that There are certain sounds that the human ear cannot hear. There are certain sounds that the human ear hears much better than others. If there are two sounds playing simultaneously, we hear the louder one but often cannot hear the softer one

MP 3 Compression

If we want compression without loss, we use systems like ZIP. This is very effective compression data files that hold plenty of redundant information. This could be Microsoft Word documents, they often zip very well. And when you unzip them, the document is identical to the original. You find similar compression within GIF and PNG graphics files, which compress many graphic images very well (but not photos). However you do not find much redundant information in music files. A zip compression of raw music data (WAV files) may only yield 10% reduction in file size. Therefore we use a lossy encoding to reduce the music files sizes. Lossy encoding mean that we take away music information (just as JPEG encoding take away image information from a photo). The goal is to remove music details you would not hear anyway!

The most important principle in MP3 compression is the psychoacustic selection of sound signals to cut away. Those signals, we are unable to hear are removed. These include weaker sounds that are present but are not heard because they are drowned out (masked) by louder instruments/sounds. Many encoders use the fact that the human ear is most sensitive to midrange sound frequencies (1 to 4 KHz). Hence sound data within this range is left unchanged. Another compression used is to reduce the stereo signal into mono, when the sound waves are so deep, that the human ear cannot register the direction. Also the contents of common information in the two stereo channels is compressed. The Huffman algorithm reduces the file size by optimizing the data code for the most often used signals. This is a lossless compression working within the MP3 system.

68 MP3 is a Lossy Compression System

69 MP3 Files continued MP3 files are an average of 3-5 megabytes vs. CD files of 30 megabytes for the same song Easy to transmit over the internet Easy to store on portable devices They are an approximation of the original CD which in turn is a reasonable approximation of the real sound

70 Format Comparison CD Standard = 16 Bits at 44.1Khz Professional Digital Recording Standards – 16 or 24 Bits at 44.1Khz, 48Khz, 96Khz Wav – Probably the most common format and used by windows programs to capture CD music to a hard drive. Real representation or “Pits to Bits” but files are large MP3 – About 1/10 the size, 1meg/stereo minute compared to 10meg for the original and called near CD quality WMA – New windows format that boasts higher quality than MP3 with similar sample rates or same quality with lower sample rate and smaller file sizes MP4 – A new standard that allows for synchronized video and audio and can compete with WMA. It is non-proprietary MIDI- is not a digital audio file format per se but a language for creating electronic sounds using devices that understand that language

71 MIDI Instruments and Devices (Musical Instrument Digital Interface) MIDI is a standard interface between electronic musical instruments and synthesizers Devices which are MIDI-compatible can communicate with each other Advantages to MIDI – files are encoded and are much smaller than digitized sound files – files can be easily edited and mixed for multiple tracks

72 Summary Digital sound is produced by sampling sound waves over time A digital sound file consists of sampled amplitudes at a number of discrete times within a given time interval The number of samples per second is called the sample rate The number of bits devoted to storing individual sampled amplitudes is called the resolution of the digitized sound: 8- bit, 16-bit and higher resolutions are used depending on the kind of sound being digitized Fidelity will be largely determined by the sample rate and resolution

Analog/Digital Conversions 1.Microphone converts sound into an electrical signal 2.Anti-Alias “Brick Wall” filter removes very high frequencies from signal. 3.ADC periodically measures (samples) the amplitude of the analog signal, sending a stream of numbers to CPU. 4.DAC converts a stream of numbers into a stepped analog signal. 5.Smoothing filter removes staircase shape from signal. A Basic Digital Audio Setup Acoustical to Electrical to Digital (numerical) and back

Compact Discs (CD’s)

A CD is a fairly simple piece of plastic, about four one- hundredths (4/100) of an inch (1.2 mm) thick. Most of a CD consists of an injection-molded piece of clear polycarbonate plastic. During manufacturing, this plastic is impressed with microscopic bumps arranged as a single, continuous, extremely long spiral track of data. We'll return to the bumps in a moment. Once the clear piece of polycarbonate is formed, a thin, reflective aluminum layer is sputtered onto the disc, covering the bumps. Then a thin acrylic layer is sprayed over the aluminum to protect it. The label is then printed onto the acrylic. A cross section of a complete CD (not to scale) looks like this: Cross-section of a CD

The elongated bumps that make up the track are each 0.5 microns wide, a minimum of 0.83 microns, they look something like this:

You will often read about "pits" on a CD instead of bumps. They appear as pits on the aluminum side, but on the side the laser reads from, they are bumps. The incredibly small dimensions of the bumps make the spiral track on a CD extremely long. If you could lift the data track off a CD and stretch it out into a straight line, it would be 0.5 microns wide and almost 3.5 miles (5 km) long! To read something this small you need an incredibly precise disc-reading mechanism. Let's take a look at that. CD Player Components The CD player has the job of finding and reading the data stored as bumps on the CD. Considering how small the bumps are, the CD player is an exceptionally precise piece of equipment. The drive consists of three fundamental components: A drive motor spins the disc. This drive motor is precisely controlled to rotate between 200 and 500 rpm depending on which track is being read. A laser and a lens system focus in on and read the bumps. A tracking mechanism moves the laser assembly so that the laser's beam can follow the spiral track. The tracking system has to be able to move the laser at micron resolutions.laser

How Does a CD Work?

More on CDs 750 Mbytes 75 minutes of audio Link: “how Edison got his groove back”

What the CD Player Does: Laser Focus Inside the CD player, there is a good bit of computer technology involved in forming the data into understandable data blocks and sending them either to the DAC (in the case of an audio CD) or to the computer (in the case of a CD- ROM drive). The fundamental job of the CD player is to focus the laser on the track of bumps. The laser beam passes through the polycarbonate layer, reflects off the aluminum layer and hits an opto-electronic device that detects changes in light. The bumps reflect light differently than the "lands" (the rest of the aluminum layer), and the opto-electronic sensor detects that change in reflectivity. The electronics in the drive interpret the changes in reflectivity in order to read the bits that make up the bytes.CD- ROM drive lightbitsbytes

A CD has a single spiral track of data, circling from the inside of the disc to the outside. The fact that the spiral track starts at the center means that the CD can be smaller than 4.8 inches (12 cm) if desired, and in fact there are now plastic baseball cards and business cards that you can put in a CD player. CD business cards hold about 2 MB of data before the size and shape of the card cuts off the spiral. What the picture on the right does not even begin to impress upon you is how incredibly small the data track is -- it is approximately 0.5 microns wide, with 1.6 microns separating one track from the next. (A micron is a millionth of a meter.) And the bumps are even more miniscule...

What the CD Player Does: Tracking The hardest part is keeping the laser beam centered on the data track. This centering is the job of the tracking system. The tracking system, as it plays the CD, has to continually move the laser outward. As the laser moves outward from the center of the disc, the bumps move past the laser faster -- this happens because the linear, or tangential, speed of the bumps is equal to the radius times the speed at which the disc is revolving (rpm). Therefore, as the laser moves outward, the spindle motor must slow the speed of the CD. That way, the bumps travel past the laser at a constant speed, and the data comes off the disc at a constant rate.