[MUSIC] What are audio mixers? Audio mixers are a really important and fun part of Unity. They allow you to specify how all of the audio in a particular scene, or if you want just the audio for a particular room is balanced and mixed. It's quite interesting how it does this, and so it's good to see it. >> Now I've got two objects in my scene, a cube and a sphere, each of them has an audio source. The cube is the truck engine, the sphere is background chatter from the London underground. And if I play these we'll see that we can hear both of them at the same time. [SOUND] But you can hear it's a bit hard to make out the difference between them. We'd like to be able to control the relative volumes and we're going to do that with an audio mixer. So I'm going to go to Window, Audio Mixer. Which has appeared up here, I'll move it down here. And this is the list of mixers, there were no mixers yet. There's a little plus button. I'm going to use that to create a mixer. And we can see here we've got a single master channel, it's called a Group. But we want to add some more channels so that we can trade them off. So I'm going to add a new group. And so we've got two groups, and we can use these to control the sounds and mix between them. If I go back to my object, and I can go to my Audio Source, the Audio Source has an output option which is an audio mixer. So if I click on that I can select which one I want. I'm going to select the master for the cube and the new one for the sphere. Now, I'm going to play and I am going to change them around. I'm going to [SOUND] click Edit, Play Mode. If I take the master down, the truck audio reduces. And there's not much of the London underground yet. If I bring that up a bit. You can hear a slight background chatter. It's going to increase a bit and in fact [SOUND] taking the track up increases [SOUND] [INAUDIBLE] So there we are. You can use mixers to control the relative volume of different sounds in your scene. >> Audio mixers are Unity assets, which means you can have loads of them. There's not just one mixer where everything goes. You can have an audio mixer which is specific to any number of audio clips. You can also have the same audio clip being controlled by different mixers. You can also plug mixers into other mixers, which is really flexible. This means you can have chains of effects that only get applied in certain circumstances. All audio mixers have a master group. The great thing about this is you can apply all the effects to your master group and then select the channels in your mixer which are in that group. All of the audio clips and audio sources can be assigned to this group. And so if you want for example to assign a particular set of sounds to a reverb zone or to an effect like delay, you can do so. Also if you're in the middle of a battle zone and you get hit by a grenade. What might be great is if everything all of a sudden blacks out and you get that characteristic high-pitched warning noise that they like to do in games like Call of Duty. You can do that really effectively with an audio mixer. Because you can just have those sounds which are in your local area suddenly get ducked down because of the explosion, and you can introduce the high pitched sound which represents your ears bursting. What's really great about that is any music which is happening at the same time can continue in the background unaffected by your audio mixer. There's one really crucial thing about audio mixers that you need to understand in Unity. Audio mixers don't have any control over the spacial positioning of your sound sources. Once a sound is attached to a source and it's moving in an environment, the position, distance, and direction and speed are calculated by your HRTF engine. So it's nothing to do with your mixer. By the time the sound gets to your mixer, it's already been attenuated. That means it's already been modulated by your spatialization software which is under the hood in Unity. This has advantages and disadvantages. It means you can't really play artificially with the spatialization of a particular sound source in your mixer. It also means you don't have to worry about the position and spatial information of any of your audio objects in the game world. It's very important that you understand this because if you're using an audio mixer and you decide that a particular sound isn't loud enough, if you increase that sound, and it's because its actually a long way away. When it gets close to you, it will suddenly become very, very loud. One great feature of the Unity audio mixer is the snapshot feature. The snapshot feature allows you to save, effectively, a preset series of settings for all of the volume and effects controls and parameters for your audio mix, for a particular mixer. Now, it doesn't just stop there. Snapshots are really great for sequencing transitions within one mixer. So let's say that your user in your virtual world is swimming underwater. You'll have very specific filters. For example you'll have removed some of the top. You'll have sounds that are really washy, you may also be using some echo to create that sound of distant distorted reflections. You may have so flanging and some other things happening. When the user exits the water, at that point you'll want to change from one setting to another setting. And because you're using all kinds of different filters, a reverb zone isn't going to be necessarily enough. By using snapshots you can have a snapshot for your underwater setting and another snapshot for your main room. So you exit the water and you go into another environment, and you can use the snapshot to change from that one environment to the new environment sonically. Which really enhances the realism. Also you can transition in really interesting ways between different snap shots. You have lots of snapshots and you can just transition between them. So it's a really good idea to use this audio snapshot feature do define the acoustic characteristics of every space you're in. [MUSIC]