Game
Rhythm, Paper, Scissors
7 years ago

Good things come to those who don't give up


Hey everyone!

The holiday season is in full swing and as you might’ve guessed from my last post my hopes of solving the integration between Wwise and Unity were thin. However, I sticked with it and did not want to give up, even though I was told that it probably wouldn’t work.

To refresh your memory: I wanted to calculate the currently playing song’s Beats Per Minute (BPM). However it seemed like this part of Wwise was not a part of what was integrated in Unity. I did however spend a lot of time both with friends and teachers to try and figure this thing out. On the very last day before my holidays my teacher and I made a breakthrough!

I had been thinking all along that this information could be reached from any kind of method as long as it could reach the event that I had created in Wwise that played the song.

As you might guess from how I am writing this, that was not the case. After going over the source code, Wwise-documentation and trying different things we finally tried to work deeper within a specific callback method. What we were trying to reach was the duration of one beat. We knew that this was reachable within the AkMusicSyncCallbackInfo (this name alone should probably have hinted me enough from the start that it had to be written inside a specific callback method to start with), but we didn’t know how to reach it.

When we put it inside my previous MusicSyncBeat callback method it all started to click. In this method the AkEventCallbackMsg included all the information we needed and could be reached if we just specified what part of the information that was important. We set a new variable for the AkMusicSyncCallbackInfo and reached this information from within the AkEventCallbackMsg. From here we could easily assign the Beat Duration to a new float variable that we called BeatL. Dividing 60 with the beat duration would then give us the result we wanted. The BPM of the song in question is 90, something that both Unity and I now agreed on. Finally!

5d0a8dddebc74.png

I am so very happy that this finally worked and hopefully this will help a few others who want to do the same thing.

My next move is to connect this to the player character, the enemies and maybe even the world around. Having a living world moving to the sound of the music is something that I’ve always enjoyed in video games. For example the level “Music Madness” from Donkey Kong Country Returns or “Grassland Groove” from Donkey Kong Country Tropical Freeze.

I highly recommend checking out those two levels if you’re interested in how music can be well integrated into the very soul of a video game level. There are certainly a lot more examples of this in other games.

The goal with Rhythm, Paper, Scissors is first and foremost to get the music to affect your own actions rather than the environment around you, but if there’s time I’m hoping to explore this as well.

Now, happy holidays everyone and see you all next year!



0 comments

Loading...

Next up

Path of Kami: The Evolution of the Lore

Heya! I wanted to show some gameplay progress i made so far. I hope you like it ^^

So here's the first of the zodiac signs i will make for the next weeks.

Strange Umbrella

I worked so hard to get all four of them to the end safely, but then...

Alone Together....

Szayel Aporro Granz - Bleach

Who's is this little cutey👸 here? Thanks🙏 for a gorgeous fanart @WheNa! Feel free to share your arts, screenshots, or videos with #playzelter or #zelter hashtags! #pixelart #animating #unity3d #animated #indiegames #unrealengine #animate #conceptart

I mostly build 3D First Person Shooter game mechanics in Unity, and in this I'm just showing C4 mechanics I made for a little side project I am working on! :)

A 1h30 painting, coffee break.

My twitter: https://twitter.com/loupil100