ADXTutorialsUnreal Engine

Charging Weapon Sounds [Part 1]

In this 2-part tutorial, we will learn how to implement charging weapon sounds (and the subsequent shots) using Unreal Engine 5 and ADX for UE.

It is common to see the player charge a weapon in a shooting game, a magic spell in an RPG, or a special attack in a fighting game. The concept is always the same:
• Holding down a specific button will start the charging.
• The charging sound starts out low, and progressively gets higher while the button is held.
• Releasing the button ends the charge and triggers the release sound (e.g., a laser shot, a spell, a fighting combo, etc.).
• The release sound depends on the charging duration.

In our implementation in ADX, the charging sound will be smoothly controlled via an AISAC, while the release sound will use a Switch Cue based on a game variable.
In this first part, we will prepare the interactive audio data in Atom Craft, ADX’s authoring tool. In the next post, we will handle the implementation in Unreal Engine 5.5, using only Blueprints (no code).

We will use the ADX LE UE SDK (version 2.01.00). If you are not familiar with it yet, ADX LE is the light edition of ADX, and the SDK can be downloaded for free here: https://game.criware.jp/en/products/adx-le_en/

Importing the audio files

The first step is to prepare and import the sounds we will use. In this example, the “SE_Charge” wave file will play continuously while charging, and three different shot sounds “SE_ShotA”, “SE_ShotB”, and “SE_ShotC” will be triggered based on the charging state.

Make sure to prepare a sound effect that can be smoothly looped for “SE_Charge”, Once imported, select it in the Material Tree, set the Overwrite Loop Information to “True” and Loop Type to “Loop”. This will make it automatically loop.

Creating the charging Cue

To create the charging Cue, we will right-click on the Cue Sheet in the Work Unit Tree and select “New Object” -> “Create Cue ‘Polyphonic”. Give it a name that is easy to understand.

Once the Cue is created, simply drop the “SE_Charge” Material on it. Play it to verify that it is playing as a loop. from the material tree to place it.

Right-click on an empty space in the track list and select “New Object” -> “Create AISAC”.

Give it a name and set the AISAC graph type to “Pitch.” The idea is that the longer the charge, the higher and faster the sound will get.

Select the “Pitch” graph and edit it so that it progressively increases towards the right.

Start the playback and move the slider to hear how the sound evolves. The AISAC value on the left will be used when the charging begins, while the value on the right will be used when the charge reaches its maximum. Adjust the graph to your liking and depending on the type of sound you are playing.

Creating the shooting Cue

Let’s now create the Cue that will be triggered when shooting the weapon. Right-click on the Cue Sheet in the Work Unit Tree and select “New Object” -> “Create cue ‘Switch'”.

Place the 3 shooting sounds on separate Tracks in the Cue.

We will now add a “Game Variable” that will allow us to determine which sound to play. Right-click on the Project Tree and select “New Object” -> “Create Game Variable”.

Name the game variable. In this example, we named it “ChargeLv”.

Select the shooting Cue and open the “Switches” tab in the Inspector.

Assign the “ChargeLv” variable we just created to the Switch variable.

Press on the “Evenly” button to spread the sounds along the variable values in the graph.

It is time to check the results in the Session Window.

To do this, drag and drop the shooting Cue into the Session window.
Press the “Game Variables” button to edit the game variables for testing purposes.

Change the value of the game variable “ChargeLv” and confirm that the sound changes.

Building the Cue Sheet

We are now ready to export the Cue Sheet! Go to the Build menu and select “Build Atom CueSheet Binary”.

Select the options as shown below and press Build. A new ACB file will be generated.

In the second post of this tutorial, we will import the binary Cue Sheet we prepared in Unreal Engine and use Blueprints to implement charging weapon sounds!