Video Game Music Implementation With Wwise Part 7

In part 6 we went in-depth on how the transitions work between music segments of various states of the gameplay, and as this series of tutorials is drawing to its end, we will take care of the last bit of interactive music implementation which includes triggering stingers to make a better impact for events that occur while the music is playing.

What is a stinger anyway? It’s a short musical event in the form of a music segment that is being triggered while various events are happening during our gameplay. In other words, a stinger is a tonal or atonal sound that serves the purpose of accentuating the event that occurs during gameplay. Simple as that.

STINGING THE MUSIC SEGMENT:

A stinger in Wwise can be featured in the form of a music segment, not just an audio FX, and that is exactly how we will use it here. To import a stinger, we don’t need to create a music playlist container for it, because each stinger is an event for itself, so we can easily create a virtual folder inside our interactive music hierarchy to keep things nice and neat.

I have created a new child in the form of a virtual folder inside my music project and I have imported my stinger inside the folder as a music segment. Right-click on your virtual folder, click on import audio files and select your stinger from the browser. Make sure it is going to be imported as a music segment, not an audio track, click on import, and you’ve got yourself a stinger in your project.

Now we need to set-up the stinger appropriately to musically match our other music segments. You can go back to part 2 and part 3 of this series to see how the music segments are set-up by tweaking the BPM, signature, entry and exit points, and how to make sure that you check the option to override the parent folder so that the stinger is musically in sync. One good thing to do with a stinger is to set up the entry and exit cue to the same bar or beat so that the apex of a stinger sits between the two music segments.

TRIGGERING THE STINGER:

Stingers rely on a special type of game sync event called the trigger, which represents the action in the game that corresponds to the musical cue. To create a trigger in Wwise, we need to go to the Game Syncs tab in our project window, go to the Triggers folder, create a new child in the form of a Work Unit because we will have our own music work unit for stingers, and not the default one.

Inside our stinger music workgroup, we will create a new child in the form of a Trigger. I labelled mine simply as Stinger. One thing you should know is that the trigger name should match the name of the event that is used in the game engine itself. So if the game programmer named the event dungeon_combat, your stinger will have to be named the same, so the game engine recognises the trigger.

Now we go back to our audio tab to set up our trigger.

We want to associate the combat music with this trigger, so we will select our combat music playlist container (in my case it is called Action), we click on the Stingers tab in the central tab of the project window. The reason why we are using the stinger during the action music is that we want to accentuate the event once the boss enters the combat in our gameplay. Every villain needs to have an announcement sound, right?

What you need to know is that every stinger needs three pieces to be configured properly:

– The source trigger

– The targeted music segment

– Instructions on when the targeted music segment should play in relationship to the music segment currently being played

In the stingers tab, click on Add and then you can click on the selector button to choose the previously created trigger.

We can simply select our stinger music segment from the folder and drag it to the Segment to play section in the stingers tab. By setting up the Play At option to the next beat, we can defer the action of when the stinger will be played in a musical way. This way, our stinger will reach its apex at the next beat when the music transition occurs.

THE EVENTS:

As I said previously, the stinger is attached to the corresponding event in the game, and in order to trigger it, we need to have that event featured in our project. Usually, it’s the audio integrator or audio programmer who makes such events, but for the purpose of this tutorial, we will make our own.

To create an event in Wwise you need to switch from the Audio tab to the Events tab.  Click on Stinger Events in the drop-down menu, and right above that, there is a button called Create New Event.

I have named my event as Stinger also, the same way I named the previously created trigger. Click on that stinger event, and in the Event Editor, click on the two arrows in the bottom left corner, and select Browse Object from the drop-down menu. A browser menu will appear, and then you need to expand the Triggers folder in order to select your previously created trigger for this event. Just make sure that under where it says Target (right next to your trigger), your trigger’s name should show.

TESTING YOUR STINGER:

If you try to play your music and try to play the stinger to see if it works, you won’t be able to hear it. That’s because Wwise cannot play more than one sound at once unless you use a special feature called the Soundcaster. In order to view our Soundcaster window, we need to go to Views, and select Soundcaster from the drop-down menu, or just click Shift-S as a shortcut. We will then create a new Soundcaster session by clicking on the two arrows, selecting New from the drop-down menu and then in the browser window, we will just name our Soundcaster session before clicking OK.

After that’s done, our fresh new session will appear, and we need to populate it with our music segments and audio events. We will simply drag our stinger event from the Events tab to the Soundcaster, and our combat music playlist event also.

Now that everything is in there, you can click on the play button of your combat music, let it play for a while, and when you want to test your stinger, just click on the play button in the Triggers tab where your stinger trigger is hosted.

If you heard your stinger during the combat music playback, that means that the trigger works, and your stinger is integrated properly.

That also means that we have come to the very end of our series! I hope that you guys have had as much fun learning about interactive game music as I had writing this entire series!