CREATING THE SOUND.XML

In this section we'll look at creating the basic sound.xml file that will be used by aircraft to link the sounds available in the sound package (created using Wwise, as explained here: Setting Up Wwise). We'll be taking you through the steps required to create the file from scratch and have it link with a single sound to be played in the simulation. The process outlined will generally be the same for all of the simple sounds required by an aircraft, and this is designed to give you a starting point for adding further sounds afterwards. We also have a more complex tutorial that covers how to create the audio required for engine sound effects, which you can find here:

 

Note that we won't be going into too much depth about any of the XML elements used in this tutorial, as those are all covered in full on the following page of the main documentation:

 

Finally, you can find a tutorial video related to the contents of the sound.xml file below:

 

 

 

Create The sound.xml File

The first thing you'll need to do is go to the aircraft project that you're working on and open the sound folder in the main project directory (or create this folder if it doesn't exist, although if you've followed the Setting Up Wwise tutorial then the folder should exist already with the audio package in it). The folder should be found here:

<ROOT>\[MyCompany_MyAircraft]\PackageSources\SimObjects\Airplanes\[MyCompany_MyAircraft]\common\sound

In this folder you then want to create a new XML file called sound.xml (right click, select New > Text Document, and save as sound.xml):

Creating The Sound.xml File In The Correct Location

NOTE: For simplicity, everything is being saved in the common folder of the aircraft, however for more complex modular sim aircraft and objects you may wish to save multiple XML and PC.PCK files, for example, in seperate attachments. For more information please see the section on Audio In Modular Sim Objects.

 

 

Edit The sound.xml File

With the file created, you can now open it in your editor of choice and add in the following lines:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
</SoundInfo>

These lines are required for the sound.xml file to be functional, and will be required every time you need to create this file.

 

Once you have that base written, you can then add the <WwisePackages> container element, where you will specify your <MainPackage> (and - if needed - an <AdditionalPackage>):

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_MyAircraft">
    </WwisePackages>
</SoundInfo>

Note that the package name is given without the PC.PCK extension.

 

The final step in this procedure is to add in a <Sound> element that defines the sound you want to use, which in this case is the stall warning sound effect we created previously:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_MyAircraft">
    </WwisePackages>
    <MiscellaneousSound>
        <Sound WwiseEvent="STALL_WARNING" WwiseData="true" />
    </MiscellaneousSound>
</SoundInfo>

Some things to note here:

  • Wwise event names are NOT case sensitive, however we use upper case here to show that the event name is linked to the corresponding simulation event (more on this below).
  • We have placed this sound in the miscellaneous sounds category. Sounds in this category rely on hard-coded event names - in this case the "STALL_WARNING" event (hence the use of upper case). It's for this reason that the Setting Up Wwise section tells you to use a very precise naming convention for the sound event unit. You can find a full list of available hard-coded events here: <MiscellaneousSounds>.

 

 

Testing The Package

At this point, you have done everything required to test the package and ensure that the sound plays correctly. For that simply open the project in DevMode, build it, and then you can verify that the sounds have been included in the package by going to the package location after building, which should look like this:

Placing The PC.PCK File With The Sound.xml

 

Once you have verified that, you can start a free flight anywhere in the world using the aircraft you're working on. When in flight, simply cause a stall situation and you should hear the stall warning be played.

Stalling The Aircraft To Hear The Warning

 

 

Audio In Modular Sim Objects

In the examples that are shown for audio, the sound folder is placed in the common folder of the aircraft. This is the "base" folder for all modular SimObjects - as explained here: Modular SimObject Project Structure - and in general this is where you would want to place the sound and soundai folders and their accompanying files. These folders would normally contain the audio required for all the available SimObject presets, however there are a few exceptions.

 

  • Workflow
    It is perfectly possible to split your audio into various PC.PCK and sound XML specific to individual presents, or even individual attachments, as well as the common base (or all three!). Doing so offers no real benefits in terms of memory use or efficiency when the SimObject is in the simulation, so the only reason to do this is because it suits the way you or your team works.

 

  • Sharing
    If you are creating attachments that will be used across multiple projects (for example, a common instrument to be used in cockpits), then it will be essential that any audio is included as part of the attachment itself. If you don't do this, then to have the attachment play audio in other projects, you'd have to ensure that the audio files for each SimObject contain the exact code and sounds that the attachment requires. This is much more complicated, error prone, and makes it impossible to share the attachment with people outside of the developer environment you are working in.

 

  • Animation Sounds
    If any of the attachments or presets include a model.xml (or animation.xml) with model behaviours for animation that are tied to audio using the <AnimationSounds> element in the sound.xml / soundai.xml, then you will need to include the XML and the associated PC.PCK file in the attachment/preset. When it comes to attachments, there are a couple of other things that it's important to take into account:
    • If it's an independent attached object: then the name of the PC.PCK included in the package should be referenced as the main package.
    • If it's an attached object within a modular aircraft: then audio events can be included in the PC.PCK placed in the common/sound folder, so the main package referenced in sound.xml must be that of the PC.PCK included in common/sound.

 

  • Landing Gear And Other Unique Audio
    Finally, the other situation where it would make sense to have separate sound / soundai folders in your attachments is for landing gear or other components that require unique audio for a very specific set of circumstances. For example, tires touching down will require a different sound effect to skis, and skis will need a different touchdown effect to floats. The same logic should be applied to other unique elements of the aircraft being designed.

 

As you can see, modular aircraft give a great deal of flexibility when it comes to "mixing and matching" components, and this includes the way that your audio is integrated into the project. However, as a general rule of thumb, consider that all audio should be in a single set of files in the common folder, and specialist audio should be in the preset or attachment.