plane icon Welcome to Microsoft Flight Simulator’s SDK Q&A Platform!

You have questions regarding the SDK? DevMode Tools? SimConnect? You would like to submit an idea for future improvements, seek help or exchange knowledge? You’re in the right place.


Please take a moment to read the platform’s guidelines before you get started!


question

rotornut44 avatar image
rotornut44 asked FlyingRaccoon commented

Multiple Simobjects, one Wwise Package?

I have been playing around with using Wwise sounds in my scenery. I have been able to get sounds playing in the sim, as well as even using SimVars to play them only under certain conditions (Though, it seems that only Aircraft SimVars can be used, whereas having the ability to use environmental variables as well would be nice).

However, I'm running into an issue where if I have multiple simobjects in one simobject folder (model.a, model.b, model.c, ect) and I use a soundai.xml containing all of the sounds and a single Wwise pack, all of the simobjects in my scene end up playing all of the <sound> elements at once (model.a will play it's own sound, but also the sound meant for every other model)

I thought that if I assigned a unique node in each model, and then referenced those nodes in each corresponding <sound> element of the soundai.xml, it would ignore the other simobjects since all of the nodes would be found. However, this does not seem to be the case and the sounds will play as described above.

Hopefully that's making sense? If not, basically:
model.a has the unique node "sfxa" and it's <sound> in the soundai.xml states NodeName="sfxa".
then..
model.b has the unique node "sfxb" and it's <sound> in the soundai.xml states NodeName="sfxb".
however..
model.a plays its own sound, but also plays sfxb as that node cannot be found in model.a. And then vise versa for every simobject.

Is there any solution where I can make each model only play the sound I assign to it, or is my only option to split every simobject off into it's own directory and have a separate Wwise PCK for each?

There has got to be a better way to handle this, right?

scenerysound
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

1 Answer

·
FlyingRaccoon avatar image
FlyingRaccoon answered FlyingRaccoon commented

Hello @rotornut44

The NodeName property is used to chose if sound is positioned at a specific node or if it's positioned at the reference datum but it will be used in all cases.

If you want to have a single package, you want to use a differentiating SimVar (Title?) or custom LocalVar to associate your sound event to one of the variations.

Regards,
Sylvain

2 comments
10 |10000

Up to 5 attachments (including images) can be used with a maximum of 4.8 MiB each and 23.8 MiB total.

rotornut44 avatar image rotornut44 commented ·

It would be nice to get some additional documentation on how this could be done, especially in regards to how it should be structured, and how to tie it between the soundai.xml and model.xml.


I'm not sure what the "SimVar (Title?)" is that you reference as it doesn't seem to be documented. I have also seen another comment of yours where you reference using "W" (Wwise Event) in RPN code. Though you say to pass a 1 or 0, I'm not sure where this is done, (model.xml in the RPN, or somehow in soundai.xml) nor if this would even solve my issue above.

I would ultimately like to figure out how to call the Wwise event in the model.xml, or how to do it with LVars, as I need to call some Environmental Variables, which cannot be done with SimVar in the soundai.xml.

I'll attach my soundai.xml so it can be referenced.

soundai.xml

0 Likes 0 ·
soundai.xml (2.8 KiB)
FlyingRaccoon avatar image FlyingRaccoon ♦♦ rotornut44 commented ·

Hello @rotornut44

All the things I mentioned are documented.
Check the WwiseRtpc element which allows you to control the sound event with a simvar or localvar:
Sound Definitions (flightsimulator.com)

Regards,
Sylvain


0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 19.1 MiB each and 23.8 MiB total.