To install Wwise you will need to create a Wwise Account and download a Wwise launcher. The Wwise Launcher is a tool by Audiokinetic used to install, manage, and integrate the Wwise with other software and game engines, like Unity or Unreal Engine.
Now, you will need to install a specific version of Wwise to establish a connection with our game.
For Mac:
For Windows:
10) Under Deployment platforms, check Microsoft
After the process of installation is finished you should get the prompt saying Install operation completed successfully.
Download the Game and all the relevant course material from the following link:
After download and installation try running the game by double-clicking FPS_SpaceShooter_212_RCM_Mac.app on Mac and FPSMicro_StartGame.exe on PC
The Mac system packages all the necessary files and folders under one .app file. As such it is very easy to use the game and move it across the system, however it limits the access to the subfolders we will need to modify when creating our music system. Windows users can skip this step and immediately go to Lesson I.
We will need to modify the .app file in order for Wwise to access needed sub-folders.
FPS_GamesModule_NFTS, has become a normal folder with additional sub-folders.
Since FPS_GamesModule_NFTS is only a folder it will not run the game when Double-clicked.
To run the game we need to follow these steps:
Game should run as before.
In this lesson we are going to start from scratch. We will remove all sounds from the game, create a new blank in the Wwise session, import music and create everything needed to successfully implement title music into the game.
In order to hear the differences between the newly added material better, we are going to remove all the sounds from the game. Game should still work normally but it will be without any sound.
In order to remove sounds from the game we should do the following:
On Mac:
Note: Be sure to remove only the contents of Mac folder and not the folder itself
Game should play normally but you won’t be able to hear any sound because all the sounds and music were deleted from the game.
On Windows:
Note: Be sure to remove only the contents of Windows folder and not the folder itself
Game should play normally but you won’t be able to hear any sound because all the sounds and music were deleted from the game.
Ok! Now let’s create a new Wwise session.
if you are on the Mac:
If you are on the PC:
Mac:
Windows:
Now we are ready to import our first piece of music.
In the Project Explorer View select Default Work Unit inside of Interactive Music Hierarchy
Right-click on it and select Import Audio Files…
Note: The Chosen file appears in the Audio File/Folder Area
Note that the Default Work Unit inside Interactive Music Hierarchy is highlighted and it has an arrow in front of it, signifying that it has content.
Select Music_Titles_83_44_Pm1 Music Track
Press Play in the Transport Control View or Press Space Bar to play the music to listen to the imported track.
If you can not hear any sound coming out of the speakers you haven’t set the Wwise application audio output correctly. To do so:
For everything that happens in the game that may need an audio response, a
programmer has added lines of code to transmit a message informing Wwise
about what has occurred. This message is referred to as a Game Call. Game Calls
are just simple messages that say things like “Titles Have started”, but
in reality this message is sent as a string of text or numbers. When this message is
received by the audio engine, any number of things can happen as defined by you.
The first thing that you need to do is to create an Event, so that Wwise can catch
an incoming Game Call. Think of it like a game of catch between the game engine
and the audio engine. The ball being thrown from the game engine is the Game
Call, while an Event is a type of object within Wwise designed specifically to
catch Game Calls. The important thing to note is that each Game Call needs an
identically named Event to be received by Wwise.
To create an Event to trigger the music we have imported we need to follow these steps:
note: once Default Work Unit is selected Event Icon becomes available in the row of icons just below the Events tab
You can see that the new action is created but there is a Red Rectangle inside the Target column that signifies that the Target is missing.
In the Project Explorer Browser expand Interactive Music Hierarchy and Default Work Unit to select Music_Titles_83_44_Pm1
Press OK
If you can hear the Title Music playing you have correctly created and set up your first Event.
We have created an Event that plays the Title music but we will need one that stops the music when the Player presses Play button in the game.
This time we are going to use a slightly different method than before.
In the Project Explorer View select Events tab and Right Click on Default Work Unit inside Events Folder.
Select New Child → Event
Right-click inside the red rectangle and select Browse
In the Project Explorer Browser expand Interactive Music Hierarchy and Default Work Unit to select Music_Titles_83_44_Pm1
Press OK
Before we begin creating a SoundBank, let’s take a moment to understand two very important concepts in Wwise: Work Units and SoundBanks.
Wwise Work Unit is a file within the Wwise project that organises and stores specific audio data, settings, and configurations. Work Units are used during the development process to structure and manage different aspects of the audio content, such as sound effects, music, or dialogue. They allow team members to work on separate parts of the audio project simultaneously. F.e. You can have Sound and Music Work Units, as is the case in our game.
SoundBank is a compiled package generated from the Wwise project, containing the actual audio assets, events, and instructions necessary for the game or application to play the sounds. SoundBanks are loaded into the game engine at runtime, providing the audio resources needed during gameplay. Typical released games normally have multiple Sounbanks. F.e. Each level of a game can have its own SoundBank. Game saves a significant amount of resources If only sounds that are actually needed are loaded in a particular level.
In order for our Titles music to be heard in the game we need to create a correctly named Work Unit, SoundBank and associate Events that we created with it.
Select newly created Music Work Unit and Click on create SoundBank icon that becomes enabled once the Music Work Unit is selected.
Name the SoundBank Music
Wwise offers multiple different assemblies of views and windows. We can choose a Layout depending on a task we wish to do. If we wish to import and manipulate an asset we can choose a Designer layout which has the assembly of all the needed views, and if we wish to Mix several different sounds we can open a mixer layout. In order to associate Events with Soundbanks we will need to open a Soundbank Layout which will assemble all the necessary windows to do that.
In order to successfully load the sounds into the game you will need to set up a correct for inside Wwise Project SoundBank Settings.
On Mac:
FPS_GamesModule_NFTS/Contents/Resources/Data/StreamingAssets/Audio/GeneratedSoundBanks
FPS_Test-15/Mac/FPS_GamesModule_NFTS/Contents/Resources/Data/StreamingAssets/Audio/GeneratedSoundBanks/Mac
On Windows:
FPS_GamesModule_NFTS_Windows/FPSMicro_StartGame_Data/StreamingAssets/Audio/GeneratedSoundBanks
5) Under SoundBank Paths and Windows change SoundBank Folder by clicking (...) symbol
FPS_GamesModule_NFTS_Windows/FPSMicro_StartGame_Data/StreamingAssets/Audio/GeneratedSoundBanks/Windows
Make sure that in the Platforms the Mac is checked if you are working on a Mac System or Widows if you are working on a PC.
In Languages check English
If you can hear the sound again you have successfully connected Wwise and the game. If not, repeat steps from the Connect Wwise session with the Game. Make sure that you have selected the correct destinations.
As game composers, we often face the challenge of not being able to predict exactly how long a player will take to complete a section of the game we're scoring. For example, one player might press "Play" within 5 seconds, while another might take 5 minutes to savour the beauty of the music and scenery before doing so. This variability is challenging because, in addition to composing interesting music that supports the game's concept, we need to make a single piece of music adaptable to various lengths while maintaining the player's interest. Fortunately, Wwise offers several tools to help us achieve this. In this lesson, we will explore some of these tools and the basic concepts behind them.
Please download and UnZip the necessary Material for this lesson by clicking the link below:
Once the project is opened, you'll notice there is quite a bit of new material compared to the session from the previous lesson. If you expand the Actor-Mixer Hierarchy and its Default work unit, you'll see it is populated by numerous sounds. These are the same sounds you could hear in the original game. The reason for including them in this session is that when you generate soundbanks and play the game, you'll have both music and sounds, which can help you assess your work more effectively.
Following the same Steps as in Connect Wwise session with the Game and Generate session and test the Game from the previous Lesson.
Play the game and test how it works with the title music you successfully imported.
Now try playing the game again, but this time, wait a bit longer before pressing Play. Notice that the music eventually runs out, leaving an empty sonic space. This is a classic case where we would aim to create a loop of our music. This approach allows the music to continue playing until the player presses the Play button, at which point our Music_Stop_Titles event will stop it.
To create a loop, we need to instruct Wwise on where the audio should stop and where it should return. In Wwise, these points are marked by green and red flags.
We could try moving those flags right away, but we'd quickly realise that without a tempo grid, it would be a very laborious process.
Wwise allows us to use a visible tempo grid; however, to utilise it, we need to enter the tempo information, time signature, and other details—all of which are conveniently provided in the file name.
Note that while holding Command and dragging the Green Flag, you are effectively moving the bar marker. After this action, your bar 1 should now be where bar 2 was previously.
By Setting Green (Pre-Entry) Flag and Red (Post-Exit) Flag you have defined three different zones in your Music.
Even though you have successfully defined where the loop is going to happen, if you play the file it will not loop. In order for music to loop we will need to create a Music Playlist Container Object.
In the Project Explorer View Right-click Music Track Music_Intro_83bpm_44_L16m_P1m
Select New Parent → Music Playlist Container
Call this Playlist container IntroMenuMusic
Expand the newly created Playlist Container so it reveals Music_Intro_83bpm_44_L16m_P1m Music Segment.
Select IntroMenuMusic Playlist Container
In the bottom of the Property Editor View click on Music Playlist
It's perfectly normal not to be successful on the first try. This particular function can be a bit fiddly and definitely takes some getting used to. If it doesn't work, just repeat steps 14-16 until you get it right.
You can also build the game repeating the steps Generate session and test the game and test the loop in the Game.
While Wwise offers a range of audio effects, it is not customary to add those effects at this stage. Typically, all processing is done in a DAW (Digital Audio Workstation). The primary reason for this is that effects consume a significant amount of CPU power, and since processing power is one of the most crucial resources in game development, it's always advised to use as little of it as possible. Additionally, it's good practice to divide tasks: composition and mastering should be done in your DAW, while Wwise should be used for implementation only. However, under the right circumstances, adding FX in Wwise can be very useful and time-saving. Wwise also offers methods to prevent additional CPU usage when processing audio effects.
Listening to Music_Intro_83bpm_44_L16m_P1m In the game, I realised that the mix wasn't up to standard. The file had excessive amounts of low and high-end frequencies, so I corrected it by adding an EQ to tame those frequencies.
By ticking the Render option, you are instructing Wwise to render or burn-in the effect with the audio file when generating the Soundbank. This way, the game won’t use any additional CPU for processing the effect, but you'll still be able to change the effect's properties in Wwise even after rendering.
This is a powerful concept within Wwise that allows you to reorder and randomise different parts of a composition, creating interesting variations of the music and drastically prolonging its duration.
To learn how to use this feature, we are going to start working on a new segment of the game called InGame.
You will soon notice that all three files are different parts of the same composition, each with its own loop. This was done to enhance blending between the parts of the composition.
You can see that better from the original DAW session:
Note that by changing the tempo in the Parent Playlist Container, all three Music Segments inherit the new tempo. Inheritance is a very important concept in Wwise, and being aware of it can save you a lot of time when creating your music system.
Note that since all three files do not have any pre-entry (P0m) we do not need to move the Green (Pre-Entry) Flag.
Note that you will need to do this by dragging and dropping each one individually.
You will notice that the Playlist Container plays the sequence in order: first A, then B, and finally C. After that, it loops and repeats the same sequence. The currently playing segment is indicated by a small triangle in front of the segment.
Even though the system is functioning, it doesn't make much sense to use it in this way, as it would be more economical to simply export one long file with A, B, and C included and set it to loop.
You will note that the music is not played in Sequence. The elements sequence of elements are chosen Randomly and they are different with each Loop.
In some instances, we may want more control over randomization. During testing, I discovered that I would like the sequence to always start with the A part, then move to either the B or C part, before returning to the A part. Luckily, Wwise has built-in functions that allow me to do exactly that.
Random Step is different from Random Continuous in that it will randomly choose only one element from the group and finish the sequence. Whereas Random Continuous will play all elements in the group in random order before finishing the sequence.
When listening to the InGame music, I discovered that I would like the C part to occur less frequently. I want it to be more of a flourish rather than a regular part of the composition.
I can achieve this by adjusting the Weight or percentage chance of it being chosen in the group:
Playlist containers have many other useful functions that we do not have time to cover in this course. However, you can learn about their functionality by accessing the item-specific help documents.
For example, if you are interested in learning more about the Random Type and Avoid Repeat columns in the Group/Segment Area, you only need to:
We have learned how to randomise elements of the Playlist and also how to control randomization. Let’s have a brief look at how to randomise some parameters in the Playlist container.
Let’s say that I would like the A part of my InGameMusic playlist to sometimes repeat before moving to the next segment. We can achieve this by randomising the Loop Count in the Group/Segment area.
Note that the randomization of parameters is also available for other Wwise parameters such as Volume, Pitch, etc. Whenever you see the tennis ball icon randomization is available. When this icon turns golden
, it means that randomization for that parameter is engaged.
In the previous lessons, we successfully imported, looped, and randomised music for two different scenes of the game. In this lesson, we will focus on creating a music system that allows us to seamlessly transition between these scenes. Additionally, we will explore how to test the system in Wwise and how to add musical embellishments such as transitions and stingers.
Please download the necessary Material for this lesson by clicking the link below:
In order to start creating our Music System we will need to create a Music Switch Container.
Now we need to create an event that will play our Music System at the beginning of the game.
We learned one way of creating an event in Lesson 1. Now, we will use a different method:
Note that, as before, the name of the event must be exactly the same for it to be called correctly from the game.
If you try playing that object, you will notice that no music is playing. This is because the Music Switch Object, apart from the Action play, requires us to define the states of the gameplay and associate the correct music objects with them.
Game States define the overarching context of the game at any given time. For instance, we have defined five different states in which the player can be. At the beginning of the game, the player is in the Title State. Once the player presses the Play button, the state changes to FirstFloor State. When the player finds the key and enters the corridor to go to the Basement, the state changes to Basement State. If the player manages to destroy all the enemies, the state changes to Victory. If the player is defeated, the state changes to Defeated.
States are global events, meaning that all objects are aware of the state changes. However, developers can decide which objects react to these changes. In the game's code, we have decided that state changes will be sent to Wwise to switch music in the Music Switch Container. Even though the state changes are hard-coded in the game, we need to create the correct recipients in Wwise.
Expand the States folder in order to see the Default Work Unit.
Right-click the Default Work Unit and select New Child → State Group
We have created a State Group; now we need to define each state within that group.
Name the State Titles.
Create 4 more States repeating step 5) and name states so they match exactly the Names in the picture below.
Now that we have created State Group and States in Wwise we can Associate our Music Object with the correct States.
Expand the Music Switch Container so it reveals InGameMusic and IntroMenuMusic.
Drag and Drop IntroMenuMusic to Titles State in Association Editor.
Note that the MusicState Group appears with a dropdown menu that allows us to choose the state directly from the Transport bar. This is a very useful feature for testing the system.
Now you can hear the IntroMenuMusic playing.
Press Stop
Now change the State to FirstFloor and press Play
InGameMusic should be heard.
The change of state should automatically trigger the associated music without needing to stop and replay it. However, if we try this, we’ll discover that it’s not working. This is perfectly normal because we haven't yet defined how one segment should transition to the other.
Select Music Switch Container.
In the Property Editor View click on the Transition tab.
If we look at the Source area of the Transition Tab, we can see that the Exit Source is set to "Exit Cue." This means that the system is waiting for the segment to reach the Post-Exit zone. Since we have set all of our segments to loop infinitely, our source will never reach the Exit Cue. This is precisely why the music segments do not change when we change the state.
By changing the Exit Source to one of the following options: Immediate, Next Grid, Next Bar, or Next Beat, we will be able to transition from one segment to another without needing to stop and start the Transport Control.
Now the transition works; however, it is very abrupt and not very musical. We could try and solve that issue with blending both segments with the use of Fades.
Transitions sound better with crossfades; however, there is an inherent problem: the two music segments are in different tempos, which will always prevent a smooth transition between them. This is a classic example of a situation where a Transition Segment might be very useful.
Right-click Music switch container and select New Child → Virtual Folder
Name the Folder Transitions
While the folder is selected enter Shift + I keyboard shortcut that will open the Audio File Importer Window.
Press Add Files… and navigate to the LessonMaterial\Lesson3\Audio
Choose To_Ingame_44_120_L2m_P0m and press Import.
Select To_Ingame_44_120_L2m_P0m music segment and define Entry and Post-Exit zones as indicated by the file naming convention.
Select the Music switch container and press Transition tab.
Select transition Any to InGame Music.
In the Transition Segment area of the Transition tab check Use transition segment.
Lastly, we are going to import two audio files and associate them with Defeat and Victory States.
Select Music playlist container.
Import the Music_LooseStinger.wav and Victory-138bpm4-4_L4M_P1M-1.wav from the Audio folder in Lesson3 using one of the three methods learned.
Set Tempo, Pre-Entry, and Post-Exit using information provided in the file name.
Associate Music Segments with States by dragging and dropping them on respective states in association editor.
Create two new transitions in the Transition tab.
Set Exit source at: Immediate.
Test the music by playing Music switch container and changing states from FirstFloor to Victory or from FirstFloor to Defeated.
In the previous lessons, we learned how to loop and re-sequence our music, focusing on manipulating single audio tracks. In this lesson, we will learn how to randomise and interactively manipulate elements of some of those tracks.
We are going to start by substituting A, B and C parts of our InGameMusic music with a multitrack of those same parts.
Please download the necessary Material for this lesson by clicking the link below:
Note that in the Audio File Importer, Wwise will suggest making the folder a Music Segment and all the contents of the folder Music Tracks, which is exactly what we intended to do.
Press Import.
Expand the newly imported Music Segment A in the Project Explorer, and observe that it now contains several music tracks.
We will proceed with importing folder B and C using a faster method:
Press Import in Audio File Importer
Select InGameMusic and check if the tempo is set to 118 bpm. If the field is greyed out, tick the Ignore Parent box, then enter the tempo.
Set the looping zone by moving Post-exit Red Flag in each segment to the end of the loop as learned in Lesson 2: Creating a Loop
If we look at the Music Segment Editor, we can see a view that is not too different from what we are used to in our DAWs. We have several tracks with audio files on them, Mute/Solo buttons, and Volume Control. It is safe to assume that the Music Segment Editor was designed to offer similar work-flow for manipulating audio as the majority of other DAWs.
If you play the A segment you will notice that it is the same track as before, however it has the addition of a percussive element. This percussive ‘fight’ element of the track is intended to switch on and off depending if we are fighting Hoverbots or not and is playing from A_Fight Add_118bpm_44_L4m_P0m track. Since this is something we will be learning later in this lesson we will mute this track so we can hear exactly the same music as before.
As good game composers, we are constantly on the lookout for anything that could potentially make the music feel too repetitive or distract from the gameplay.
After listening to the segment several times, I have assessed that the melodic fills on the track A_ToyPiano_118bpm_44_L4m_P0m are too repetitive, and after a while, they may cause players to disengage from the game.
We will address this potential issue by editing the material directly in Wwise software by having three possibilities: play first the Toy Piano melodic phrase, play second the Toy Piano phrase, and don’t play the Toy Piano phrase.
With this, you will effectively change the type of the track. There are several types available, all of which we will explore in this lesson.
Note that our A_ToyPiano_118bpm_44_L4m_P0m track has expanded, allowing it to host two audio tracks.
Now you have two identical regions both representing A_ToyPiano_118bpm_44_L4m_P0m audio file. If we were to play our Music Segment now, it would first play the top sub-track region, and when played again or looped, it would proceed to play the bottom one. Since the audio file on both tracks is exactly the same, there will be no audible difference.
Now we are going to edit each of the regions in order for each to feature a different part of the audio file.
Solo the A_ToyPiano_118bpm_44_L4m_P0m track.
Select the top region and scroll to the end of the region.
Grab the square icon in the bottom-right corner of the region and drag it to the bar 5.
Note that if you play the segment again, the top region might not be played, as the system alternates between the top and bottom sub-track each time it plays or loops. Although this is the intended function, it can make the auditioning process somewhat difficult. To simplify auditioning, you can engage the Focus icon, which ensures the focused sub-track is played each time the object is played or looped. Just remember to disengage this function before generating the Soundbank for the game.
Focus the top Sub-Track and audition the fade by playing the Object.
Put the fade-in on the bottom region by grabbing triangle icon at the top-left and moving it to the right.
By playing and focusing on each sub-track, you may notice a discrepancy between the volume of the phrases.
To level the Volume:
Note that a thickened red line appears on the top of each region. That line represents the Volume level at which the region is playing currently. Since it was not altered all of the regions are playing at 100% of their Volume.
Now, let's add a third sub-track to account for the possibility that none of the phrases are playing.
The system we have established helps immensely with keeping the segment varied and interesting. However, we can further enhance this by changing the track type to Random. By setting the track type to Random, Wwise will randomly choose which sub-track to play at any given time, thus greatly increasing the variety of the segment.
Right-click A_ToyPiano_118bpm_44_L4m_P0m and select Random Track
Lastly, repeat the same process of Editing also on Music Segments B and C by repeating the steps in this chapter. Editing & Automation of Music Tracks.
Note that since we wish ToyPiano to be a Random Track you can select Random Track in step 6) and omit step 25).
Switch Tracks
Switch track is another type of track that can be used in Wwise, utilising a Game Sync system similar to States, known as Switches. While States are primarily used to control Music Segments and Music Playlists, Switches are mainly used to control individual assets (audio files) within a Music Segment.
In our game, we will use Switches to add percussive elements to the playing segment when the player is engaged in combat and ensure those elements are not playing when they are not.
Observe that we have two sub-tracks: one with a region and one empty. Now, we will proceed to create Switch Game Syncs that will allow us to play the correct sub-track depending on whether the player is engaged in a fight with Hoverbots or not.
Now that we have greeted the Switch Group and Switches that will be recognised by the game let’s associate switch Sub-Tracks with desired Switch.
Note that we are setting a default switch as a precaution in case the game fails to set the initial switch at the start. If this happens and no default switch is set, the music system might fail entirely, resulting in no music playing. By setting a default switch, we ensure the intended music will play at the beginning of the game.
Note that if the association is done correctly, the words "Fight" and "Explore" should appear on their respective sub-tracks.
Modify the B and C music segments using the same approach, ensuring that the appropriate switches and sub-tracks are set up just as they were for the previous segment.
Select InGameMusic Playlist container.
Click on the Switch icon in Game Syncs area of Tracsport Control.
You won't hear any changes yet because, similar to the Music Switch Container, we need to define the transitions. However, in this case, we will define the transitions directly on the music track rather than on the parent object.
Set the Fade-out to 1 second with 1 second Offset
Set the Fade-in to 1 second with -1 second of Offset
Define transitions for the music tracks of the B and C segments as well.
Play InGameMusic and change switches in the game sync area of Transport Control.
You should be able to hear the percussion come in with the change of the switch.
RTPC stands for Real-Time Parameter Control in Wwise. It allows us to dynamically adjust audio properties, such as volume, pitch, or effects, based on real-time variables from the game. These variables can include things like the player’s health, speed, or proximity to certain objects. By linking game parameters to audio properties, RTPCs enable a more interactive and responsive audio experience.
Before we begin setting up the RTPC, let's import the last missing music: The Basement music.
Be sure to use the same capitalisation. Unlike Events, RTPCs are case sensitive!
We want to prompt the player to react quickly if their health is dropping dangerously low in the basement. To achieve this, we will increase the volume of the Basement-Gtr2_138bpm_44_L17M_P1b track in proportion to the decrease in health.
Note that a graph appears below. The X-axis represents the Player_health variable, and the Y-axis represents the track's volume. If we look at the red line showing the correlation between the X and Y axes, we can see that it is not set to give us the desired result. Currently, the track reaches its loudest volume at maximum health and its lowest volume at 0 health. What we want instead is for the guitar to start being audible around 50 health and gradually increase in volume, reaching its maximum just before 0 health. We can achieve this by manipulating the red correlation line.
You will notice that the Basement-Gtr2_138bpm_44_L17M_P1b volume increases the more we push the RTPC cursor towards 0 health.
If we want to assign a more natural curve to the correlation line, we can right-click the line between the left and middle control points and assign, for example, a logarithmic curve.
We can try a different way of auditioning the RTPC.
SoundCaster is a powerful feature in Wwise that allows us to test the behaviour of our music and audio systems without needing to run the game. By populating the SoundCaster window with all the necessary events or Objects and SoundCaster intelligently presenting all the syncs associated with those events or available in the game, we can quickly and easily test specific parts of our system.
Let’s say we want to quickly test balance between Music and Weapon firing SFX
In Soundcaster press Play on Music Switch module and while music is playing Press play on Player_fire and Shotgun_fire modules to mimic the player shooting their weapon in the game.
Change the state to Basement and keep on playing Player_fire and Shotgun_fire.
Press Stop at the top of the Soundcaster to stop all the music and sounds.
You can add and delete modules depending on what you wish to test. You can have as many Soundcaster sessions as you wish.
If you wish to Rename or Delete some of your Soundcaster sessions:
Click on the Sessions tab in Project Explorer.
Expand the Default Work Unit in the Soundcaster sessions folder.
Rename or Delete the desired session.
In the previous lectures, we learned how to create our music system. In this lesson, we will focus on adding the final touches and preparing the project for delivery to the Game Designer.
Please download the necessary Material for this lesson by clicking the link below:
Stingers are short musical segments meant to be played on top of the main segment. They are typically used to highlight and enhance game-related moments, such as when a Hoverbot spots the player or is destroyed. Stingers use a Game Sync called Triggers, which can be set to occur in sync with the music.
All of the tracks in the segments are intended to be played randomly, one at a time. To achieve this, we will make all of them sub-tracks under one parent Random Track.
Now let's prepare Hoverbot Death using a similar approach.
As you can see, the regions of these tracks are not clearly defined by tempo, and the peak of the cymbal roll does not align between them. We need to edit the regions so they align. We will also turn the snap off and align Pre-Entry and Post-Exit independently of the grid. This will allow us to precisely pinpoint the moment we want to correspond with the beat of the music when the stinger plays.
Note that the bottom region has a much longer roll than the other two. You can shorten the track so that the loudest part aligns with the other tracks and use a fade-in to mimic the roll.
By doing this, you are not setting the loop. Remember that Music Segments do not loop until they are part of the Music Playlist Container. This method only describes which point in the region you wish to synchronise with the beat of the music.
Now that we have imported and edited those music segments, we can proceed to create Game Syncs that will trigger the stingers.
Name the Trigger exactly Hoverbot_Alert
Repeat the steps 5 and 6 to create another Trigger.
Name the new Trigger exactly Hoverbot_Death
Press Add… again.
Press icon and select Hoverbot_Death Trigger.
Drag the HoverbotAlert Segment from Project explorer and drop it in the Segment To Play column of Hoverbot_Alert Trigger in the Stinger tab.
Drag the HoverbotDeath Segment from Project explorer and drop it in the Segment To Play column of Hoverbot_Death Trigger in the Stinger tab.
In both cases, the trigger plays; however, there is a noticeable delay between the click and the sound playback. This is due to the grid frequency, meaning the minimum time between beats in the music segment, being too large. Let's reduce this gap by minimising the grid.
We can minimise the gap even further.
While testing our triggers, we can notice that the InGameMusic is not behaving as it will in the game. The main difference is that the switch is not transitioning between the Explore and Fight states. Our main intention for the triggers was to embellish this exact change. While we could achieve this by quickly changing the switch right after clicking on the trigger, it is theoretically possible but not very practical.
Since we can populate the SoundCaster with various objects and events, we could create custom events that would simultaneously change the switch and trigger for us. Then, we could import that into our SoundCaster session. This would streamline not only our system but also the workflow we use for testing it.
Using steps 2-7 create another Event called HovDeath and set actions Set Switch MusicAttack\Explore and Trigger Hoverbot_Death.
Open the Soundcaster.
Drag Events HovAlert and HovDeath in the Soundcaster session.
The events we've created really streamline our testing workflow and won't interfere with the game. If you remember from Lesson 1, events need to be associated with soundbanks to be incorporated into the game. We can take advantage of this by not associating the HovAlert and HovDeath events with soundbanks. This way, we can use them internally in Wwise to speed up our workflow without affecting the game's functionality.
The Profiler in Wwise is a powerful tool that allows us to connect to any Wwise-powered game running on our computer and receive real-time information about the events and game syncs driving the audio system. It is invaluable for troubleshooting and debugging generated soundbanks within the game.
I have deliberately incorporated a mistake in the Lesson 5 Wwise session to give us an opportunity to use the Profiler for troubleshooting.
Immediately when the Title menu starts, you will notice that all the sounds are playing except the music.
You can see that there is only one red entry with the Type Error and that it is associate with the game object Music.
In the view below the Capture log called contextual help you can see more information about the error. The Contextual help describes the issue and Probable causes.
A first possible cause, that the SoundBank was not loaded, is not applicable because we would have encountered an error specifically stating that. The second possible cause, a missing SoundBank, is also ruled out, as we generated a fresh SoundBank in the first step. This leaves us with the possibility of a typo in the Event name or Event ID, which are essentially the same. Every name we assign to an event is converted into a numerical value known as the Event ID. Therefore, the most likely cause of the issue is a typo in the Event name.
If we examine the timing of the event, we can see it occurred relatively early in the game, so it's likely one of the first events triggered. Combining this with the probable cause (a typo in the Event name), the timing of the event, and the fact that no music is playing, it strongly suggests that the issue is a typo in the Music_Game_Start event. Let's go ahead and inspect this event further.
As you can clearly see, the issue stems from the event being incorrectly named. It's currently called Music_Game_Starts, while the correct name should be Music_Game_Start. We need to fix this typo to resolve the problem.
Music should now be playing as expected. Congratulations, Sherlocks, you've cracked the case!
Before we begin mixing the game, it's important to understand the key signal path concepts in Wwise and how they differ from traditional DAWs.
Wwise relies heavily on hierarchy and inheritance of properties, but objects in a hierarchy don’t pass signals to each other. Instead, the object associated with an asset sends its signal directly to the Master Audio Bus, regardless of its parent object. However, we can still affect the signal at different levels of the hierarchy, and the changes are cumulative.
For example, if we increase the Voice Volume on a Music Segment by 2 dB and also increase the Voice Volume by 2 dB on its parent Playlist Container, the end result will be a 4 dB increase, even though no signal was directly passed between them. This is because each parent object assigns its properties to its child objects, so the Music Segment will add the parent's increase to its own. This results in a 4 dB overall increase that is sent to the Master Audio Bus.
This hierarchy is similar to the functionality of VCAs (Voltage-Controlled Amplifiers) in traditional mixing.
The reason Wwise avoids summing signals is to conserve processing power. Summing signals consumes a small amount of CPU, which may seem insignificant for individual sounds. However, in a game with a large number of sounds that repeat frequently, this CPU usage can add up. Since most of the system's resources are usually allocated to processing graphics, minimising CPU usage for audio processing becomes crucial. By avoiding signal summing, Wwise ensures more efficient performance, especially in complex audio environments.
The only summing that is done by default is on the Master Audio Bus, which is the last possible place where summing needs to happen in order for the signal to be sent to an audio device.
The only exception to this is when we use effects. In order for an effect to process the signal, it needs to be summed before entering the effect. This is yet another reason why we try to keep the use of effects in Wwise to a minimum.
Another exception is Auxiliary Bus objects, which are used to add audio effects to objects. We will not be using these in this module because they work exactly the same way as in a DAW, and because we are trying to be economical with the use of effects.
Even though Wwise avoids summing, sub-grouping of elements is a technique that is widely used. Sub-grouping is done with objects called Audio Buses, which, similar to any parent object, pass their properties down the line rather than the signal.
We are going to use two Audio buses to separately control all of our sound and Music.
We will assign all the sounds to the Sound Audio Bus. However, unlike Music, which has only one parent object, the Music Switch Container Actor-Mixer Hierarchy has numerous parallel objects. Changing the Output Bus on each of these individually would be time-consuming. This repetitive task can be streamlined using the Multi Editor.
Now that we have sub-grouped the Sound and Music, let’s create a Mixer session to balance the Groups and individual Music Objects.
Note that below the Mixing Desk view, there is also a Soundcaster view, which allows us to trigger the music system and change game syncs in order to mix our music.
Because the signal is not passing through any of the objects in the Mixing Desk, we do not have any visual reference of what track might be playing. However, there is an inbuilt feature that can help with this.
Now if you look at the row of icons in the Activity area of the Mixing Desk you will note that some of the headphones icons changed colour to orange.
This means that those objects are associated with the currently playing music, and any change will be immediately audible. This feature is very handy for quickly identifying which track is playing.
| Music | ||||
| Events | ||||
| SoundBank | Work Unit | Event Name | Event ID | |
| Music | Default Work Unit | Music_Game_Start | 3635523532 | |
| Music | Default Work Unit | Music_Level_Complete | 381676261 | |
| Music | Default Work Unit | Music_Hoverbot_Alert | 1281769583 | |
| Music | Default Work Unit | Music_Game_Pause | 1489615104 | |
| Music | Default Work Unit | Music_Basement_Enter | 1497350281 | |
| Music | Default Work Unit | Music_Game_Unpause | 2146941807 | |
| Music | Default Work Unit | Music_Basement_Exit | 2181468901 | |
| Music | Default Work Unit | Music_Stop_Titles | 2566972229 | |
| Music | Default Work Unit | Music_Player_Defeat | 2835590192 | |
| Music | Default Work Unit | Music_Hoverbot_Death | 3365733963 | |
| Music | Default Work Unit | Music_Play_Titles | 3623402443 | |
| States | ||||
| Work Unit | State Group | State Name | ID | |
| Default Work Unit | MusicState | None | 748895195 | |
| Default Work Unit | MusicState | Basement | 1413413702 | |
| Default Work Unit | MusicState | Victory | 2716678721 | |
| Default Work Unit | MusicState | Defeated | 2791675679 | |
| Default Work Unit | MusicState | Titles | 3809106084 | |
| Default Work Unit | MusicState | FirstFloor | 4097174429 | |
| Switches | ||||
| Work Unit | Switch Group | |||
| Default Work Unit | MusicAttack | Explore | ||
| Default Work Unit | MusicAttack | Fight | ||
| Game Parameters | ||||
| Type | Work Unit | Name | ID | |
| RTPC | Default Work Unit | Player_health | 215992295 | |
| RTPC | Default Work Unit | MasterSound | ||
| RTPC | Default Work Unit | MasterVolume | ||
| Trigger | Music | Hoverbot_Alert | 3535084583 | |
| Trigger | Music | Hoverbot_Death | 3618812611 | |
| Sound | ||||
| Events | ||||
| SoundBank | Work Unit | Event Name | Event ID | |
| Sound | Sound | Turret_death | 124877840 | |
| Sound | Sound | small_doors_closing | 192732804 | |
| Sound | Sound | small_doors_open | 380130715 | |
| Sound | Sound | weapon_charge_start | 600481641 | |
| Sound | Sound | Jetpack_stop | 899103824 | |
| Sound | Sound | shotgun_Pickup | 1304554256 | |
| Sound | Sound | Player_jump | 1305133589 | |
| Sound | Sound | Player_take_damage | 1528071400 | |
| Sound | Sound | weapon_charge_stop | 1721627779 | |
| Sound | Sound | small_doors_stop | 1747548991 | |
| Sound | Sound | BlastDoor_Open | 1996631464 | |
| Sound | Sound | Hoverbot_attack | 2304462595 | |
| Sound | Sound | Player_footstep | 2453392179 | |
| Sound | Sound | Jetpack_empty | 2484289747 | |
| Sound | Sound | Turret_alert | 2530127952 | |
| Sound | Sound | Player_fire | 2583440997 | |
| Sound | Sound | Hoverbot_spawn | 2668156916 | |
| Sound | Sound | Play_Key_Pickup | 2881789206 | |
| Sound | Sound | BlastDoor_Stop | 3021958520 | |
| Sound | Sound | Player_death | 3083087645 | |
| Sound | Sound | Turret_attack | 3186477626 | |
| Sound | Sound | Jetpack_start | 3208028412 | |
| Sound | Sound | Hoverbot_alert | 3535084583 | |
| Sound | Sound | Pickup_health | 3554861522 | |
| Sound | Sound | Hoverbot_death | 3618812611 | |
| Sound | Sound | Player_land | 3629196698 | |
| Sound | Sound | Level_complete | 3736098925 | |
| Sound | Sound | Shotgun_fire | 3982195600 | |
| Switch Group | ||||
| ID | Work Unit | Name | ||
| 2385628198 | SFX | Footsteps | ||
| Switch | ||||
| ID | Switch Group | Name | ||
| 1216965916 | Footsteps | Stone | ||
| 2473969246 | Footsteps | Metal | ||
| UI | ||||
| UI Event | ||||
| SoundBank | Work Unit | Name | ID | |
| UI | Default Work Unit | Play_Menu_Buttons_Confirm_01 | 1976714274 | |
| UI | Default Work Unit | Play_Menu_Buttons_Back_01 | 3146873561 | |
| UI | Default Work Unit | Play_Menu_Buttons_Mouse_Over_01 | 3999992124 |
**