Exploring sound effects

00:00:00:07 - 00:00:23:29

Peter

We will take a small break from coding to make our game more appealing. We are going to add big brown music draggy. Also dust particles that will be triggered when we move our character and we are going to add some sound effects to a game in our project. Let's go to the projects stub and into the underscore Art Sounds Assets folder.


00:00:24:15 - 00:00:46:11

Peter

Here we have this underscore sounds folder and we have the music and the sound effects in music folder. We have the super power to D and here is the music that we can use for our game. The music files are about one minute long, but it is much longer than what the sound effect length is. The sound effects are about a second or less.


00:00:46:22 - 00:01:08:20

Peter

So in unity we have different ways for handling the different assets, especially the audio assets, which might be much bigger if they represent a full song in the inspector for this audio clip, we can have sound settings that we can modify depending on if we are importing a longer music clip that is larger or a smaller sound effect.


00:01:08:20 - 00:01:37:25

Peter

It is much shorter. We want to tweak the import settings of an audio asset and we have a couple of those settings. If we decide to down, we can read more about them. First one is first in mono. This allows us to switch to multichannel audio to be mixed down to smaller track before parking. This is useful when we want to use a sound in a 2D game to scale the volume of our sound, depending on how far the player is from the sound while maintaining the same sound from both channels.


00:01:38:03 - 00:01:59:05

Peter

What interests us right now is this load in background which is useful for longer sounds that usually are bigger in size in terms of the file. And this allows us to not load all the cells at the start of our game, but instead load them while we already are playing the game. And this loading happens on a separate thread.


00:01:59:06 - 00:02:29:00

Peter

So this allows us to brood our game much faster, allowing the player to play the game well. We are still loading some longer music trucks. Of course, if we don't need them, we can do that. If we need them right away, we might want to consider loading some of them early on the AMP Sonic setting is specific for VR games and those sounds are recorded using a different microphone set up and they sound good when we are in the VR space when we are rotating our head.


00:02:29:12 - 00:02:53:10

Peter

Another setting that you want to talk about right now is this loads type in the properties. This is in this separate tab in our import settings and the load type is the method that a unit uses to load the audio at runtime. So there are different settings. First setting is the decompress on load and it is useful for shorter sounds.


00:02:53:16 - 00:03:17:22

Peter

Says it loads the sounds immediately into our memory. The compressed in memory setting is useful when the decompress unload doesn't do its job well and the last setting the streaming option is the setting that we want to use for longer music clips as it splits the clips into smaller chunks and loads the chunks instead of the full file.


00:03:17:23 - 00:03:41:03

Peter

So the result is that we load less data into our memory. You can read more about those settings and other settings for the imports of the other clips here in the documentation for the audio clip. Okay, let's select all the music clips that we have and we are going to ensure that we set in the inspector the load in background to be checked.


00:03:41:25 - 00:04:06:00

Peter

And we also want to set the default load tab to be there streaming. We could probably said the forced in mono, which would again cut the size of the clips since we would only load one channel and played on both channels of our speakers. But I don't think that we want to use it all the time, and especially for the music where there can be some difference in different channels.


00:04:06:07 - 00:04:33:14

Peter

So let's leave it. Let's leave the first mono off, make sure to click apply, changes the button in the middle of the inspector and unity with the re-import of those audio clips. Now in the project step, let's go to the SFX folder and we have the character and the farming sounds. Let's start for the character sound. It is the step sound that we played and we can apply to this also different settings.


00:04:33:14 - 00:04:53:23

Peter

So we want to force it to be mono because the rest of the settings is already preset. The load in background is unchecked and the load type is decompressed on load. So let's apply this change and we are going to go to our farming folder and we are going to set all those files and you might see that some of those files are a bit different.


00:04:54:01 - 00:05:18:18

Peter

Like this put into inventory. It has a slightly different track on both channels, but this is because of how this audio clip was created. Other clips have the same sound on both channels, so I'm going to just select all of those clips and again, repeat this process of setting those to mono says this setting will work for our sound effects, so let's apply it.


00:05:19:00 - 00:05:27:15

Peter

And again, unity will re-import those files. Okay, our audio assets are prepared, so let's start using them in the next video.



Complete and Continue