Chapter 5.5 Audio Programming

Similar documents
Digital Media. Daniel Fuller ITEC 2110

Squeeze Play: The State of Ady0 Cmprshn. Scott Selfon Senior Development Lead Xbox Advanced Technology Group Microsoft

Skill Area 214: Use a Multimedia Software. Software Application (SWA)

CHAPTER 10: SOUND AND VIDEO EDITING

1 Audio quality determination based on perceptual measurement techniques 1 John G. Beerends

Digital Audio Basics

Export Audio Mixdown

5: Music Compression. Music Coding. Mark Handley

Compressed Audio Demystified by Hendrik Gideonse and Connor Smith. All Rights Reserved.

the gamedesigninitiative at cornell university Lecture 15 Game Audio

Fundamental of Digital Media Design. Introduction to Audio

Chapter X Sampler Instrument

For Mac and iphone. James McCartney Core Audio Engineer. Eric Allamanche Core Audio Engineer

Introducing Audio Signal Processing & Audio Coding. Dr Michael Mason Senior Manager, CE Technology Dolby Australia Pty Ltd

08 Sound. Multimedia Systems. Nature of Sound, Store Audio, Sound Editing, MIDI

Lecture #3: Digital Music and Sound

Wolf-Tilo Balke Silviu Homoceanu Institut für Informationssysteme Technische Universität Braunschweig

ITNP80: Multimedia! Sound-II!

Introducing Audio Signal Processing & Audio Coding. Dr Michael Mason Snr Staff Eng., Team Lead (Applied Research) Dolby Australia Pty Ltd

Capturing and Editing Digital Audio *

Konarie REASON RACK EXTENSION SYNTHESIZER WITH OPTIONAL HARDWARE CONTROL. 1

Audio Fundamentals, Compression Techniques & Standards. Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011

2.4 Audio Compression

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects.

UNDERSTANDING MUSIC & VIDEO FORMATS

DSP. Presented to the IEEE Central Texas Consultants Network by Sergio Liberman

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal.

DIY Audio Rosanne Hutton, MindCross Training

Digital Recording and Playback

COS 116 The Computational Universe Laboratory 4: Digital Sound and Music

_APP B_549_10/31/06. Appendix B. Producing for Multimedia and the Web

9/8/2016. Characteristics of multimedia Various media types

Mpeg 1 layer 3 (mp3) general overview

EE482: Digital Signal Processing Applications

Comparison of Spatial Audio Simulation Systems

Table of Contents. Chapter 1 Overview Chapter 2 Interface & Controls Interface MaxxAudio Views Preset System...

SoundFont 2.1 Application Note Joint E-mu/Creative Technology Center E-mu Systems, Inc. Wednesday, August 12, 1998

3 Sound / Audio. CS 5513 Multimedia Systems Spring 2009 LECTURE. Imran Ihsan Principal Design Consultant

History of Audio in Unity

REVIEW: PROCEDURES FOR PRODUCING AUDIO

AudioLiquid Converter User Guide

ZED / Sonar Trouble shooter

3.01C Multimedia Elements and Guidelines Explore multimedia systems, elements and presentations.

COS 116 The Computational Universe Laboratory 4: Digital Sound and Music

Digital Audio. Amplitude Analogue signal

Audio Watermarking Based on PCM Technique

EUROPEAN COMPUTER DRIVING LICENCE. Multimedia Audio Editing. Syllabus

Completing the Multimedia Architecture

Introduction into Game Programming (CSC329)

CS 4455: Video Game Design & Implementation

Transporting audio-video. over the Internet

McFunSoft Audio Studio

CS 074 The Digital World. Digital Audio

Introduction Understanding The Basics Introducing ACID Pro 3.0 Making Music with ACID Setting Up the Hardware Installing and Registering ACID

Eastern Percussion Module

Parametric Coding of Spatial Audio

Principles of Audio Coding

From Synthesis to Sampling

Audacity: How- To. Import audio (a song or SFX) Before we start. Import song into Audacity

A Digital Audio Primer

Efficient Representation of Sound Images: Recent Developments in Parametric Coding of Spatial Audio

Equator Quick Start Guide. Beta v.0.9.4

STEVEN SLATE DRUMS 5 User Manual

Super UA Q&A 2015/03/16

Understand digital audio production methods, software, and hardware.

The following bit rates are recommended for broadcast contribution employing the most commonly used audio coding schemes:

EE Multimedia Signal Processing. Scope & Features. Scope & Features. Multimedia Signal Compression VI (MPEG-4, 7)

STRANDS AND STANDARDS DIGITAL MEDIA 1B

PJP-50USB. Conference Microphone Speaker. User s Manual MIC MUTE VOL 3 CLEAR STANDBY ENTER MENU

Level Editor. Should be stable (as of Sunday) Will be updating the source code if you want to make tweaks to it for your final

ET4254 Communications and Networking 1

ABSTRACT. that it avoids the tolls charged by ordinary telephone service

Digital Sound Ming C. Lin & Zhimin Ren

FPDJ. Baltazar Ortiz, Angus MacMullen, Elena Byun

Audio over IP devices System description Ed 2.0

Array Microphone Digital Noise Reduction and Echo Cancellation Technology for OEM Digital Signal Processors. May

ENSEA conference Small acoustics. Jeremie Huscenot January 8, 2000

DigiPen Institute of Technology

19 th INTERNATIONAL CONGRESS ON ACOUSTICS MADRID, 2-7 SEPTEMBER 2007

PSP Rhythm User s Manual

Digital Media IB DESCRIPTION. EXAM INFORMATION Items

VL Visual Editor. Manual

INSTALLATION. UNDERSCORE is a sample library for Native Instruments Kontakt 5.3 and later. It will NOT work with the free Kontakt Player.

Acoustica 4 User Guide

Nahimic Troubleshooting Instructions and Q&A The document applies to all MSI Notebook and Vortex product which supports Nahimic.

Synopsis of Basic VoIP Concepts

Before starting the troubleshooting, make sure you have installed the latest version of audio driver and Nahimic on your notebook.

Proceedings of Meetings on Acoustics

Optimizing A/V Content For Mobile Delivery

Java Sound API Programmer s Guide

Optimizing Audio for Mobile Development. Ben Houge Berklee College of Music Music Technology Innovation Valencia, Spain

DRUM DIREKTOR USER GUIDE

Rich Recording Technology Technical overall description

TECHNICAL PAPER. Personal audio mix for broadcast programs. Fraunhofer Institute for Integrated Circuits IIS

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

The Music Lovers Line. Integrated Amplifier Receiver NEW PRODUCT BULLETIN

Streaming Media. Advanced Audio. Erik Noreke Standardization Consultant Chair, OpenSL ES. Copyright Khronos Group, Page 1

Solving Audio Subsystem Challenges Using a Crossfade/Level Controller Algorithm in Portable Media Applications

SampleCell Editor Addendum

The 1-Bit Advantage Future Proof Recording

Transcription:

Chapter 5.5 Audio Programming

Audio Programming Audio in games is more important than ever before 2

Programming Basic Audio Most gaming hardware has similar capabilities (on similar platforms) Mostly programming interfaces differ Learning fundamental concepts of audio programming is important 3

API Choices DirectSound (part of DirectX API) Only available on Windows platforms OpenAL Newer API Available on multiple platforms Proprietary APIs Typically available on consoles 3 rd Party Licensable APIs Can offer broad cross-platform solutions 4

Analog Sound Wave 5

Basic Audio Terminology and Physics Amplitude Measurement of a sound wave s pressure Frequency Measurement of the interval between wave cycles, typically measured in Hertz Pitch The perception of frequency Tuning Musical distribution of frequencies over keys Decibel Measures sound amplitude 6

Digital Representation of a Sound Wave 7

Digital Representation of a Sound Wave Most common technique known as sampling Sampling involves measuring the amplitude of the analog wave file at discrete intervals The frequency of sampling is known as sampling rate Each sample is typically stored in a value ranging from 4 to 24 bits in size The size of the sample value in bits is known as the bit depth Music CDs have a sample rate and bit depth of 44.1 khz (samples/sec) and 16 bits (sample size) 8

Quantization Error in Sampling 9

Bit Depth and Signal Noise Bit depth of sample data affects signal noise Signal to noise ratio = number of available bits / 1 For example, 8-bit samples have a 256:1 SNR (~48 db), and 16-bit samples have a 65,536:1 SNR (~96 db) Decibel ratio is calculated using 10 x log 10 (ratio) or 8.685890 x log e (ratio) 10

Sampling Frequency and Frequency Reproduction Sampling frequency affects range and quality of high-frequency reproduction Nyquist Limit Frequencies up to one-half the sampling rate can be reproduced Audio quality degrades as frequency approaches this limit 11

Modern Audio Hardware Samples are piped into sound channels Often a hardware pipeline from this point Various operations, such as volume, pan, and pitch may be applied 3D sounds may apply HRTF algorithms and/or mix the sound into final output buffers. 12

Sound Playback Techniques Two basic playback methods: 1. Play sample entirely from memory buffer 2. Stream data in real-time from storage medium Streaming is more memory efficient for very large audio files, such as music tracks, dialogue, etc Streaming systems use either a circular buffer with read-write pointers, or a double-buffering algorithm 13

Sample Playback and Manipulation Three basic operations you should know Panning is the attenuation of left and right channels of a mixed sound Results in spatial positioning within the aural stereo field Pitch allows the adjustment of a sample s playback frequency in real-time Volume control typically attenuates the volume of a sound Amplification is generally never supported 14

Compressed Audio Format Compressed audio formats allow sound and music to be stored more compactly Bit reduction codecs generally are lightweight ADPCM compression is implemented in hardware on all the major current video game console systems Psycho-acoustic codecs often have better compression Require substantially more computational horsepower to decode 15

MP3, Ogg Vorbis, Licensing & Patent Issues The MP3 format is patented Any commercial game is subject to licensing terms as determined by Fraunhofer & Thompson Multimedia, the holders of the patents Ogg Vorbis is similar to MP3 in many ways Open source and patent-free (royalty-free) Be aware of patent and license restrictions when using 3 rd party software 16

ADSR Envelope (Attack, Decay, Sustain, Release) 17

3D Audio Two sets of data required when working in world coordinates: Listener Data Composed of world position and orientation (virtual microphone in the world) Source Data Composed of sound position, orientation, velocity, etc (virtual sound source in the world) 18

Environmental Effects Environmental effects nearly always implemented in hardware Sound transmission is categorized in three ways Direct transmission Early reflections (echo) Late reflections (reverberation) 19

Sound Transmission Categories 20

Environmental Effects Standards EAX 2.0 and beyond EAX 2.0 developed by Creative Labs and released as an open standard EAX 3.0 and 4.0 remain proprietary Creative Labs standards I3DL2 Open standard developed by IA-SIG, similar to EAX 2.0 in functionality 21

Programming Music Systems Two common music systems MIDI-based systems (Musical Instrument Digital Interface) Digital audio streaming systems (CD audio, MP3 playback, etc) 22

Advantages and Disadvantages of MIDI Actual music data size is negligible Easy to control, alter, and even generate in real-time High quality music is more difficult to compose and program Only effective if you can guarantee playback of a common instrument set 23

Other MIDI-based technologies to be aware of DLS (DownLoadable Sound) Format A standardized format for instrument definition files ixmf (Interactive extensible Music Format) New proposed standard for a container format for interactive music 24

Advantages / Disadvantages of Digital Audio Streams Superb musical reproduction is guaranteed Allows composers to work with any compositional techniques Some potential interactivity is sacrificed for expediency and musical quality Generally high storage requirements 25

A Conceptual Interactive Music Playback System Divide music into small two to eight-bar chunks that we ll call segments. A network of transitions from segment to segment (including loops and branches) is called a theme. Playing music is now as simple as choosing a theme to play. The transition map tracks the details. 26

Advanced Audio Programming 3D Audio Environmental Effects Integration Audio Scripting and Engine Integration Lip-sync Technology Advanced Voice Playback Voice Recognition 27

3D Audio Environmental Effects Integration Environmental effects should be driven by a room s shape and material composition. Can determining the optimal effect settings be done automatically? This may be important as game worlds become larger and more complex 28

3D Audio Environmental Effects Integration (cont) Sound occlusion and damping is a particularly difficult problem to solve This is essentially a pathfinding problem for audio. Doors can dynamically affect a sound s properties Very few titles have even attempted a robust, general-purpose, and automated solution to these problems. 29

Dynamic Occlusion 30

Audio Scripting and Engine Integration Very little audio programming should be done by general game programmers Game Engine should offer robust support for audio triggers and scripts Engine should deal with audio scripts, not sound files Why is this so important? 31

Audio Scripting Many situations require much more information than can be embedded in a linear audio file Sound Variation Sound Repetition Complex Sound Looping Background Ambience 32

Lip-sync Technology Lip-sync technology is a blending of audio and visual techniques to create realisticlooking speech by in-game actors. Simple techniques such as waveform amplitude measurement has worked previously, but In future titles, it will be considered inadequate. Much work can still be done in this field. 33

Advanced Voice Playback Real-time spoken feedback is especially important in sports titles (simulated announcers) Game are reaching the limits of what current techniques (canned, prerecorded phrases combined in series) can provide. Again, this is an opportunity for future groundbreaking audio work. 34

Voice Recognition Spoken commands are much easier to deliver in certain situations. A great example of this? Squad-based tactical shooters. Current generation systems are still very error prone. A great opportunity for breakout audio technology. 35