In this installment of the series “my journey into game audio”, I’m making a simple system that uses Wwise’s “Callbacks” to make a “clock sound” that starts playing to inform the player through sound that the timer is about to end. I could simply Post a sound Event that fires every second, but given the rhythmic nature of a timer (60 BPM), it’ll clash with the playing music, that most probably uses another BPM.
So that’s where Callbacks are great. Callbacks provide the information about the music’s beat. You can request this information from the sound engine using music notifications.
At the end of this post there’s a video of the system in action.
The Wwise side of things
I’ve set 3 music tracks with different BPM’s in Wwise to show how the system adapts to different tempos. The music it’s from Blue Fire, the game that I’ve made the Sound Design & Implementation and it’s composed by the great Ariel Contreras Esquivel.
The Music Segment’s has States added that lower the Voice Volume when the Timer it’s “On”
The Clock Trigger
Now it’s turn the create the Clock Trigger. This is an Actor that I’ve made just to have a timer that starts when the player overlaps a Box collision.
The “Clock Trigger” updates the timer text, and it’s the responsible for starting the music, through a reference of the other actor, the “Music System” Actor. This Blueprint it’s also setting an Enumerator that changes from Clock “None”, to “Slow”, to “Fast”. This information will make changes about how the music system works, and will Set a State on Wwise.
Here’s the full Blueprint. Please note that you can click on the image and double click to zoom further.
The Enumerator, and the variables.
The Music System
The Music System is the Actor that controls the Music, and that play’s the clock sound effects. It has a public variable type “wwise event” that allows the designer to change the music that you want to play.
When the players enters the Box of the “Clock Trigger”, the “Start Music” event it’s called and it Post an Ak Event. The Target is an Ak Component, the Ak Event it’s our public Variable with the desired Event. We retrieve and event from the Post Event Callback, in this case, called “CallbackClock”
It’s really important to set the “Callbacks Mask” to the desired information that you want to retrieve. In this case, “Music Sync Beat” and “Music Sync Grid”.
You can keep it simple and just, play the Clock SFX in the “Music Sync Beat” execution pin. But I wanted to add more tension as the timer is ending. So I will use the Beat information for the “slow timer” and the Grid (half time than beat) information for the “fast timer”.
That’s pretty much it! The rest is some extra work, to assure that the clock sfx only starts in the firts beat of a bar, to make more sense musically speaking, and to play a “strong clock sfx” followed by tree “weak clock sfx”. For that I’ve made a Beat counter.
When the timer ends I’m stopping the music playing and trigger a alarm style SFX.
The full Blueprint look’s like this.
And that’s all for the musical Clock System! I hope you found it interesting!
If you have any comments, please reach out through my Twitter, I would love to see if you have any suggestions to further improve this system!
By the way, I’m making one of this blogs per month so… please stay tuned! Thanks for reading! Till the next one!
Here’s the showcase!