ADVANCED SOUND.XML FEATURES

On this page we will be exploring some of the more advanced Wwise features that can be implemented within the sound.xml file. To start with, we'll be explaining the engine audio setup as a continuation of the following two sections:

And then we'll look at a few other elements within the file and how they relate to Wwise and the effect they will have on audio in the simulation. Note that much of the example XML shown on this page is based on the basic file that we created here:

 

The file currently should look something like this:

<?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>

 

This section does not cover all the available sound XML elements, only those that we consider important and/or essential. However there is extensive documentation for the other elements - as well as many examples of use - on the following pages:

 

 

<AcousticParameters>

We'll start filling out the sound-xml file with the acoustic parameters container. This will be used to define the reverb sharesets that we want to use for our aircraft. These ShareSets will have been created previously within Wwise as Game Defined Auxiliary Sends. For more information see here: Reverb.

IMPORTANT! In the following example, we show how to use an outside ShareSet along with a Game-Defined Auxiliary Send. If you are using a User-Defined Auxiliary Send, you do not need to define it in your sound.xml file using the <AcousticParameters> element. For more information see the section on User Defined Auxiliary Sends.

To start with you'll need to add the <AcousticParameters> element. This is a container element and has no parameters of it's own. It simply holds further <Parameter> elements which we'll define in a moment:

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

Since we're setting up a Game Defined Auxiliary Send for custom inside and/or outside reverb, we will need to give the name of the parameter, and the ShareSet(s) it should be using, so our XML will now look like this:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_TestAircraft">
    </WwisePackages>
    <AcousticParameters>
        <Parameter Name="ReverberationPreset" ShareSetInside="rev_inside_MyCompany_TestAaircraft" ShareSetOutside="rev_outdoor_MyCompany_TestAircraft" />
    </AcousticParameters>
    <MiscellaneousSound>
        <Sound WwiseEvent="STALL_WARNING" WwiseData="true" />
    </MiscellaneousSound>
</SoundInfo>

In this example we've used the parameter named "ReverberationPreset" to tell the simulation that we're setting up reverb, and then we've opted to use both inside and outside reverb ShareSets. Using these attributes means that all audio that has been created in Wwise and that has been set to use the Game Defined Auxiliary Sends will use the ShareSet effect(s) that you have set for inside and/or outside using this parameter. These ShareSets will be applied at runtime on a custom auxiliary bus.

NOTE: If you have not used any game defined auxiliary sends, then the "ReverberationPreset" parameter can be omitted.

 

Since we're discussing the <AcousticParameters> container, we'll also quickly mention the other available parameter names: Insulation_ExitClosed and Insulation_ExitOpen. These are used to define the attenuation of the outside sounds in the cockpit when the aircraft doors are closed or opened. In the following example we define a 12dB sound attenuation with closed doors and no sound attenuation with opened doors:

<AcousticParameters>
    <Parameter Name="Insulation_ExitClosed" Value="-12"/>
    <Parameter Name="Insulation_ExitOpen" Value="0"/>
</AcousticParameters>

 

 

<EngineSoundPresets>

The next container you'll want to add to the XML file is <EngineSoundPresets>. Using this container element, you would then go ahead and define multiple <Sound> elements, one for each of the different engine events defined in Wwise.

NOTE: Remember, events are named using the Play_[SoundbankName]_[WwiseEvent] schema in Wwise, so in the <Sound> attributes, you only need to supply the [WwiseEvent] part.

 

Let's look at a single sound definition and briefly explain the attributes that have been applied to it (since the <Sound> element has a great many attributes and only some are generally used for engines):

<EngineSoundPresets>
    <Sound WwiseEvent="combustion" ConeHeading="180" FadeOutType="2" FadeOutTime="0.2" RPMMin="200" WwiseData="True" EngineIndex="1" />
</EngineSoundPresets>

 

The parameters used here are typical for a looping engine sound:

  • WwiseEvent - this is the name of the Wwise event that is being defined.
  • ConeHeading - this is used to set the direction of the "sound cone", in degrees, where 0° is facing forward.
  • FadeOutType - this attribute allows sounds to be faded out when they are set to stop playing, and the value given determines how the fade out will be implemented (in this case using a sine curve).
  • FadeoutTime - this allows you to set the time, in seconds, that the sound will take to fade out.
  • RPMMin - this allows you to define at which RPM the combustion and propeller / rotor events stop and the shutdown event will play.
  • WwiseData - this allows you to define if the event is using the WwiseData (True) or the WaveData (False) flow.
  • EngineIndex - the index of the engine sound to use (for a single engine aircraft this will always be 1).

 

Below is the example file in full, with all the appropriate engine sounds:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_TestAircraft">
    </WwisePackages>
    <AcousticParameters>
        <Parameter Name="ReverberationPreset" ShareSetInside="rev_inside_MyCompany_TestAaircraft" ShareSetOutside="rev_outdoor_MyCompany_TestAircraft" />
    </AcousticParameters>
    <EngineSoundPresets>
        <Sound WwiseEvent="Combustion" ConeHeading="180" FadeOutType="2" FadeOutTime="0.2" RPMMin="200" WwiseData="True" EngineIndex="1" />
        <Sound WwiseEvent="Propeller" ConeHeading="0" FadeOutType="2" FadeOutTime="0.2" RPMMin="200" WwiseData="True" EngineIndex="1" />
        <Sound WwiseEvent="Starter" FadeOutType="2" FadeOutTime="0.2" WwiseData="True" EngineIndex="1" />
        <Sound WwiseEvent="CombustionStart" FadeOutType="2" FadeOutTime="0.2" WwiseData="True" EngineIndex="1" />
        <Sound WwiseEvent="Shutdown" FadeOutType="2" FadeOutTime="0.2" RPMMin="200" WwiseData="True" EngineIndex="1" />
  </EngineSoundPresets>
    <MiscellaneousSound>
        <Sound WwiseEvent="STALL_WARNING" WwiseData="true" />
    </MiscellaneousSound>
</SoundInfo>

 

 

<EngineSoundStates>

The <EngineSoundStates> element is a container element for <Sound> and is used to specify an audio event to be played when a specific engine state is reached. When using this container, three different engine states are available - Off, Start, and On - and therefor three boolean values must be defined to set when the sound should be played in relation to the engine state. In the example below, we play the Wwise event eng1_prop_non_combustion to play a specific propeller sound when the engine is shutdown:

<EngineSoundStates>
    <Sound WwiseEvent="eng1_prop_non_combustion" WwiseData="true" EngineIndex="1" StateOff="true" StateStart="false" StateOn="false" FadeOutType="2" FadeOutTime="1" >
        <WwiseRTPC SimVar="PROP RPM" Units="RPM" Index="1" RTPCName="SIMVAR_PROP_RPM" />
        <WwiseRTPC SimVar="PROP MAX RPM PERCENT" Units="PERCENT OVER 100" Index="1" RTPCName="SIMVAR_PROP_MAX_RPM_PERCENT" />    
    </Sound>
</EngineSoundStates>

In the image below you can see how we've set up this sound in Wwise:

Audio Setup In Wwise For An <EngineSoundState> Element

 

 

<EngineSoundTransitions>

The final engine-specific element that we'll discuss here is <EngineSoundTransitions>. This is another container element for <Sound> and allows you to set an audio sample to play when there is a change in the engine state. As such you will have to set "from" state and a "to" state, which can be one of: "On", "Off", "Start". For example:

<EngineSoundTransitions>
    <Sound WwiseEvent="eng1_combustion_start" WwiseData="true" ConeHeading="110" Continuous="false" ContinuousStopDelay="1" FadeOutType="2" FadeOutTime="4" EngineIndex="1" StateTo="On" StateFrom="Start" />
</EngineSoundTransitions>

In general, these engine sounds need nothing more than an event to be created for them in Wwise.

 

 

<AlwaysPlaySounds>

This element allows you to define various sounds that will always be playing - unless the package is unloaded - and that do not require any parameters to be set up. In this example we are using this element for the to play "rattle" sound effects to simulate the sound of the fuselage and other components when the aircraft is moving.

 

To start with let's look at how this is set up in Wwise. For the "rattle" sound we have used two "random" containers in Wwise, one for the inside and one for the outside. These random containers will use any one of a selection of audio files for the sound event, and they're a great way to ensure variety in the sound effect so it won't become annoying to the user. The container hierarchy is as follows:

Main "rattle" Actor Mixer > Switch container > Inside/Outside Blend containers > Pitch/Yaw/Roll Random containers

Inside each random container we have our sounds, and to the container itself we have assigned one of three RTCP with the SimVars ROTATION VELOCITY BODY X (pitch container), ROTATION VELOCITY BODY Y (yaw container), and ROTATION VELOCITY BODY Z (roll container). These SimVars will further modify the sound based on the actual axis of the aircraft while flying:

The Random Container RTPC Setup

NOTE: In the image above you can see that there are three RTPC values being affected by a single SimVar. A sound can have as many RTPC values as required. Also note that you may define a LocalVar instead of a SimVar as a control variable.

 

You would then create a new Event for for the rattle switch container - Play_TestAircraft_rattle_kinematic - which is what you would reference in the sound.xml file. In this file you would create a <AlwaysPlaySounds> container element, and then add the Wwise event using a <Sound> element, which will also need you to define additional <WwiseRTPC> sub-elements to link the event with the appropriate SimVars:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_TestAircraft">
    </WwisePackages>
    <AlwaysPlaySounds>
        <Sound WwiseData="true" WwiseEvent="rattle_kinematic" >
            <WwiseRTPC SimVar="ROTATION VELOCITY BODY X" Units="PERCENT" Index="0" RTPCName="SIMVAR_ROTATION_VELOCITY_BODY_X"/>
            <WwiseRTPC SimVar="ROTATION VELOCITY BODY Y" Units="PERCENT" Index="0" RTPCName="SIMVAR_ROTATION_VELOCITY_BODY_Y"/>
            <WwiseRTPC SimVar="ROTATION VELOCITY BODY Z" Units="PERCENT" Index="0" RTPCName="SIMVAR_ROTATION_VELOCITY_BODY_Z"/>
        </Sound>
    </AlwaysPlaySounds>
</SoundInfo>

 

 

<WindSounds>

The <WindSounds> element is similar to the <AlwaysPlaySounds> element in that it is designed to play continuously, unless the package is unloaded. The sounds used in this element do not require any parameters to be set up, and the associated events are triggered internally and automatically by the simulation. However, you can still use Game Parameters to have the sound behave dynamically within the simulation, as shown in the following image where we've set the wind audio RTPC to use the SIMVAR_AIRSPEED_TRUE parameter to modulate the sound in real time:

The Wind Sound Audio Setup In Wwise

 

To actually tell the simulation to play the sound, you would have something like this in the sound.xml file:

<?xml version="1.0" encoding="utf-8" ?>
<SoundInfo Version="0.1">
    <WwisePackages>
        <MainPackage Name="MyCompany_TestAircraft">
    </WwisePackages>
    <WindSounds>
        <Sound WwiseEvent="wind_sound" WwiseData="true" />
    </WindSounds>
</SoundInfo>

 

 

<GroundSounds>

The <GroundSounds> element is a container element for <Sound> and is used to primarily to add sound effects that will play when the aircraft touches down (although it can have other uses, like groundroll on different surfaces, or fuselage rattle when on the ground, etc..). In this example we've set up Wwise so that the touchdown sound of each wheel of the aircraft is linked to the VERTICAL SPEED simvar, which will modulate the sound using RTPC:

The Ground Rattle Audio Setup In Wwise

 

The sound.xml file would then lok like this, with three <Sound> entries (one for each wheel) all using the <WwiseRTPC> sub-elements to link the events with the appropriate SimVar:

<GroundSounds>
    <Sound WwiseEvent="CENTER_TOUCHDOWN" FadeOutType="2" FadeOutTime="0.5" WwiseData="true" >
        <WwiseRTPC SimVar="VERTICAL SPEED" Units="FEET PER MINUTE" Derived="true" Index="0" RTPCName="SIMVAR_VERTICAL_SPEED_DERIVED" />
    </Sound>
    <Sound WwiseEvent="LEFT_TOUCHDOWN" FadeOutType="2" FadeOutTime="0.5" WwiseData="true" >
        <WwiseRTPC SimVar="VERTICAL SPEED" Units="FEET PER MINUTE" Derived="true" Index="0" RTPCName="SIMVAR_VERTICAL_SPEED_DERIVED" />
    </Sound>
    <Sound WwiseEvent="RIGHT_TOUCHDOWN" FadeOutType="2" FadeOutTime="0.5" WwiseData="true" >
        <WwiseRTPC SimVar="VERTICAL SPEED" Units="FEET PER MINUTE" Derived="true" Index="0" RTPCName="SIMVAR_VERTICAL_SPEED_DERIVED" />
    </Sound>
</GroundSounds>

NOTE: In this case, we use the attribute "Derived" which allows you to use a derived SimVar value. This RTPC is not sent by default by the simulation (only the non-derived is sent) so we have to specify it in the sound.xml.