Audio 靜宜大學資工系 蔡奇偉 副教授 © 2011. 內容大綱 簡介 Recording Playback Sample Rate and Sample Quality Mono & Stereo Sound Sound Formats, Compression, and Codecs XNA.

Slides:



Advertisements
Similar presentations
Multimedia: Digitised Sound Data Section 3. Sound in Multimedia Types: Voice Overs Special Effects Musical Backdrops Sound can make multimedia presentations.
Advertisements

Mar 2003 Ognen Paunovski :: Andon Dragomanov S3CTIT03 Modern Trends in Audio Compression presented by Ognen Paunovski Andon Dragomanov 2 nd International.
Digital Audio Teppo Räisänen LIIKE/OAMK. General Information Auditive information is transmitted by vibrations of air molecules The speed of sound waves.
Multimedia Authoring1 Introduction to Garageband Garageband is both a: MIDI sequencer Digital audio recorder Garageband: Real Instruments Tracks displayed.
Investigating the sound quality of different audio file formats In this activity, we are going to record a short voice sample with a sound recording tool,
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
Pro Tools 7 Session Secrets Chapter 6: After the Bounce or Life Outside of Pro Tools Life Outside of Pro Tools.
CNIT 132 – Week 9 Multimedia. Working with Multimedia Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each.
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.
Digital Audio Production Munsang College Information and Communication Technology S2.
1 Multimedia on the Web: Issues of Bandwidth Bandwidth is a measure of the amount of data that can be sent through a communication pipeline each second.
Audio (音效) 靜宜大學資工系 蔡奇偉 副教授 內容大綱 簡介 Sampling SDL_mixer.
Free open source audio recording and editing software 1Using Audacity.
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.
Chapter 4: Representation of data in computer systems: Sound OCR Computing for GCSE © Hodder Education 2011.
MUSC1010 – WEEK 3 Adobe Audition. Mixing Waves and Phase Figure 1 - Two simple waves in phase Figure 2 - Two simple waves out of phase Figure 3 - two.
Int 2 Multimedia Revision. Digitised Sound Analogue sound recorded from person, or real instruments.
I Power Higher Computing Multimedia technology Audio.
Technology ICT Option: Audio.
COMPUTER PROGRAMMING 2 Chapter 7 Sound. Objectives Find out how to prepare sounds for inclusion in Microsoft XNA projects. Incorporate sounds into XNA.
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.
Playing Sounds inside XNA Game Design Experience Professor Jim Whitehead February 23, 2009 Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0.
AUDIO VIDEO FLASH DIGITAL MEDIA: COMMUNICATION AND DESIGN
Sound Chapter Types of Sound Waveforms MIDI Sound is related to many things in computers but only Wav and MIDI exist in PCs.
Sound Chapter 13. Overview In this chapter, you will learn to –Describe how sound works in a PC –Select the appropriate sound card for a given scenario.
Representation of Data in Computer Systems
Using Audacity Created by: Stephanie Anderson Dublin Unified School District Dublin, California.
 Continuous sequence of vibrations of air  (Why no sound in space? Contrary to Star Wars etc.)  Abstraction of an audio wave:  Ear translates vibrations.
Introduction to Interactive Media 10: Audio in Interactive Digital Media.
By Frankie, K. F. Yip Chapter 6 Speech. By Frankie, K. F. YipLecture 6 - Sound2 Sound Waves.
Audio. Why Audio Essential tool for – Interface – Narrative – Setting & Mood.
Getting Started. XNA Game Studio 4.0 To download XNA Game Studio 4.0 itself, go to XNA Game.
XNA 4.0 簡介 靜宜大學資工系 蔡奇偉 副教授 © 大綱 XNA 簡介 XNA Framework XNA Build XNA Game Studio 建立 XNA 4 的專案 方案的目錄結構 XNA Game Studio 4.0 參考手冊 Hello, XNA XNA Game.
Chapter 11 Audio © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in.
AUDIO MEDIA 1 Created } “Borrowed” } Microphone MIDI keyboard CD’s & flash drives Internet Audio Sources 2.
Developing the Game User Interface (UI) Lesson 5.
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?
11 Adding Sounds Session 7.1. Session Overview  Find out how to capture and manipulate sound on a Windows PC  Show how sound is managed as an item of.
Microsoft Tech Days 2012 Cheezia: Developing a Windows Phone XNA Game Rodrigo Barretto Software Engineer - MCPD on Windows Phone
Overview of Multimedia A multimedia presentation might contain: –Text –Animation –Digital Sound Effects –Voices –Video Clips –Photographic Stills –Music.
Sound Part 2 Sound and how to make it. What is Sound? Sound is a compression wave.
Chapter 15 Recording and Editing Sound. 2Practical PC 5 th Edition Chapter 15 Getting Started In this Chapter, you will learn: − How sound capability.
Getting started with AUDIOMULCH. Background AudioMulch is not really designed for work in primary schools, and so there is a lot that you may wish to.
Sound element Week - 11.
More Meaningful Jargon Or, All You Need to Know to Speak Like a Geek Sound.
● Click on Start Button ● Go to Programs and click on Photo Story 3.
© 2011 The McGraw-Hill Companies, Inc. All rights reserved Chapter 4: Sound.
多媒體的網頁 聲音 影片 圖片. 音效檔的格式 格式 plateformextension  -law, AUSun, NeXT.au AIFF/AIFCMacintosh.aiff,.aif SNDMacintosh.snd WAVEWindows.wav MIDIALL.mid,.midi AIFF:
HTML 5. Introduction In modern browsers, adding a video to your page is as easy as adding an image. No longer do you need to deal with special plug-ins.
Media Types Information Systems can contain the following types of media: Sound, graphics, video & text.
Sound and the Web. Transferring sound Download Progressive Download Stream.
Audio Streaming © Nanda Ganesan, Ph.D.. Audio File Features Audio file is a record of captured sound that can be played back –The WAV File is an example.
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.
FREE OPEN SOURCE AUDIO RECORDING AND EDITING SOFTWARE USING AUDACITY.
XNA Sound Effects. float volume, pitch, pan; SoundEffect boing1; SoundEffect boing2; boing1 = Content.Load ("boing1"); boing2 = Content.Load ("boing2");
Audio Formats. Digital sound files must be organized and structured so that your media player can read them. It's just like being able to read and understand.
Editing Digital AudioLab#7 Audacity is a free, easy-to-use and an open source platform audio editor and recorder for Windows, Mac OS, Linux and other operating.
FREE OPEN SOURCE AUDIO RECORDING AND EDITING SOFTWARE USING AUDACITY.
Using Audacity Let’s get Started Open Audacity. Getting started…
© 2011 The McGraw-Hill Companies, Inc. All rights reserved Chapter 4: Sound.
3.3 Fundamentals of data representation
Image and Audio File Formats
Learning Objectives Be able to explain how sound can be sampled and stored in digital form. Understand how sampling rate affects digital audio quality.
Multimedia: Digitised Sound Data
Multimedia: making it Work
Vertex Array Objects & Buffer Objects
Assist. Lecturer Safeen H. Rasool Collage of SCIENCE IT Dept.
Presentation transcript:

Audio 靜宜大學資工系 蔡奇偉 副教授 © 2011

內容大綱 簡介 Recording Playback Sample Rate and Sample Quality Mono & Stereo Sound Sound Formats, Compression, and Codecs XNA Audio

Recording

Playback

Sample Rate and Sample Quality 7, 9, 11, 12, 13, 14, 14, 15, 15, 15, , 1001, 1011, 1100, 1101, 1110, 1110, 1111, 1111, 1111, 1110 Sample Rate: 每秒取樣的個數,單位 為 Hz 。常見值為 11025Hz, 22,050Hz, 或 44,100Hz (CD 音質 ) Sample Quality: 取樣值的 bits 數,通常 為 8 或 16 bits 。

11025 Hz22050 Hz44100 Hz 8 bits11025 byte/s22050 Byte/s44100 byte/s 16 bits22050 byte/s44100 byte/s88200 byte/s Why Hertz? Why are CDs sampled at 44,100 Hertz, anyway? It seems like such an odd number. To answer this question, we have to dive back into audio history. Before CDs, digital audio was stored on video tape—a hack rivaling the best of them. The tapes were designed to store and play back 60 frames per second of video data. Each frame of video had 245 lines, and each line had three samples (for red, green, and blue). That gives us 245 × 3 × 60, or 44,100 samples.

Mono & Stereo Sound (單聲道與立體聲) The Story behind CDs My father-in-law, a musician, once told me that the reason CDs hold 74 minutes of music is because the powers that be wanted to listen to Beethoven's Ninth Symphony in its entirety, without interruption. The engineers, always anxious to please, calculated the length of this symphony as 74 minutes, and came up with a physical specification for a disc that could store that much audio. I find it fascinating that a classical musician who died several hundred years ago had a very large hand in shaping one of today's most omnipresent pieces of audio technology. -- Mason McCuskey

Sound Formats, Compression, and Codecs

MP3 is a "lossy" compression algorithm, which means that some information is lost when you compress a WAV into MP3. MP3 works by making sure that the information that's lost is information you can probably live without. For example, a lot of high frequency things, such as cymbal crashes and vocalizations of the hiss of an "s" sound or a crisp "k" sound, are lost. Usually this loss is imperceptible to the average listener, but with a good pair of speakers and a keen ear, you can hear the difference. Try it sometime—go to a quiet place, and listen to your favorite song on CD, then listen to the same song in MP3. If your speakers are good and you're young or have taken good care of your ears, you'll be able to hear the difference.

Other compression formats are out there. There's ADPCM, an acronym for Advanced Differential Pulse Code Modulation, Ogg Vorbis (an open source, patent-free audio compression algorithm that's quickly gaining popularity), and several lesser-known formats. These pieces of code that implement these algorithms are called codecs, an acronym for compressor/decompressor (don't you love all these audio acronyms?). Contained in a WAV file is the name of the codec it was compressed with; Windows provides several of the most common codecs, and automatically uses the right one based on the tag in the WAV file. If you try to play a WAV file that contains a tag for a codec not installed on your system, you won't be able to until you hunt down the codec it was made with. Happily, this is not a common occurance—99 percent of the WAVs out there are PCM or ADPCM.

Mixing Sound Often you'll want to play more than one sound effect at once, and that's where audio mixing comes in. The easiest way to play two sounds at the same time is simply to add their samples together.

XNA Audio Microsoft.Xna.Framework.Audio Namespace Supports.wav,.wma, and.mp3 formats Simple Audio Playback SoundEffect Class SoundEffectInstance Class XACT (Cross-Platform Audio Creation Tool)

Simple Audio Playback Step 1: 把音效檔加入方案中。

Simple Audio Playback Step 2: 宣告 SoundEffect 與 SoundEffectInstance 物件 public class Game1 : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; SpriteBatch spriteBatch; SoundEffect heartBeat; SoundEffectInstance heartBeatInst;

Simple Audio Playback Step 3: 讀入音效檔並建立其 instance protected override void LoadContent() { spriteBatch = new SpriteBatch(GraphicsDevice); heartBeat = Content.Load ("heartbeat"); heartBeatInst = heartBeat.CreateInstance(); }

Simple Audio Playback Step 4: 播放 instance protected override void Update(GameTime gameTime) { GamePadState gamepad = GamePad.GetState(PlayerIndex.One); KeyboardState keyboard = Keyboard.GetState();... //A button or key plays sound effect if (gamepad.Buttons.A == ButtonState.Pressed) heartBeatInst.Play(); if (Keyboard.GetState().IsKeyDown(Keys.A)) heartBeatInst.Play();... }

SoundEffect Class Public Properties DistanceScale Gets or sets a value that adjusts the effect of distance calculations on the sound. S DopplerScale Gets or sets a value that adjusts the effect of doppler calculations on the sound. S Duration Gets the duration of the SoundEffect. MasterVolume Gets or sets the master volume that affects all SoundEffectInstance sounds. S Provides a loaded sound resource.

SoundEffectInstance Class 1/2 Provides a single playing, paused, or stopped instance of a SoundEffect sound. Public Properties IsLooped Gets a value that indicates whether looping is enabled for the SoundEffectInstance. Pan Gets or sets the panning for the SoundEffectInstance. Pitch Gets or sets the pitch adjustment for the SoundEffectInstance. State Gets the current state (playing, paused, or stopped) of the SoundEffectInstance. Volume Gets or sets the volume of the SoundEffectInstance.

SoundEffectInstance Class 2/2 Public Methods Pause Pauses a SoundEffectInstance. Play Plays or resumes a SoundEffectInstance. Resume Resumes playback for a SoundEffectInstance. Stop Overloaded. Stops playing a SoundEffectInstance.

參考資訊 Web Pages Wiki: Panning (audio) Wiki: Pitch (music)