This post demonstrates the implementation of ambience sound effects using AtomCraft.
We can consider that there are four main groups of sounds needed to create an immersive audio experience. They are Music, Ambience SFX, Action SFX and Voice. Each of these elements plays an important role in your game audio project.
One of the main purposes of the ambience is to prevent unnatural silence to happen when there is no action going on. It serves as the “glue” that holds things together and helps to create the sense of immersion. The ambience also helps reinforce storytelling by establishing the mood at specific moments. The crowd ambience in a football game is a very good example of this.
Basic ADX2 features used
This post gives us the opportunity to demonstrate many ADX2’s features, listed below along with a link to the corresponding tutorial video.
- The Cue parameters Tutorial #9
- The looping Tutorial #12
- The Switch & Selectors Tutorial #19
- The AISAC Tutorial #13
- The Session Window Tutorial #19
- Positioning and Panning Tutorial #14
There are many ways to implement ambiences in a game. With this method we want to demonstrate how to play all the ambiences of an entire game by triggering only one Cue.
The ambience Cue will play the right ambience depending on the location and it will progressively adapt to the time of the day.
Each Track (Day/Night) will have two components. The first one will be a background loop and the second one will be a sound randomizer.
To achieve all this we will need: 2 Switch Cues, Selectors, AISACs, Loop markers and the audio files. The game will play the main Cue and the Selectors labels will play the right ambience Track. At this point the AISAC system will change the ambience according to the time of the day.
Here is a screenshot of the project open in AtomCraft. We can see the two Cues:
If you want to see an example of this implementation in AtomCraft, we have created a little project that you can download below:
[This project requires AtomCraft version 2.27 or higher]
Step by Step
We are now going to explain step by step how we have done the implementation of this ambience Cue.
1- Import the audio files
The first thing to do is to import all our audio files in the Materials so they can then be referenced by one or multiple sound Cues. We can import audio files by dragging-and-dropping them onto the Material root folder and also by importing them from the Windows Explorer.
Go to the Materials pane, right-click on a folder and select “Add Material (Waveform) files”.
Once registered, all the audio files will be duplicated into the project materials folder. We suggest that you organize your files in subfolders.
2- Create the Sound Cues
We need to create two Cues. Let’s call the first one “Ambience”. This Cue will be used by the programmer to play all our ambiences. The second Cue will be called “Randomizer” and it will be used to play all the surround randomized SFX.
To create a Cue, go in the Work Units section of the project tree, right-click on the desired CueSheet and select “New object”. There are many different types of Cues available but for now we need to choose “Switch”.
Here we can see our two Cues:
3- Organize the Randomizer Cue
We will begin by creating two Tracks for each of our ambiences, one for the day and one for the night. Once we have created all the required Tracks, the next step is to add a Subsequence to each one.
A Subsequence has functions equivalent to a Cue. Tracks and Waveforms can be added, edited and randomized directly in the Subsequence. It’s essentially a whole Cue within a Track. Each Subsequence will contain the SFX we want to randomize. For instance, the “Forest Night” Subsequence could contain howl, wolf and frog SFX.
To create a Subsequence: right-click on a Track, select “New Object” and choose “Create Sub Sequence”.
We can see in the picture below our 4 Tracks (2 ambiences) with their respective Subsequences.
We are now ready to add our audio files in each Subsequence. To open a Subsequence, double-click on it. It will look exactly like a Cue:
Finally, set the Cue type to “Random” and drag & drop the audio files on the timeline. All Tracks will be automatically created. Don’t forget to setup the randomization parameters of the Cue [Volume, Pitch, Angle and Interior Distance].
Once we have assigned all our random SFX to their respective Subsequences, we need to insert the loop markers that will infinitely retrigger the random SFX contained in each Subsequence.
To insert loop markers: right-click on the timeline, select “New Object” and click on “Add Marker”. In the “Add Marker window” select “Infinite Loop” and click “Ok”.
The loop markers will appear in green on the timeline.
4- Organize the Ambience Cue
Let’s go back to our main Cue called “Ambience”. We will create a new Track for each different type of ambiences and we will add a Subsequence to each one.
Now, to make our ambiences shift depending on the time of the day, we need to add two Subsequences inside each Subsequences we’ve just created. We will create one for the day and one for the night.
Finally, both Subsequences (Day/Night) will have two Tracks. The first one is for the background loop and the second one is for the Randomizer Cue.
On the first Track: drag & drop the appropriate background audio loop from the Materials section of the project tree. In the example above, we’ve added our “Forest – Day” audio file.
On the second Track, a CueLink references the “Randomizer” Cue we’ve prepared previously. To assign a Cue to a Track, simply drag & drop it on the timeline.
5- Create the Selector
Selectors are variables that can take several predefined values called Selector Labels. At run-time, the Cues will check the value of Selector and only play back the tracks that are associated with the appropriate Selector Label. We will use it to make the ambience change according to the location.
The first thing we need to create is the Selector. In the Global Settings section of the project tree, right-click on the Selector Folder, select “New Object” and then click on “Create Selector”. The Selector will appear and we will rename it “Ambience”.
Now we need to create the Selector Labels. Right-click on the Selector, select “New Object” and then click on “Create Selector Label”. A new Selector Label will appear and we will rename it “Forest”. We need to create one Selector Label for each ambience.
To assign a Selector to an ambience Track: click on the Random/Selector tab of the ambience Cue and specify which Selector to use in the scroll down menu.
We can now associate the Selector Labels with their appropriate Tracks. For instance, we will associate the “Forest” Selector Label with the “Forest” Track in our “Ambience” Cue.
Moreover, we need to link the appropriate Selector Label with the “Forest” Track in our “Randomizer” Cue.
6- Create the AISAC
AISAC is a system allowing the control of audio parameters by values coming from the game. This kind of feature is also sometimes called Real-Time Parameter Controls (RTPC).
We are going to use the AISAC to alter the ambience sound depending on the time of the day. The game will send the value (time) to the AISAC assigned to our Cues, which will change the sound of the ambience (Day to Night) in real-time.
To be able to make the link between the game and the AISACs we need an AISAC Control. An AISAC Control is simply an identification name that allows the programmer to pass a value from the game to ADX2 so it can be mapped to an AISAC curve.
To create an AISAC Control, go in the Global Settings section of the project tree, right-click on the AISAC-Control Folder, select “New Object” and then click on “Create AISAC-Control”. Let’s name it “Time”.
To add an AISAC: select the Track (Day or Night) and, in the AISAC pane, click on the “+” button.
Finally, in the “add AISAC” window, select the AISAC Control “Time” you’ve just created and choose the “volume” Graph type.
We can now draw our volume curves. We want to fade out the day ambiance and fade in the night ambiance. To do that, we need to create a different curve for each track (Day & Night).
* We need to draw a volume curve for each “Day” and “Night” Subsequence in the “Randomizer” Cue but also in the “Ambience” Cue.
7- Test and Fine-tune
We are now ready to hear our ambiance Cue. It is possible to test the implementation in the Session Window.
To open the cue in the Session Window: select the “Ambience” Cue, click on the View menu and then select the Session Window.
This concludes our post about the implementation of ambience in AtomCraft. Let us know if you want to learn more about a specific ADX2 feature!
Many thanks to Watson Wu (http://www.watsonwu.com) for generously providing the audio assets used in the demo project