Community Q&A

Where Wwise users help each other out!

Audiokinetic's Community Q&A is the forum where Wwise users ask and answer questions within the Wwise community. Contact Sales if your project requires a support plan.

Possible to play many events with one loop and changing parameters?

0 votes
So the idea is we have a hand throttle that controls a vehicle.  When you move it forward or backwards, you hear a clicking loop, when you don't move it, the loop doesn't play.  There are a few gears, and each time you go past a gear, you can hear a different clack sound.  When you go into Park, there is a different clack sound to indicate it is parking.


From the programmers perspective, he is just making one event play with a parameter "Throttle" that goes from -0.5 to 1.0.  We hear ratcheting sounds for changing value.  But we also hear shifting sounds (like, a one-shot thicker sounding click) as you shift between gears, and he wants this to happen at 0.875, 0.625, 0.375, 0.125, -0.125, and -0.375.  Shifting to park makes a special sound (it would be between -0.125 and 0.125).

Is this possible with Wwise?  I get the sense this is not the way to implement this sound, as I cannot seem to find a way to do this... or am I wrong?  Our programmer seems to think this is the best way.
asked Mar 12 in General Discussion by Joker Red (160 points)

1 Answer

0 votes

Okay, here's one way you could do this.


Game Syncs Tab (Screenshot: Game Syncs)

You will need a switch group. I'm going to call it SG_Gears. It will have 7 switches for each of your gears including park, and you need to check "Use Game Parameter" in the Switch Group Property Editor. Choose "Throttle" as the game parameter to use in the bottom right of the same editor pane. Now create points on the parameter graph that correspond with the gear changes you want to make.


Audio Tab (Screenshot: Switch Container, Sequence Container)

At the top, you will need a Switch Container. In the Switch Container Property Editor, set the play mode to continuous. Set the switch group to "SG_Gears" and set the default switch to whatever gear your player starts in.

The switch container will have 7 Sequence Containers as its children that correspond to your 6 gears + park. Set each sequence container's play mode to continuous as well.

Each sequence container will have two Sound SFX objects as their children: one with your gear switching sound, and one with Wwise Silence (or just a .wav of digital silence). The silence objects should all loop infinitely (set in the Sound Property Editor). 

Back in the sequence containers, set each container's playlist so that the gear switching sfx plays and then the looping silence plays.

Back in the switch container, assign the sequence container objects to the correct switches in the assigned objects pane. 

Now add an event action to the event that starts the car engine so that it also starts the switch container we just created. When the RTPC gets updated, the RTPC will set the proper switch, play the correct sound, then start looping silence until it gets another set switch call from the RTPC.


I tested all this in the authoring tool just now, so I'm sure it works. Let me know if you have any trouble.

answered Mar 13 by Ian S. (450 points)
edited Mar 14 by Ian S.
Ian, fyi, I've used for links to images.
Aha! Thanks, I updated the post.
Wow, thanks a lot for this.  I am going to try it out.  I tried something similar to this, but gave up after the sounds were getting cut out.  But I see you've implemented it a lot differently than I did, the only similarity being that we used switches to play sounds... I was using longer sounds too, and they'd cancel out once you got to the next switch.

Anyways thanks a lot for the info.  I will test it out tomorrow and let you know if it worked on my end!
Did you have any luck?
Well, we ended up implementing this differently.  My programmer changed it before I could get back to him, but the way he implemented it was super simple.  We just have a single play event for every click, a single play event for a shift down, one for shift up, and one for park.  Honestly, it's a lot more simple this way.  

However, what you've helped me with here will probably be used elsewhere in slightly different ways.  I still am going to try this out in Wwise and see how it works.  Been too busy as of yet to get it done, but will test it out soon and let you know how it goes.
Nice! Glad you got it figured out!