Game Programming Algorithms and Techniques

Slides:



Advertisements
Similar presentations
Sound / Audio / Music. How do we obtain sounds? We sample them! We sample them!
Advertisements

Digital Audio Teppo Räisänen LIIKE/OAMK. General Information Auditive information is transmitted by vibrations of air molecules The speed of sound waves.
Sound can make multimedia presentations dynamic and interesting.
Chapter 4: Representation of data in computer systems: Sound OCR Computing for GCSE © Hodder Education 2011.
Int 2 Multimedia Revision. Digitised Sound Analogue sound recorded from person, or real instruments.
Psychoacoustics Perception of Direction AUD202 Audio and Acoustics Theory.
I Power Higher Computing Multimedia technology Audio.
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.
Foundations of Physics
Tricks and Techniques for Sound Effect Design By Bobby Prince 97/sound_effect.htm.
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.
AMPLITUDE, WAVELENGTH, FREQUENCY AND PITCH. REVISION.
5. Multimedia Data. 2 Multimedia Data Representation  Digital Audio  Sampling/Digitisation  Compression (Details of Compression algorithms – following.
Section  The Doppler Effect: A change in frequency (pitch) due to relative motion between a source of sound and its observer.
Binaural Sonification of Disparity Maps Alfonso Alba, Carlos Zubieta, Edgar Arce Facultad de Ciencias Universidad Autónoma de San Luis Potosí.
COMP Representing Sound in a ComputerSound Course book - pages
ConcepTest 12.1a ConcepTest 12.1a Sound Bite I 1) the frequency f 2) the wavelength 3) the speed of the wave 4) both f and 5) both v wave and When a sound.
By: Chloe 5TH Grade Mrs. Mann
$1 Million $500,000 $250,000 $125,000 $64,000 $32,000 $16,000 $8,000 $4,000 $2,000 $1,000 $500 $300 $200 $100 Welcome.
Games Development Practices Sound Effects & OpenAL CO2301 Games Development 1 Week 15.
Sound Vibration and Motion.
Chapter 14 Sound. Characteristics of sound 2 A special and important type of mechanical wave Speed of sound: Loudness: related to the energy of sound.
Sound
Revision CUS30109 Certificate III in music. Microphones - Condenser w phantom power - Dynamic - What each is used for - Polar patterns/ frequency response.
Chapter 12 Review. Explain how waves are produced Vibration of an object is what produces sound waves. The vibrating object moves in one direction and.
Sound “A sound man…”. Frequency The frequency of a sound wave is perceived as the pitch (note) –High frequency → high pitch → high note –“Middle C” has.
SOUND Sounds are a form of energy produced by rapidly vibrating objects. Sound needs a material medium for its transmission. Sound cannot travel through.
15.1 Properties of Sound. Chapter 15 Objectives  Explain how the pitch, loudness, and speed of sound are related to properties of waves.  Describe how.
Objective Sound and Psychoacoustics. Viers on Location Sound Gathering production sound Nat, b-roll, interview, dialog “Technique will trump technology”
Chapter 17 Waves-II Sound Waves Wavefronts are surfaces over which the oscillations due to the sound wave have the same value; such surfaces are.
IP Moving wave sources Moving wave sources.
8th Grade Physical Science
Chapter 15 Recording and Editing Sound
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Chapter 4 Fundamentals of Digital Audio
10.2 Essential Questions How is sound intensity measured?
SOUND 24.1.
Voice Manipulator Department of Electrical & Computer Engineering
With sound this equates to how loud the sound appears
Week 7 - Wednesday CS 121.
AP Physics Review Waves and Sound.
Multimedia: Digitised Sound Data
Analogue & Digital.
Introduction to Digital Audio
Examples of wave superposition
15.3 Sound, Perception, and Music
Pg. 298 – Damping Underdamping Overdamping
ConcepTest 12.1a Sound Bite I
Unit 7: Vibrations, Waves & Sound Chapter 20: Sound
C-15 Sound Physics 1.
Bits and Pieces November 6, 2007.
Sound & Sound Waves.
The Physics of Sound.
Introduction to Digital Audio
Introduction to Digital Audio
Introduction to Digital Audio
Chapter 4: Representing sound
Chapter 14 Waves and Sound.
Chapter 15: Sound Energy PowerPoint
Games Development Practices Sound Effects
24.1 The frequency of sound The pitch of a sound is how you hear and interpret its frequency. A low-frequency sound has a low pitch. A high-frequency.
Govt. Polytechnic Dhangar(Fatehabad)
Waves Wave Properties Wave Interactions Sound Waves
Voice Manipulator Department of Electrical & Computer Engineering
Introduction to Digital Audio
Evolution of sound localisation in land vertebrates
Sound Chapter 12.
Digital Audio Application of Digital Audio - Selected Examples
Chapter 9 Audio.
Embedded Sound Processing : Implementing the Echo Effect
Presentation transcript:

Game Programming Algorithms and Techniques Chapter 6 Sound

Chapter 6 Objectives Basic Sound Learn the difference between source data and sound cues Creating switches to select from different sets of sounds 3D Sounds Placing the listener in the world Surround sound principles Digital Signal Processing Basic DSP effects How to mark regions Other Topics What's the Doppler effect, and how is it used in games? Difference between sound occlusion and obstruction

Source Data Original audio files created by sound designer. File formats: Sound effects generally use uncompressed formats such as WAV. Music/dialogue is usually compressed with MP3 or OGG. Two ways sounds can be played: Loaded fully into memory (usually for small files). Streamed off of the disk (for larger files).

Sound Cue Maps to one or more source data files Says how or when particular source data should play What's triggered by gameplay code

Sound Cue Example: Explosion Explosion sound cue

Storing Sound Cue Data One possibility is JSON. Here’s an example: { "name": "explosion", "falloff": 150, "priority": 10, "sources": [ "explosion1.wav", "explosion2.wav", "explosion3.wav" ] }

Basic Sound Cue Class Would correspond to the type of data in a basic cue class SoundCue string name int falloff int priority // List of strings of all the sources List sources; function Play() // Randomly select from sources and play ... end

Sound Switch Suppose we have different footstep sounds depending on the surface the character walks on. We want to be able to switch between different sets of sounds, depending on surface. To do this, we need a switch.

Sound Cue Data w/ Switch { "name": "footstep", "falloff": 25, "priority": "low", "switch_name": "foot_surface", "sources": [ "switch": "sand", "fs_sand1.wav", "fs_sand2.wav", "fs_sand3.wav" ] }, "switch": "grass", "fs_grass1.wav", "fs_grass2.wav", "fs_grass3.wav" }

Sound Cue Class w/ Switch interface ISoundCue function Play() end class SwitchableSoundCue implements ISoundCue string name int falloff int priority string switch_name // Hash Map that stores (string,List) pairs // For example ("sand", ["fs_sand1.wav", "fs_sand2.wav", // "fs_sand3.wav"]) HashMap sources // Grab the current value for switch_name // Lookup list in the hash map and randomly play a sound ...

3D Sounds A listener is what hears a sound: Think of it as a virtual microphone in the world. An emitter is what emits a sound: For instance, a fireplace would have an emitter that emits the sound of crackling fire.

Listener/Emitter Diagram Sound listener and emitter; in this case, the sound effect should be heard on the right.

Listener Position FPS – At the camera Cutscene – At the camera Third person – Not always at the camera!

Listener position in a third-person game.

Falloff How volume of a sound decreases as it gets further from the listener. Decibel Unit of sound measurement Logarithmic scale The falloff will depend on the sound—an explosion would have less of a falloff than a footstep.

A standard 5.1 surround sound speaker configuration A "5.1" system may be configured like so: A standard 5.1 surround sound speaker configuration

Digital Signal Processing Takes sound data and transforms it at runtime Common effects: Reverb (echo) Pitch shift (increase/decrease frequency) Compressor (reduce dynamic range of sound volume levels) Low-pass filter (reduce volume of high-pitch sounds)

Doppler Effect As a sound emitter approaches towards the listener, the pitch increases. As it goes away, the pitch decreases.

Sound Occlusion/Obstruction Sound has to travel through wall (or other material) to reach listener. Reduction of high-frequency volumes. Obstruction Sound travels around an object to reach a listener. Causes interaural time difference (sound arrives in each ear at a different time). Fresnel Acoustic Diffraction Used to determine whether a sound is occluded or obstructed.

Sound Occlusion/Obstruction, Cont'd Sound occlusion (a), sound obstruction (b), and Fresnel acoustic diffraction (c)