Version

menu_open
Wwise SDK 2023.1.9
Integration Details - RTPCs

RTPCs are real time parameters that you can update using the AK::SoundEngine::SetRTPCValue() function. It is your responsibility to set RTPC values, because Event Actions cannot modify them.

RTPC Values

RTPC values are always passed as AkRtpcValue, which represents a 32-bit float value. This value is used to directly interpolate in the RTPC curve the sound designer has previously defined in Wwise.

When parameters are beyond the curve defined in Wwise, the extreme values on the curve are used. If the parameter exceeds the maximum value, the rightmost value of the curve is used, and if the parameter is under the minimum value, the leftmost value of the curve is used. If the RTPC represents a Boolean value, 1 represents True and 0 represents False.

Setting RTPC Values

RTCP values are set as follows:

AkRtpcID in_rtpcID, // ID of the RTPC
AkRtpcValue in_value, // Value to set
AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT // Associated game object ID
);

or

const char * in_pszRtpcName, // Name of the RTPC
AkRtpcValue in_value, // Value to set.
AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT // Associated game object ID
);

or

const wchar_t * in_pszRtpcName, // Name of the RTPC
AkRtpcValue in_value, // Value to set.
AkGameObjectID in_gameObjectID = AK_INVALID_GAME_OBJECT // Associated game object ID
);

RTPC values can affect sounds playing on game objects, bus parameters, source plug-ins, and effect plug-ins. We will consider all these possibilities.

Enabling ID Usage

To work with IDs, the banks must be generated with the "Generate header file" option in the Generate SoundBanks dialog box in Wwise. The definition file, named Wwise_IDs.h, contains all the required IDs. It is updated at each bank generation.

RTPCs and Game Objects

RTPCs can be used to modify the behavior of game objects by affecting a Sound SFX, a Sound Voice, a container or an actor-mixer object. Switches can also be modified through the use of RTPCs (refer to Driving Switches).

You can set a global RTPC value for all unassigned game objects with one function call. To do this, call the AK::SoundEngine::SetRTPCValue() method using AK_INVALID_GAME_OBJECT as game object ID, or without specifying an AkGameObjectID parameter. However, once the sound object receives a call to this method using valid AkRtpcID and AkGameObjectID inputs, the game object is considered assigned and will no longer be affected by the global RTPC value.

RTPCs and Busses

In Wwise, some parameters of busses can be modified by RTPCs. For busses to be correctly affected by RTPC value changes, calls to the AK::SoundEngine::SetRTPCValue() method must be made with the AK_INVALID_GAME_OBJECT parameter, as explained in RTPCs and Game Objects.

RTPCs and Plug-Ins

In Wwise, RTPCs can affect the properties of effect and source plug-ins, such as their reverb levels, pitch, or low pass cut-off frequencies. For the RTPC value to correctly affect these properties on buses using the plug-in, calls to the AK::SoundEngine::SetRTPCValue() method must be made with the AK_INVALID_GAME_OBJECT parameter, as explained in RTPCs and Game Objects. If the plug-ins are used by game objects, calls to the AK::SoundEngine::SetRTPCValue() method must be made with a valid AkGameObjectID value.

Note: It is important to note the difference between setting global RTPC values, and setting RTPC values per game object. If a Wwise object playing sounds, such as a switch container, is affected by RTPCs, it is important to make calls to the AK::SoundEngine::SetRTPCValue() method with a valid AkGameObjectID value. On playback, if no such game object-specific value has been set, the sound engine will look for a global RTPC value that will have been set by calling AK::SoundEngine::SetRTPCValue() with the AK_INVALID_GAME_OBJECT parameter or with no specified game object. If this global value does not exist, the sound engine will use the Game Parameter's default value as specified in the Wwise authoring application.
Caution: Note that it is possible to use the same RTPC for sounds, buses, and effects. This may result in unexpected behavior, and we recommend you use different RTPCs for game objects, buses, and effects. For example, in a racing game, you might have set a default RPM value on the engines of ten cars. At the same time, a low pass filter on the bus playing the cars' engine sounds could be applied. If you follow this recommendation, it will be easier for you to identify the source of the low pass filter effect.

For an example of integrating RTPCs, refer to RTPC Example.

AKSOUNDENGINE_API AKRESULT SetRTPCValue(AkRtpcID in_rtpcID, AkRtpcValue in_value, AkGameObjectID in_gameObjectID=AK_INVALID_GAME_OBJECT, AkTimeMs in_uValueChangeDuration=0, AkCurveInterpolation in_eFadeCurve=AkCurveInterpolation_Linear, bool in_bBypassInternalValueInterpolation=false)
AkUInt32 AkRtpcID
Real time parameter control ID.
Definition: AkTypes.h:73
AkUInt64 AkGameObjectID
Game object ID.
Definition: AkTypes.h:60
AKRESULT
Standard function call result.
Definition: AkTypes.h:131
static const AkGameObjectID AK_INVALID_GAME_OBJECT
Invalid game object (may also mean all game objects)
Definition: AkTypes.h:94
AkReal32 AkRtpcValue
Real time parameter control value.
Definition: AkTypes.h:74

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise