Wwise SDK 2022.1.8
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 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.
RTCP values are set as follows:
RTPC values can affect sounds playing on game objects, bus parameters, source plug-ins, and effect plug-ins. We will consider all these possibilities.
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 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.
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.
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.