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

Slides:



Advertisements
Similar presentations
Introduction to Digital Audio
Advertisements

Digital Signal Processing
Digital Audio / Sound — An Underutilized Medium Integrating Technology into the Curriculum © 2004 Jim Lockard.
Multimedia Authoring1 Introduction to Garageband Garageband is both a: MIDI sequencer Digital audio recorder Garageband: Real Instruments Tracks displayed.
Audacity Audacity® is free, open source, cross- platform software for recording and editing sounds. Audacity is available.
CSE 380 – Computer Game Programming Audio Engineering.
Pro Tools 7 Session Secrets Chapter 6: After the Bounce or Life Outside of Pro Tools Life Outside of Pro Tools.
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.
Royalty Free Music for Schools Do You Have the To Do a Podcast?
Digital Audio Production Munsang College Information and Communication Technology S2.
1. Digitization of Sound What is Sound? Sound is a wave phenomenon like light, but is macroscopic and involves molecules of air being compressed and expanded.
Analysis of recorded sounds using Labview
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.
Free open source audio recording and editing software 1Using Audacity.
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.
The Online Guide to Creating Podcasts Presented by The Portland Public Schools Multimedia Library Recording and Saving your Podcast.
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.
1 Manipulating Digital Audio. 2 Digital Manipulation  Extremely powerful manipulation techniques  Cut and paste  Filtering  Frequency domain manipulation.
The audacious program Audacity Audacity might be worth a look. Suggest... Audacity is an easy to use audio production and mixing program, which enables.
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.
Representation of Data in Computer Systems
Joe Comm Audacity in the Classroom. Overview A free download tool to record audio files (voice, music, or both). Teacher laptops, power cords, internet.
Audio Production Basics. Pros and Cons of Digital Recording Pros – Much easier for the average person. Much less cumbersome Will not deteriorate over.
Copyright 2008 Wanda Dann, Steve Cooper, Don Slater Alice Workshop Working with Sound.
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.
File Formats Chapter 9 Bit Literacy. File formats are often ignored by users Applications automatically save files in the application’s format All formats.
Audio. Why Audio Essential tool for – Interface – Narrative – Setting & Mood.
Digital Audio Basics with Bill Wade.
Go to section Interest Grabber Vibrations A wave is a vibration that carries energy from one place to another. But not all vibrations are waves. Hold a.
AUDIO MEDIA 1 Created } “Borrowed” } Microphone MIDI keyboard CD’s & flash drives Internet Audio Sources 2.
COSC 1P02 Introduction to Computer Science 4.1 Cosc 1P02 Week 4 Lecture slides “Programs are meant to be read by humans and only incidentally for computers.
Sound Part 2 Sound and how to make it. What is Sound? Sound is a compression wave.
Alice Workshop Working with Sound. Sound Working with sound is appealing to students Demo: Penguin Sound.
Objective Understand digital audio production methods, software, and hardware. Course Weight : 6%
ITEC Final Presentation For Fall 2011 Table of Content –Basic Requirements  Audacity  Inskcape  GIMP  Blender  Animation of 2D and 3D.
Music Technology Skills “Creating and editing your own electronic music”
Sound in Multimedia Psychology of sound what do you use it for? what techniques for its communication exist? Science of sound why does it exist? how it.
Sound and the Web. Transferring sound Download Progressive Download Stream.
Choosing the right recording tools for the job Hazzan Rob Menes May, 2015.
AUDACITY AUDACITY RECORDING/EDITING SOFTWARE. TRANSPORT CONTROLS AUDACITY RECORDING/EDITING SOFTWARE TRANSPORT CONTROLS.
Adobe AuditionProject 4 guide © 2012 Adobe Systems IncorporatedHow to record narration1 You can record narration for your video directly into Adobe Audition.
How to Create a Podcast. Podcasting “is the distribution of audio or video files, such as radio programs or music videos, over the Internet using either.
FREE OPEN SOURCE AUDIO RECORDING AND EDITING SOFTWARE USING AUDACITY.
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.
Digital Audio Hygiene Alistair Hirst OMNI Audio Theory and Practice.
Introduction to Digital Audio
Audacity Basics.
Chapter 4 Fundamentals of Digital Audio
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Objective % Explain concepts used to create digital audio.
Multimedia: making it Work
Digital Audio Basics.
3GB3 Game Design Unity 3D Basics.
Pre-Production Determine the overall purpose of the project.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Introduction to Digital Audio
Objective % Explain concepts used to create digital audio.
Technology ICT Option: Audio.
Introduction to Digital Audio
Introduction to Digital Audio
Pre-Production Determine the overall purpose of the project.
Introduction to Digital Audio
Technology ICT Option: Audio.
Introduction to Digital Audio
Presentation transcript:

Sound / Audio / Music

How do we obtain sounds?

We sample them! We sample them!

Sampling: – analog to digital – continuous to discrete Must be done carefully!

stereo

Problem: Correct and incorrect sampling rates (sampling frequency; x direction).

Problem: Quantization (not enough bits in our ADC; y direction).

Audio File Formats Unity supported audio file formats Unity supported audio file formats MP(EG)1/2/3, Ogg Vorbis, wav, and AIFF MP(EG)1/2/3, Ogg Vorbis, wav, and AIFF mono or stereo mono or stereo Torque supported audio file formats Torque supported audio file formats.wav files &.ogg files (Ogg Vorbis).wav files &.ogg files (Ogg Vorbis) mono or stereo mono or stereo

Audio File Formats Compression (AKA CODECS) types: Compression (AKA CODECS) types: lossy vs. lossless lossy vs. lossless Ex. Ex. 6.1M mp3 file converted to a 5.1M.ogg file and a 33.9M.wav file 6.1M mp3 file converted to a 5.1M.ogg file and a 33.9M.wav file 7.6M mp3 file converted to a 8.6M.ogg file and a 83.2M.wav file 7.6M mp3 file converted to a 8.6M.ogg file and a 83.2M.wav file But game engines may pause while decompressing large files. But game engines may pause while decompressing large files.

Audio File Formats Compressed Compressed Compress sounds by choosing the compressed option from inside the Editor. The audio data will be small, but will cost CPU cycles to decode at play time. Depending on the target, Unity will encode the audio to either Ogg Vorbis (Mac/PC/Consoles) or MP3 (Mobile platforms). Compress sounds by choosing the compressed option from inside the Editor. The audio data will be small, but will cost CPU cycles to decode at play time. Depending on the target, Unity will encode the audio to either Ogg Vorbis (Mac/PC/Consoles) or MP3 (Mobile platforms). For the best sound quality supply the audio in an uncompressed format such as WAV or AIFF (containing PCM data) and let Unity do the encoding. For the best sound quality supply the audio in an uncompressed format such as WAV or AIFF (containing PCM data) and let Unity do the encoding. If only targeting Mac/PC (standalones, webplayers) importing an Ogg Vorbis file will not degrade the quality. But converting to mobile platforms will force a re-encode to MP3 and cause a slight quality degradation. Same goes for importing MP3, when only targeting mobile platforms. If only targeting Mac/PC (standalones, webplayers) importing an Ogg Vorbis file will not degrade the quality. But converting to mobile platforms will force a re-encode to MP3 and cause a slight quality degradation. Same goes for importing MP3, when only targeting mobile platforms. Native Native Use Native (WAV, AIFF) audio for short sound effects. The audio data will be larger, but sounds won't need to be decoded at play time. Use Native (WAV, AIFF) audio for short sound effects. The audio data will be larger, but sounds won't need to be decoded at play time.

Audio File Editor: Audacity (audacity.sourceforge.net)

Audacity: record, play, etc.

Audacity: select and cut

Audacity: after cut

Audacity: Fit-in-Window

Audacity: after Fit-in-Window

Audacity: add reverb effect to selection

Add a cheesy wah wah effect to your selection (but preview it first).

Audio in Unity Audio Components Audio Clip Audio Clip Audio Listener Audio Listener Audio Source Audio Source Audio Effects(PRO only) Audio Effects(PRO only) Audio Low Pass Filter(PRO only) Audio Low Pass Filter(PRO only) Audio High Pass Filter(PRO only) Audio High Pass Filter(PRO only) Audio Echo Filter(PRO only) Audio Echo Filter(PRO only) Audio Distortion Filter(PRO only) Audio Distortion Filter(PRO only) Audio Reverb Filter(PRO only) Audio Reverb Filter(PRO only) Audio Chorus Filter(PRO only) Audio Chorus Filter(PRO only) Reverb Zones Reverb Zones

Audio in Unity Audio Components The following slides were compiled from information available from the excellent Unity reference manual ( nts/index.html).

AUDIO CLIP

Audio in Unity Audio Components: Audio Clip Audio Clips are audio data used by Audio Sources. Unity supports mono, stereo and multi (up to 8) channels audio assets. Unity supports importing the following audio file formats:.aif,.wav,.mp3, and.ogg. Audio Clips are audio data used by Audio Sources. Unity supports mono, stereo and multi (up to 8) channels audio assets. Unity supports importing the following audio file formats:.aif,.wav,.mp3, and.ogg.

Audio in Unity Audio Components: Audio Clip

Audio in Unity Audio Components: Audio Clip Audio FormatThe specific format that will be used for the sound at runtime. Audio FormatThe specific format that will be used for the sound at runtime. NativeLarger file size, higher quality. Best for very short sound effects. NativeLarger file size, higher quality. Best for very short sound effects. CompressedSmaller file size, lower/variable quality. Best for medium length sound effects and music. CompressedSmaller file size, lower/variable quality. Best for medium length sound effects and music. 3D SoundIf enabled, the sound will play back in 3D space. Both Mono and Stereo sounds can be played in 3D. 3D SoundIf enabled, the sound will play back in 3D space. Both Mono and Stereo sounds can be played in 3D. Force to monoIf enabled, the audio clip will be down-mixed to a single channel sound. Force to monoIf enabled, the audio clip will be down-mixed to a single channel sound.

Audio in Unity Audio Components: Audio Clip (cont’d.) Load TypeThe way Unity load audio assets runtime. Load TypeThe way Unity load audio assets runtime. Decompress on loadDecompress sounds upon load. Use this for smaller compressed sounds to avoid the performance overhead of decompressing on the fly. Beware that a compressed sound will use ~10x more memory that when decompressed, so don't use this for large files. Decompress on loadDecompress sounds upon load. Use this for smaller compressed sounds to avoid the performance overhead of decompressing on the fly. Beware that a compressed sound will use ~10x more memory that when decompressed, so don't use this for large files. Compressed in memoryKeep sounds compressed in memory and decompress while playing. This have a slight performance overhead (esp. for Ogg/Vorbis compressed files) so only use this for bigger files. Compressed in memoryKeep sounds compressed in memory and decompress while playing. This have a slight performance overhead (esp. for Ogg/Vorbis compressed files) so only use this for bigger files. Stream from discStream audio data directly from disc. This uses a fraction of the original sounds size of memory. Use this for your music or very long tracks. Depending on the hardware, a general advice is to keep this down to 1-2 simultaneously streams. Stream from discStream audio data directly from disc. This uses a fraction of the original sounds size of memory. Use this for your music or very long tracks. Depending on the hardware, a general advice is to keep this down to 1-2 simultaneously streams. CompressionAmount of Compression to be applied to a Compressed clip. Statistics about file size can be seen beneath the slider. It is suggested to drag the slider to a place that leaves the playback "good enough" but still at a small enough size to meet your file size/distribution needs. CompressionAmount of Compression to be applied to a Compressed clip. Statistics about file size can be seen beneath the slider. It is suggested to drag the slider to a place that leaves the playback "good enough" but still at a small enough size to meet your file size/distribution needs.

AUDIO LISTENER

Audio in Unity Audio Components: Audio Listener The Audio Listener acts as a microphone-like device. It receives input from any given Audio Source in the scene and plays sounds through the computer speakers. The Audio Listener acts as a microphone-like device. It receives input from any given Audio Source in the scene and plays sounds through the computer speakers. For most applications it makes the most sense to attach the listener to the Main Camera. For most applications it makes the most sense to attach the listener to the Main Camera. If an audio listener is within the boundaries of a Reverb Zone reverberation is applied to all audible sounds in the scene. (PRO only) Furthermore, Audio Effects can be applied to the listener and it will be applied to all audible sounds in the scene. If an audio listener is within the boundaries of a Reverb Zone reverberation is applied to all audible sounds in the scene. (PRO only) Furthermore, Audio Effects can be applied to the listener and it will be applied to all audible sounds in the scene.

AUDIO SOURCE

Audio in Unity Audio Components: Audio Source The Audio Source plays back an Audio Clip in the scene. If the Audio Clip is a 3D clip, the source is played back at a given position and will attenuate over distance. The audio can be spread out between speakers (stereo to 7.1) (Spread) and morphed between 3D and 2D (PanLevel). This can be controlled over distance with falloff curves. Also, if the listener is within 1 or multiple Reverb Zones, reverberations is applied to the source. (PRO only) Individual filters can be applied to each audio source for an even richer audio experience. See Audio Effects for more details. The Audio Source plays back an Audio Clip in the scene. If the Audio Clip is a 3D clip, the source is played back at a given position and will attenuate over distance. The audio can be spread out between speakers (stereo to 7.1) (Spread) and morphed between 3D and 2D (PanLevel). This can be controlled over distance with falloff curves. Also, if the listener is within 1 or multiple Reverb Zones, reverberations is applied to the source. (PRO only) Individual filters can be applied to each audio source for an even richer audio experience. See Audio Effects for more details.

Audio in Unity Audio Components: Audio Source The Audio Source gizmo in the Scene View and its settings in the inspector.

Audio in Unity Audio Components: Audio Source Rolloff mode: How fast the sound fades. The higher the value, the closer the Listener has to be before hearing the sound. Rolloff mode: How fast the sound fades. The higher the value, the closer the Listener has to be before hearing the sound.

Audio in Unity Audio Components: Audio Source Rolloff mode types: Rolloff mode types: 1. Logarithmic rolloff: The sound is loud when you are close to the audio source, but when you get away from the object it decreases significantly fast. 2. Linear rolloff: The more far away from the audio source you go, the less you can hear it. 3. Custom rolloff: The sound from the audio source behaves accordingly to how you set the graph of roll offs.

Audio in Unity Audio Components: Audio Source Rolloff mode types: Rolloff mode types: 1. Logarithmic Rolloff 2. Linear Rolloff 3. Custom Rolloff

Audio in Unity Audio Components: Audio Source Distance Functions Distance Functions There are several properties of the audio that can be modified as a function of the distance between the audio source and the audio listener. There are several properties of the audio that can be modified as a function of the distance between the audio source and the audio listener. Volume:Amplitude( ) over distance. Volume:Amplitude( ) over distance. Pan:Left(-1.0) to Right(1.0) over distance. Pan:Left(-1.0) to Right(1.0) over distance. Spread:Angle (degrees ) over distance. Spread:Angle (degrees ) over distance. Low-Pass (only if LowPassFilter is attached to the AudioSource): Cutoff Frequency ( ) over distance. Low-Pass (only if LowPassFilter is attached to the AudioSource): Cutoff Frequency ( ) over distance.

Audio in Unity Audio Components: Audio Source properties Audio ClipReference to the sound clip file that will be played. Audio ClipReference to the sound clip file that will be played. MuteIf enabled the sound will be playing but muted. MuteIf enabled the sound will be playing but muted. Bypass EffectsThis Is to quickly "by-pass" filter effects applied to the audio source. An easy way to turn all effects on/off. Bypass EffectsThis Is to quickly "by-pass" filter effects applied to the audio source. An easy way to turn all effects on/off. Play On AwakeIf enabled, the sound will start playing the moment the scene launches. If disabled, you need to start it using the Play() command from scripting. Play On AwakeIf enabled, the sound will start playing the moment the scene launches. If disabled, you need to start it using the Play() command from scripting. LoopEnable this to make the Audio Clip loop when it reaches the end. LoopEnable this to make the Audio Clip loop when it reaches the end. PriorityDetermines the priority of this audio source among all the ones that coexist in the scene. (Priority: 0 = most important. 256 = least important. Default = 128.). Use 0 for music tracks to avoid it getting occasionally swapped out. PriorityDetermines the priority of this audio source among all the ones that coexist in the scene. (Priority: 0 = most important. 256 = least important. Default = 128.). Use 0 for music tracks to avoid it getting occasionally swapped out. VolumeHow loud the sound is at a distance of 1 world unit (1 meter) from the Audio Listener. VolumeHow loud the sound is at a distance of 1 world unit (1 meter) from the Audio Listener. PitchAmount of change in pitch due to slowdown/speed up of the Audio Clip. Value 1 is normal playback speed. PitchAmount of change in pitch due to slowdown/speed up of the Audio Clip. Value 1 is normal playback speed. 3D Sound SettingsSettings that are applied to the audio source if the is a 3D Sound. 3D Sound SettingsSettings that are applied to the audio source if the is a 3D Sound.

Audio in Unity Audio Components: Audio Source properties (cont’d.) Pan LevelSets how much the 3d engine has an effect on the audio source. Pan LevelSets how much the 3d engine has an effect on the audio source. SpreadSets the spread angle to 3d stereo or multichannel sound in speaker space. SpreadSets the spread angle to 3d stereo or multichannel sound in speaker space. Doppler LevelDetermines how much doppler effect will be applied to this audio source (if is set to 0, then no effect is applied). Doppler LevelDetermines how much doppler effect will be applied to this audio source (if is set to 0, then no effect is applied). Min DistanceWithin the MinDistance, the sound will stay at loudest possible. Outside MinDistance it will begin to attenuate. Increase the MinDistance of a sound to make it 'louder' in a 3d world, and decrease it to make it 'quieter' in a 3d world. Min DistanceWithin the MinDistance, the sound will stay at loudest possible. Outside MinDistance it will begin to attenuate. Increase the MinDistance of a sound to make it 'louder' in a 3d world, and decrease it to make it 'quieter' in a 3d world. Max DistanceThe distance where the sound stops attenuating at. Beyond this point it will stay at the volume it would be at MaxDistance units from the listener and will not attenuate any more. Max DistanceThe distance where the sound stops attenuating at. Beyond this point it will stay at the volume it would be at MaxDistance units from the listener and will not attenuate any more. Rolloff ModeHow fast the sound fades. The higher the value, the closer the Listener has to be before hearing the sound. Rolloff ModeHow fast the sound fades. The higher the value, the closer the Listener has to be before hearing the sound. 2D Sound SettingsSettings that are applied to the audio source if the is a 3D Sound. 2D Sound SettingsSettings that are applied to the audio source if the is a 3D Sound. Pan 2DSets how much the engine has an effect on the audio source. Pan 2DSets how much the engine has an effect on the audio source.

AUDIO EFFECTS

Audio in Unity Audio Components Audio Effects(PRO only) Audio Effects(PRO only) Audio Low Pass Filter(PRO only) Audio Low Pass Filter(PRO only) Audio High Pass Filter(PRO only) Audio High Pass Filter(PRO only) Audio Echo Filter(PRO only) Audio Echo Filter(PRO only) Audio Distortion Filter(PRO only) Audio Distortion Filter(PRO only) Audio Reverb Filter(PRO only) Audio Reverb Filter(PRO only) Audio Chorus Filter(PRO only) Audio Chorus Filter(PRO only)

Audio in Unity Audio Components Audio Effects(PRO only) Audio Effects(PRO only) Audio Low Pass Filter(PRO only) Audio Low Pass Filter(PRO only) Audio High Pass Filter(PRO only) Audio High Pass Filter(PRO only) Audio Echo Filter(PRO only) Audio Echo Filter(PRO only) Audio Distortion Filter(PRO only) Audio Distortion Filter(PRO only) Audio Reverb Filter(PRO only) Audio Reverb Filter(PRO only) Audio Chorus Filter(PRO only) Audio Chorus Filter(PRO only)

REVERB ZONES

Audio in Unity Audio Components: Reverb Zones Reverb Zones take an Audio Clip and distortionates it depending where the audio listener is located inside the reverb zone. Reverb Zones take an Audio Clip and distortionates it depending where the audio listener is located inside the reverb zone. They are used when you want to gradually change from a point where there is no ambient effect to a place where there is one. For example when you are entering a cavern. They are used when you want to gradually change from a point where there is no ambient effect to a place where there is one. For example when you are entering a cavern.

Audio in Unity Audio Components: Reverb Zones The Audio Reverb Zone gizmo seen in the inspector: The Audio Reverb Zone gizmo seen in the inspector:

Audio in Unity Audio Components: Reverb Zones Properties Min Distance - Represents the radius of the inner circle in the gizmo, this determines the zone where there is a gradually reverb effect and a full reverb zone. Min Distance - Represents the radius of the inner circle in the gizmo, this determines the zone where there is a gradually reverb effect and a full reverb zone. Max Distance - Represents the radius of the outer circle in the gizmo, this determines the zone where there is no effect and where the reverb starts to get applied gradually. Max Distance - Represents the radius of the outer circle in the gizmo, this determines the zone where there is no effect and where the reverb starts to get applied gradually. Reverb Preset - Determines the reverb effect that will be used by the reverb zone. Reverb Preset - Determines the reverb effect that will be used by the reverb zone.

Examples Player sounds (footsteps, utterances) Player sounds (footsteps, utterances) Weapon sounds Weapon sounds Vehicle sounds Vehicle sounds Environmental sounds Environmental sounds Interface sounds Interface sounds

Converting stereo to mono with Audacity (Many game engines require mono sources for 3D sound, i.e. sound with volume based upon listener distance.) 1. Split stereo track. 2. Make both tracks mono. 3. Use the level control for each track, found on the left of the track, to set to: "Gain: -6 dB". Then when you quick mix, it is guaranteed to not clip. 4. Select both tracks 5. Project -> Quick Mix. 6. Save mono audio as.wav or.ogg.

Sounds on the internet The altavista.com search engine no longer allows you to search for audio files (and specific audio file formats). The altavista.com search engine no longer allows you to search for audio files (and specific audio file formats).

Sound/audio example Demo Audacity and “Good Times.” file:///j://pub_html/csc343/slides/gt.aup file:///j://pub_html/csc343/slides/gt.aup file:///j://pub_html/csc343/slides/gt.aup (actually an XML file) (actually an XML file) Isolate the bass track. Isolate the bass track. 1. lowpass filter 2. slow tempo but maintain pitch 1. Unity Sound exercise.

Sound/audio exercise Unity Sound exercise.