COMPUTER AUDIO CGDD 4003 What is Sound?  Compressions of air or other media (such as water or metal) from something vibrating  Sounds are made up of.

Slides:



Advertisements
Similar presentations
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)
Advertisements

Tamara Berg Advanced Multimedia
CSE 380 – Computer Game Programming Audio Engineering.
Chapter 5.5 Audio Programming
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.
Part A Multimedia Production Rico Yu. Part A Multimedia Production Ch.1 Text Ch.2 Graphics Ch.3 Sound Ch.4 Animations Ch.5 Video.
Int 2 Multimedia Revision. Digitised Sound Analogue sound recorded from person, or real instruments.
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.
Digital Audio.
Digital audio recording Kimmo Tukiainen. My background playing music since I was five first time in a studio at fourteen recording on my own for six months.
Audio Basic Concepts. Audio in Multimedia Digital Audio: Sound that has been captured or created electronically by a computer In a multimedia production,
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.
Audio Audio is a wave resulting from air pressure disturbance that reaches our eardrum generating the sound we hear. –Humans can hear frequencies in the.
Chapter 5.5 Audio Programming. 2 Audio Programming Audio in games is more important than ever before.
EET 450 Chapter 18 – Audio. Analog Audio Sound is analog Consists of air pressure that has a variety of characteristics  Frequencies  Amplitude (loudness)
Game Audio Mark Peskir November 14, 2005 ITCS 5010.
5. Multimedia Data. 2 Multimedia Data Representation  Digital Audio  Sampling/Digitisation  Compression (Details of Compression algorithms – following.
Chapter 9 Audio.
Chapter 14 Recording and Editing Sound. Getting Started FAQs: − How does audio capability enhance my PC? − How does your PC record, store, and play digital.
Sound Chapter Types of Sound Waveforms MIDI Sound is related to many things in computers but only Wav and MIDI exist in PCs.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
6. Sound/Audio. 2   How computers process sound   How computers synthesize sound   The differences between the two major kinds of audio, namely.
2 Outline Digital music The power of FPGA The “DigitalSynth” project –Hardware –Software Conclusion Demo.
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.
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.
Digital Sound and Video Chapter 10, Exploring the Digital Domain.
1 1 Multimedia. 2 What is SOUND? Sound comprises the spoken word, voices, music and even noise. It is a complex relationship involving: a vibrating object.
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
Chapter 5.5 Audio Programming Lacey Montgomery. 2 Audio Programming Audio in games is more important than ever before - less repetitive - More complex.
Multimedia Technology Digital Sound Krich Sintanakul Multimedia and Hypermedia Department of Computer Education KMITNB.
COMP Representing Sound in a ComputerSound Course book - pages
Art 321 Sound, Audio, Acoustics Dr. J. Parker. Sound What we hear as sound is caused by rapid changes in air pressure! It is thought of as a wave, but.
Media Representations - Audio
CHAPTER SEVEN SOUND. CHAPTER HIGHLIGHTS Nature of sound – Sine waves, amplitude, frequency Traditional sound reproduction Digital sound – Sampled – Synthesized.
CSCE 552 Fall 2012 AI By Jijun Tang. Homework 3 List of AI techniques in games you have played; Select one game and discuss how AI enhances its game play.
Sound and audio. Table of Content 1.Introduction 2.Properties of sound 3.Characteristics of digital sound 4.Calculate audio data size 5.Benefits of using.
Signal Digitization Analog vs Digital Signals An Analog Signal A Digital Signal What type of signal do we encounter in nature?
Modication by tuti 1 LECTURE 7 THE USES OF DIGITAL AUDIO IN MULTIMEDIA.
Overview of Multimedia A multimedia presentation might contain: –Text –Animation –Digital Sound Effects –Voices –Video Clips –Photographic Stills –Music.
Multimedia Technology and Applications Chapter 2. Digital Audio
Games Development Practices Sound Effects & OpenAL CO2301 Games Development 1 Week 15.
Chapter 15 Recording and Editing Sound. 2Practical PC 5 th Edition Chapter 15 Getting Started In this Chapter, you will learn: − How sound capability.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 9 This presentation © 2004, MacAvon Media Productions Sound.
Introduction to SOUND.
Audio / Sound INTRODUCTION TO MULTIMEDIA SYSTEMS Lect. No 3: AUDIO TECHNOLOGY.
IMGD-1001 The Game Development Process Game Audio (Content by professor Brian Moriarty)
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2009.
Encoding and Simple Manipulation
CSCI-100 Introduction to Computing Hardware Part II.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2014.
Sound. Sound Capture We capture, or record, sound by a process called sampling: “measuring” the sound some number of times per second. Sampling rate is.
IMGD-1001 The Game Development Process Class 15 Thursday, 24 September 2009.
CSI-447: Multimedia Systems Chapter 4: Reading Assignment.
Lifecycle from Sound to Digital to Sound. Characteristics of Sound Amplitude Wavelength (w) Frequency ( ) Timbre Hearing: [20Hz – 20KHz] Speech: [200Hz.
XP Practical PC, 3e Chapter 14 1 Recording and Editing Sound.
Chapter 15 Recording and Editing Sound
The Physics of Sound.
Introduction to Multimedia
Introduction to Digital Audio
Sound Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman
Introduction to Digital Audio
Introduction to Digital Audio
Games Development Practices Sound Effects
Assist. Lecturer Safeen H. Rasool Collage of SCIENCE IT Dept.
Introduction to Digital Audio
Recap In previous lessons we have looked at how numbers can be stored as binary. We have also seen how images are stored as binary. This lesson we are.
Digital Audio Application of Digital Audio - Selected Examples
Presentation transcript:

COMPUTER AUDIO CGDD 4003

What is Sound?  Compressions of air or other media (such as water or metal) from something vibrating  Sounds are made up of high frequency and low frequency sounds  Don’t confuse pitch (frequency) with volume!  Volume is measured in decibels (dB)  Frequency in Hertz (Hz) = cycles per second  Humans only hear from 20Hz to 20KHz Frequency Strange Fact! Speed of sound (Air: 340m/s; Water:1,230 m/s; Gold: 3,240m/s):

Spatial Sound  1 Channel – “mono”. Can be split to several speakers; still no direction  2 Channels – “stereo”. Fades from left to right. Can determine direction  5.1 Audio – Common for home theaters  3D Sound? – Video games (PC). Still has time to develop

The Human Side (20Hz-20KHz)

The Equal Loudness Contour Killa Hurts Ouch!

A Note about decibels  A decibel is 1/10 th of a bel  Abbreviated dB  This is the perceived loudness, which increases linearly as power increases exponentially  Something sounds twice as loud?  10·log 10 (2) = 3.01dB  In gaming, volume usually ranges 0.0f-1.0f

Human Perception (InterAural Time Difference)  Sound hits both ears  Difference in time Hits Right Ear First Hasn’t gotten to left yet

How Computers Perceive Sound  Digitization (DAC and ADC)  Computers “listen” to the amplitude a certain number of times per second (sample rate)  44K is CD  22K is good  8K is lame  Computers have to approximate what they heard and assign it a number  4 bits = 16 level to approximate to  16 bits = 2 million levels to approximate to

Original Sound Amplitude (in dB)Frequency

Low Sampling Rate TIME

Low Sampling Rate What the computer hears TIME

High Sampling Rate TIME

High Sampling Rate TIME

2 bits per sample 4 Approximations TIME

StairStep Effect TIME Called “quantization errors”

3 bits per sample 8 Approximations TIME

Less StairStep TIME

Signal to Noise Ratio (SNR)  Represents the quanitization error  8-bits = 128 discrete values (upper-half only)  Sample is rounded up or down  SNR is 256:1  256:1 translates to 48dB (difference in average noise to max signal)  16-bit = 32K discrete values (upper-half)  SNR = 65,536:1, or 96dB

In General  Sampling rate affects range of frequencies you can capture (Nyquist)  Bits per sample affects noise level as well as volume range  What about recording:  Rock?  Mozart (or anything on NPR for that matter)?  Voice/dialog?

Capturing Sounds  Usually done with:  a microphone (such as voice)  Line in  CD  Hollywood Edge®  Computer has sound card  Input types (RCA, MIDI, mini, ¼”, XLR)  Card has quality (plays 16-bit sound)  Need some kind of software  SoundForge/Audacity  Windows SoundRecorder (gag)

Typical Pipeline Permanent Storage Decoding (from mp3, ogg, etc) Memory Buffer Sound Channel Processing (2D/3D effects) Hardware mixing and DAC Individual Channel

Sample Playback  Playback  Loaded entirely into memory (called “sample” as well)  Streamed (pre-buffer data using a circular buffer)  Channel properties  Pan – left/right  Pitch – frequency  Volume

Compressed Audio  Requires a codec (compress/decompress)  Lossless (e.g..zip files)  Lossy  Bit-reduction (ADPCM, reduces bps from 16 to 4) Simple Used on Sony PSP, Wii and Nintendo DS  Physcho-acoustics (.mp3,.ogg,.wma) Discard sound we don’t normally hear anyway Hard to implement CPU intensive PS3, Xbox 360, PCs Note: mp3 format requires licensing fees to Franhofer-Thompson!

ADSR Envelopes  Used for defining the volume of a sound Attack Decay Sustain Release Time Volume

3D Sound  Don’t have 5.1?  Panning is one option  Psycho-acoustic options  Head-Relative Transfer Function (HRTF)  Tweak the frequencies to match your ears  Sounds have position and velocity  There is a listener component (like a camera)  Relationship between the two  Attenuation (with distance)  Occlusion (low-pass filter)  Doppler (relative velocities)

3D Sound  Environmental effects  Reverb (depends on materials in room)  Echo (depends on size of room)  Occlusion (a wall blocking part of the sound)  Obstruction (no direct path to the listener  Competing reverb technologies  I3DL2 (Interactive 3D Audio Rendering Level 2)  EAX (Creative Labs)  Almost identical

MIDI (Musical Instrument Digital Interface)  MIDI – a method for representing sounds electronically  Became popular in the 80’s  Send 16 different channels (tracks) at one time  Have a total of 128 possible instruments

The Keyboard  The MIDI Keyboard  No audible sounds  Generates a series of 1’s a 0’s (on/off)  Signals represent  Note, loudness  Length, type of instrument…  Signals come out of the keyboard and usually go into a sequencer

The Sequencer  Can be a PC  Responsible for recording individual tracks of music  Responsible for playback  Receives input from keyboard  Sends output to synthesizer

The Synthesizer  Receives 1’s and 0’s from the sequencer  Interprets the 1’s and 0’s to produce audible sounds  Piano  Drums…  Saxophone…  Sounds are sent to speakers

Speakers  Like you haven’t seen these before…

MIDI

MIDI vs Digital Recording  MIDI:  Smaller file size (like 10-20K)  Change keys/tempo/looping on the fly!  Song sounds different on every sound card  No singing allowed!  Also a DLS format (DownLoadable Sound)  Digital Recording:  Larger file size (like 5M)  Sound is close approximation to real thing

Sampling  There are two main approaches to synthesis:  Sampling  FM Synthesis  Sampling  A sample is a recording of actual instrument/sound  Samples are taken at certain intervals  Samples are then shifted up or down depending on the note

Sampling

FM Synthesis  Basic waves:  Sine  Square  Saw  Triangle  Noise

FM Synthesis  Start with basic waveform, and have one wave modulate the other  Here’s volume modulation  440 sine wave, control 2Hz:  440 sine wave, control 880Hz:  440 sine wave, control 3KHz:

Interactive Music  Music adapts based on current state of game  Music broken into chunks  Called segments (or cues)  Can be played back to back  Can be smoothly cross-faded  Segments are combined into themes  fmod’s Sound Designer can do this

Themes in fmod

Sound Variations  Sounds can be triggered by events  There’s no reason to play the same sound the same way  Pick a random sample  Change pitch  Change attenuation

Other technology  Lip-synch  Use the amplitude of the wave to control mouth  Analyze phonemes of sample (language neutral)

Common Audio Technology  XAudio (free) – cross-platform  OpenAL (free) – cross-platform  XACT (free) – Xbox/Windows  fmod (commercial) – cross-platform