Audio Digitization Lecture Notes PDF

Document Details

RealizableRapture9447

Uploaded by RealizableRapture9447

Dr. Jiangchuan Liu and Xiaochuan Chen

Tags

audio digitization multimedia systems pulse code modulation sound waves

Summary

These lecture notes cover audio digitization, including sampling rate, quantization, and Pulse Code Modulation (PCM). They explain the concepts and differences, including musical instrument digital interface (MIDI).

Full Transcript

Audio Edited from slides by Dr. Jiangchuan Liu and Xiaochuan Chen, CMPT365 Multimedia Systems Agenda Human auditory system Audio Signals Sampling Quantization Pulse Code Modulation (PCM) Musical Instrument Digital Interface (MIDI) What is SOUND? ! Sound is...

Audio Edited from slides by Dr. Jiangchuan Liu and Xiaochuan Chen, CMPT365 Multimedia Systems Agenda Human auditory system Audio Signals Sampling Quantization Pulse Code Modulation (PCM) Musical Instrument Digital Interface (MIDI) What is SOUND? ! Sound is a wave phenomenon, involving molecules of air being compressed and expanded under the action of some physical device. History Thomas Edison's Phonograph 1877 first device to record and reproduce sound Medium: a tinfoil sheet phonograph cylinder. ! ! ! ! ! ! ! ! Alexander Graham Bell's improvement in 1880s How! Sound Works The sound generator vibrates back and forth and produces a longitudinal pressure wave that perceived as sound. How! Sound Works The sound generator vibrates back and forth and produces a longitudinal pressure wave that perceived as sound. Physical World is often Analog Sound Waves Sound Waves Sound Waves ! Since sound is a pressure wave, it takes on continuous values, as opposed to digitized ones. If we wish to use a digital version of sound waves, we must form digitized representations of audio information. Digitization 1-dimensional nature of sound: amplitude (sound pressure/level) depend on a 1D variable, the time. Digitization is the conversion to a stream of numbers, and preferably these numbers should be integers for efficiency. Digitization cont’d Digitization must be in both time and amplitude Sampling: measuring the quantity we are interested in, usually at evenly-spaced intervals First kind of sampling, using measurements only at evenly spaced time intervals, is simply called sampling. Sampling in the amplitude or voltage dimension is called quantization For audio, typically from 8 kHz (8,000 samples per second) to 48 kHz Sampling and Quantization Audio Digitization (PCM) Parameters in Digitizing To decide how to digitize audio data we need to answer the following questions: 1. What is the sampling rate? 2. How finely is the data to be quantized? 3. How is audio data formatted? Sampling Rate Signals can be decomposed into a sum of sinusoids. Weighted sinusoids can build up quite a complex signals ! Sampling Rate cont’d If sampling rate just equals the actual frequency: a false signal (constant ) is detected Sampling Rate cont’d If sample at 1.5 times the actual frequency : an incorrect (alias) frequency that is lower than the correct one Sampling Rate cont’d For correct sampling we must use a sampling rate equal to at least twice the maximum frequency content in the signal. This rate is called the Nyquist rate. Quantization (Pulse Code Modulation) At every time interval the sound is converted to a digital equivalent Example: Tel: 8 bits or CD: 16 bits Quantization (Pulse Code Modulation) At every time interval the sound is converted to a digital equivalent Example: Tel: 8 bits or CD: 16 bits Quantization (Pulse Code Modulation) At every time interval the sound is converted to a digital equivalent Example: Tel: 8 bits or CD: 16 bits Quantization (Pulse Code Modulation) At every time interval the sound is converted to a digital equivalent Example: Tel: 8 bits or CD: 16 bits Signal-to-Noise Ratio MIDI: Musical Instrument Digital Interface Use the sound card’s defaults for sounds: use a simple scripting language and hardware setup called MIDI. MIDI Overview a) MIDI is a scripting language — it codes “events” that stand for the production of sounds. E.g., a MIDI event might include values for the pitch of a single note, its duration, and its volume. b) MIDI is a standard adopted by the electronic music industry for controlling devices, such as synthesizers and sound cards, that produce music. Midi: https://www.youtube.com/watch?v=SUUxmJ84dnI Example: https://onlinesequencer.net/#263068 MIDI Channels (a) There are 16 channels numbered from 0 to 15. The channel forms the last 4 bits (the least significant bits) of the message. (b) Usually a channel is associated with a particular instrument: e.g., channel 1 is the piano, channel 10 is the drums, etc. (c) Nevertheless, one can switch instruments midstream, if desired, and associate another instrument with any channel. MIDI Terminology Synthesizer Sequencer MIDI Keyboard MIDI Synthesizer Was, and still can be, a stand-alone sound generator that can vary pitch, loudness, and tone color. Units that generate sound are referred to as tone modules or sound modules. https://webaudiodemos.appspot.com/midi-synth/index.html MIDI Sequencer Started off as a special hardware device for storing and editing a sequence of musical events, in the form of MIDI data. Now it is more often a software music editor on the computer. https://onlinesequencer.net/#258643 MIDI Keyboard Produces no sound, instead generating sequences of MIDI instructions, called MIDI messages MIDI messages are rather like assembler code and usually consist of just a few bytes Music Note parameters Stages of amplitude versus time for a music note Wave Types Sine Wave Square Wave Triangle Wave Sawtooth Wave Fun use of Audio ! Can I hear ultrasonic ringtones ? http:// www.ultrasonic-ringtones.com/ Mosquito Ringtones (>17Khz, not auditable by 30+ age) http://www.noiseaddicts.com/2011/06/mosquito-ringtones/ http://www.freemosquitoringtones.org/ Thanks,

Use Quizgecko on...
Browser
Browser