Introduction
In this lesson you will learn how to start taking more precise control of the sounds that you are playing in your game. This will include using sound ids, audio emitters, and audio groups. A focus of this lesson will be controlling, muting, and fading the sound of background music and sound effects separately in your game.
Part A – Sound Id’s
Every sound you play is treated like an individual game instance. It is given a unique id number that allows you take control of it once it is playing. Lets see how these id numbers can be used for a simple task of checking whether or not a certain sound is already playing in the game.
Watch the video: 16-01-A
Start with File: 16-01-A.gmk
Part B – Volume Control with Master Gain and Ids
The master gain value controls the overall volume of all sounds in the game, while individual sound volumes can be controlled using the id of the sound you want to control. Lets take a look.
Watch the video: 16-01-B
Start with File: 16-01-A.gmk
Part C – Emitters and Volume Control
Sound emitters are created and placed in the room. When you play a sound, you can choose which emitter you want to play the sound on. The nice thing about emitters is that you can play several sounds from one emitter, and you can also control things like the volume for an emitter. In this part we will look at how you can use emitters to control the volume of background music and sound effects independently. In lesson two you will continue to use emitters to create panning, fading, and positional 3d sound effects.
Watch the video: 16-01-C
Start with File: 16-01-C.gmk
Part D – Audio Groups
Audio Groups allow you to group sounds into, guess what, groups! Once sounds are in a group you can apply effects to the entire sound group at once. They are a must learn for total sound control.
Watch the video: 16-01-D
Start with File: 16-01-D.gmk
No Challenges – Just go try some of this stuff in your games!