CRI ADX  Last Updated: 2025-05-07 13:34 p
Panning
CRI Atom library supports the following three methods of pan setting.

Pan setting
Pan setting Description
Pan 3D By setting the sound source direction (angle, distance)
3D positioning By setting listener information and sound source information (position)
Send level By setting the send level (volume) for each speaker.

Speaker angle

Surround speakers

The default angle of each speaker in ADX is set as follows, in accordance with ITU-R BS.775-1.
Speaker angle settings
Speaker settings L R C LFE Ls Rs Lb Rb
5.1ch -30° 30° -120° 120° - -
7.1ch -30° 30° -110° 110° -150° 150°
The angles of the surround speakers can be changed using the criAtomEx_SetSpeakerAngles or criAtomEx_SetSpeakerAngleArray functions.

Top Speaker

The position of the upper speaker (top speaker) is as follows.
  • The distance between the top left speaker and the top right speaker is the same as the distance between the front left speaker and the front right speaker.
  • The elevation angle of the top front speaker is as follows.
    • If the top speaker is 4ch, the elevation angle of the top front speaker is 45°, and the elevation angle of the top back speaker is 135°.
    • If the top speaker is 2ch, the elevation angle of the top speaker is 80°.
For example, the top 4ch speakers in a 7.1.4ch environment are placed at the following positions on the plane.
The positional relationship when viewed from the side is as follows.

Bottom speaker

You can specify a 7.1.4.4ch configuration including the lower speaker (bottom speaker) in the mixer format.
In this case, panning is performed assuming that the bottom speaker is located at the following position.
  • The distance between the bottom left speaker and the bottom right speaker conforms to the distance between the front left speaker and the front right speaker.
  • The depression angle of the bottom front speaker is 45°, and the depression angle of the bottom back speaker is 135°.
Attention
At present, there is no platform that can output 7.1.4.4ch signals directly to physical speakers.
Therefore, even if the mixer format is set to 7.1.4.4ch, the signal will be downmixed to 7.1.4ch etc. when outputting to physical speakers.

Pan 3D

Pan 3D is a panning method that determines the position of the sound image by specifying the angle and distance of the sound source.
When controlling panning with the Pan 3D method, specify the following parameters.
  • Angle
  • Interior distance

About angles

The azimuth and elevation angles are specified using the following functions.
Angle specification function
Settings Functions to use
Azimuth angle criAtomExPlayer_SetPan3dAngle
Elevation angle criAtomExPlayer_SetPan3dElevation
Angles are measured in degrees.
The azimuth angle is 0 degrees forward, with rightward (clockwise) being positive and leftward (counterclockwise) being negative.
The elevation angle is 0 degrees on the horizontal plane, with upward being positive and downward being negative.

About interior distance

Interior distance is used to move the sound image inside the speaker.
  • 1.0 is the outermost circumference and is played from one or two speakers.
  • 0.0 means that the sound is heard at the same volume from all speakers and the sound image is in the same position as the listener.
  • A value between 0 and 1.0 means that the sound is output from three or more speakers, allowing for natural sound image movement.
Use the criAtomExPlayer_SetPan3dInteriorDistance function to specify the interior distance.

3D positioning

What is the 3D positioning function?

The 3D positioning function is a function that allows you to obtain sound effects according to the positional relationship of the sound source and listener by simply setting coordinate information such as position and speed.



The parameters related to the sound image, such as volume and panning depending on the position, are automatically calculated by the library, so the game program only needs to input information such as the position and orientation of the sound source and listener, to create a three-dimensional sound effect.

How to use

The following values ​​are specified from the game program.
■Listener information
  1. Coordinates (x, y, z)
  2. Movement speed (x, y, z)
  3. Forward orientation vector (x, y, z)
  4. Upward orientation vector (x, y, z)
■Sound source information
  1. Position (x, y, z)
  2. Speed ​​(x, y, z)
  3. Cone direction (x, y, z)
When these values ​​are specified, the result will be as shown in the figure below. In this figure, the values ​​are set assuming the following situation.
  1. The listener (person) is standing straight facing the z-axis.
  2. The dog is facing left.
  3. The bird is flying facing right.

Various settings

Basic settings
Settings Description Related APIs
Listener position Specifies the listener's position in space. criAtomEx3dListener_SetPosition
Listener speed Specifies the listener's speed. criAtomEx3dListener_SetVelocity
Listener orientation vector Sets the listener's orientation in space. criAtomEx3dListener_SetOrientation
Sound source position Specifies the sound source's position in space. criAtomEx3dSource_SetPosition
Sound source speed Specifies the sound source's speed. criAtomEx3dSource_SetVelocity
Sound source orientation vector Sets the direction of the sound cone of the sound source. criAtomEx3dSource_SetOrientation
* Sound source sound cone Sets the sound cone of the sound source. criAtomEx3dSource_SetConeParameter
* Sound source volume Specifies the volume of the sound source. criAtomEx3dSource_SetVolume
* Sound source attenuation distance Sets the distance attenuation of the sound source. criAtomEx3dSource_SetMinMaxAttenuationDistance
This value can also be set on the data side. If specified on the game program side, the setting on the data side will be overwritten (ignored).

Attenuation

The 3D positioning function attenuates the volume depending on the positional relationship between the listener and the sound source.
Attenuation can be due to distance or due to the sound cone.
Please refer to the API description below for the operation specifications.
Distance: criAtomEx3dSource_SetMinMaxAttenuationDistance
Sound cone: criAtomEx3dSource_SetConeParameter

Additional functions in 3D positioning

ADX's 3D positioning has functions for more diverse spatial audio expression.

Unique attenuation design using AISAC

AISAC control can be changed according to the following parameters.
  • Distance between the listener and the sound source (distance attenuation AISAC)
  • Angle of the sound source as seen from the listener (listener reference azimuth AISAC, listener reference elevation/depression AISAC)
  • Angle of the listener as seen from the sound source (sound source reference azimuth AISAC, sound source reference elevation/depression AISAC)
The default distance attenuation setting only changes the volume, but by using AISAC, it is possible to change parameters other than volume.
For details on AISAC, see AISAC Interactive Sound System "AISAC" .
[Note]
  • The rules for converting the azimuth-based AISAC control value to the listener reference azimuth AISAC and the sound source reference azimuth AISAC are different.

Number of voices control

There are two main types of number of voices control related to 3D positioning.
  • Distance-based voice priority attenuation
  • Close-range priority in category queue priority
    Here, we will only explain "Distance-based voice priority attenuation."
    For details on voice count control and close-range priority, see Playback Control .
If you enable CriAtomEx3dSourceConfig::enable_voice_priority_decay and execute the criAtomEx3dSource_Create function with this argument, the voice priority decay based on distance will be enabled.
The minimum decay distance is 0, and the maximum decay distance is -255, and the voice priority changes linearly according to the distance between the listener and the sound source.
[Note]
  • The voice priority calculated by this function is applied additively.
    Therefore, it is added to the data and the player settings.
  • The fluctuation of the voice priority depends on the decay distance setting of each cue or sound source.
    If you want to control the sound generation only based on the distance between the listener and the sound source, use the close distance priority in the category cue priority.

Multi-positioning playback

"Multi-positioning playback" is possible, taking into account the parameters of multiple sound sources.
By setting a sound source list that manages multiple sound sources to a single Ex player, the parameters of all sound sources added to the sound source list are used for calculations such as localization and attenuation.
[Preparation]
When using, please note the following points.
  • **There is no upper limit to the number of sound sources that can be added to the sound source list, but the number of sound sources and the processing load are proportional. **
  • **If a sound source is set to an Ex player while a sound source list is set to the Ex player, the previously set sound source list will be cleared from the Ex player, and the newly set sound source will be set to the EX player. **
  • **Sound sources that are already set to the Ex player and added to the sound source list cannot be added to another sound source list. **
  • **The distance voice priority attenuation always applies the setting value of the sound source that is the shortest distance from the listener. **
  • **Pitch changes due to Doppler gain, etc. are not performed. **
Related API

Randomization of position

The position of the 3D sound source can be determined randomly during playback.
As shown in the figure above, the original sound source is uniformly distributed so that it fits into various shapes.
The shapes currently supported are as follows:
  • Rectangle
  • Cuboid
  • Circle
  • Cylinder
  • Sphere
  • Free (callback)
  • List
The settings for randomization of position can be set not only at runtime but also from CRI Atom Craft.
For information on how to set it up on CRI Atom Craft, see "How to set up 3D positioning" in 3D Positioning .
About settings at runtime
Set the position randomization settings in the CriAtomEx3dSourceRandomPositionConfig structure, and apply the settings to the 3D sound source with the criAtomEx3dSource_SetRandomPositionConfig function.
To cancel the setting, specify NULL as the second argument of the function.
The following settings are possible with the CriAtomEx3dSourceRandomPositionConfig structure.
When using a basic shape, you need to store the shape-related settings in the parameter array.
See the table below for the combinations of shapes and parameters.
Definition Shape (coordinate calculation method) calculation_parameters[0] calculation_parameters[1] calculation_parameters[2]
CRIATOMEX3DSOURCE_RANDOM_POSITION_CALCULATION_TYPE_RECTANGLE Rectangle Left-Right Front-Back -
CRIATOMEX3DSOURCE_RANDOM_POSITION_CALCULATION_TYPE_CUBOID Rectangle Left/Right Front/Back Top/Bottom
CRIATOMEX3DSOURCE_RANDOM_POSITION_CALCULATION_TYPE_CIRCLE circle radius - -
CRIATOMEX3DSOURCE_RANDOM_POSITION_CALCULATION_TYPE_CYLINDER Cylinder Radius Vertical Width -
CRIATOMEX3DSOURCE_RANDOM_POSITION_CALCULATION_TYPE_SPHERE Sphere Radius - -
[Notes]
About Free (callback)
If you want to randomize within an arbitrary shape in cooperation with a physics engine such as a game engine, rather than a basic shape, you can use a callback function for determining position coordinates.
Therefore, if you use this setting, you must register a callback at runtime.
You can register this callback by using the following function:
About Lists
You can set predefined coordinates as a list and use them during randomness.
Therefore, if you use this setting, you need to configure and register the list at runtime.
CRI ADX allocates space for the list.
Therefore, when creating a 3D sound source handle, set the maximum number of list elements to be allocated for the following config.
You can also register a list by using the following function.
About Obtaining Randomized Coordinates
If you want to obtain randomized position coordinates for debugging purposes, etc., please use the callback function that returns the voice's coordinate position when the position coordinate is determined or updated.
You can register this callback by using the following function.

Listener auto-matching function

This function automatically assigns the listener with the shortest distance from multiple listeners.
This can be used when you want to calculate 3D positioning on the side of the nearest player in split screen multiplayer, etc.
[Caution]
Since the listener selection is performed every frame, the load is higher than when explicitly setting the listener.
Related API

Focus point

"Focus point" is a function for finely controlling the listening point during 3D positioning.
Using the focus point makes it possible to separately control the "distance" and "direction" from the sound source to the listener.

Main Uses

Focus points are primarily used in third-person games where the camera and character are separate.
When creating a third-person game using the 3D positioning function, you need to consider where to place the listener.
If placed on the camera, the attenuation of the volume according to distance is calculated based on the distance from the sound source to the camera, so the volume will be low even if the character is close to the sound source.
(It will be difficult for the user to grasp the sense of distance between the character and the sound source.)
In addition, when the camera gets close to the sound source, the volume of the sound source that is not displayed on the screen may sound loud.
One option to avoid the above problem is to place a listener on the character, but this method is not foolproof.
When a listener is placed on a character, the attenuation of the sound volume is determined according to the distance between the character and the sound source, so the sound volume will naturally attenuate according to the relative positions of the character and the sound source.
However, if the sound source is located between the character and the camera as shown in the figure below, the sound source is behind the character, so the sound will come from the rear speakers.
In this case, the player operating the game will see the sound source in front (displayed on the monitor) but will hear the sound from behind, which creates a sense of inconsistency between the video and audio.
The above problems can be solved by using a focus point.
By placing a focus point in addition to a listener, it is possible to set the starting point for calculating the distance and direction of the sound source to any location between the listener and the focus point.
For example, if you place a focus point on the character and a listener on the camera, and set the character as the starting point for distance calculations and the camera as the starting point for angle calculations, the volume will attenuate according to the distance between the sound source and the character, and the direction of the sound source will be determined by the angle relative to the camera.

APIs to use

The following APIs are used to control the focus point.
Place the focus point with the criAtomEx3dListener_SetFocusPoint function, and set the origin of the distance and direction with the criAtomEx3dListener_SetDistanceFocusLevel and criAtomEx3dListener_SetDirectionFocusLevel functions.
Note:
The origin of the distance and direction is specified in the range of 0.0f to 1.0f.
0.0f corresponds to the listener, and 1.0f corresponds to the focus point.
You can also specify 0.5f, etc. to place the origin between the listener and the focus point.

Spatial audio connection function "3D Transceiver"

We provide the spatial audio connection function "3D Transceiver" as a function of 3D positioning.
This function submixes audio in the virtual space of 3D positioning and outputs it from a single point.
Regarding submixing, the signal is not actually mixed and processed, but processed by calculating parameters such as volume.
As a result, the processing load is the same as for normal 3D positioning.
This function groups 3D sound sources that exist in a space surrounded by walls as shown in the figure above, and submixes the audio to the 3D listener in the space outside the walls.
With 3D positioning without a 3D transceiver, even if the sound source is inside the room in the game, the direction of the sound image ignores walls.
By using this function, it is possible to output sounds that exist in a closed space from the opening.
Conversely, if the listener enters a closed space, the sounds of the outside world can be collected and output from the entrance.
This function can be used by adding a 3D region, which is an element that groups the space, to the conventional 3D sound source and 3D listener, and setting a 3D transceiver.
3D sound sources and 3D listeners are automatically grouped based on the given 3D region.
Grouped sound sources output audio from the 3D transceiver to 3D listeners with different 3D regions.
When switching the listener's 3D region, the 3D transceiver has a crossfade function to prevent the sound image from changing suddenly.
The 3D transceiver can specify a crossfade distance, and within this range, the sound heard from the transceiver output and the sound heard from the 3D sound source are crossfaded according to the distance from the listener to the transceiver input position.
In addition, in the direct sound area, the balance of the sound from the 3D sound source is 100%.
Therefore, by switching the 3D listener's 3D region within the direct sound area, the sound image can be changed seamlessly.
When a 3D sound source approaches a 3D transceiver, a crossfade is performed in the same way, depending on the crossfade area settings and the distance between the sound source and the transceiver input position.
In this case, the sound image can be changed seamlessly by switching the 3D region of the 3D sound source when the sound source passes through the direct sound area.
Furthermore, as shown in the figure above, the 3D transceiver can set the input and output positions of the sound separately. This makes it possible to reproduce effects such as a microphone and speaker that collects sounds from remote locations and outputs them from a single point, or wireless communication between multiple characters.

About multi-channel sound

3D positioning can also treat multi-channel sound as a sound source.
However, positioning is performed while maintaining the original speaker configuration.
For example, in the case of 5.1ch audio, the configuration and arrangement of L, R, C, LFE, Ls, and Rs is maintained, and no matter where the sound source is moved, it will be played from the respective channels.
Note that the Center and LFE are not affected by any changes to the sound source parameters.
In contrast, the other channels are all affected, and if the sound source position is moved, the channels that are output will change depending on its relationship to the listener.

List of output destinations according to sound source position when the listener faces the front (forward vector (0.0, 0.0, 1.0) / upward vector (0.0, 1.0, 0.0)) (for 5.1ch)
Sound source position from the listener's perspective L output destination R output destination Ls output destination Rs output destination
Forward L R Ls Rs
Right R Rs L Ls
Backward Rs Ls R L
Left Ls L Rs R

If the sound source is placed below the minimum distance of the attenuation distance, it will be panned according to the interior distance.
For more information on interior distance, see here.
Also, if the virtual speaker function is enabled, the speaker angle depends on the setting.
For more information about virtual speakers, see here .

Wideness

Wideness is a parameter that controls the channel spacing of multi-channel audio.
When playing stereo audio, channel 0 is output from the left speaker and channel 1 is output from the right speaker.
Since the distance between the left speaker and the right speaker is 60 degrees, stereo audio can be thought of as two sound sources placed at an interval of 60 degrees.
Wideness is a parameter that controls the spacing between the sound sources of each of the above channels.
The default value of wideness is 1.0. By changing the value of wideness, it is possible to narrow the spacing between the sound sources of both channels.
For example, if you set the wideness value of stereo audio to 0.5, the interval between the two channels will be 30 degrees, and if you set it to 0, it will be 0 degrees (the two channels will be played overlapping).
Attention
Wideness only has an effect on multi-channel audio.
Even if you adjust the wideness value of mono audio, the way it sounds will not change.

Spread

Spread is a parameter that controls the spread of sound.
When playing mono audio, the sound is output from the left and right speakers by default.
(Depending on the settings, it is possible to output sound only from the center speaker, but the default is phantom center output using the left and right speakers.)
Use spread when you want to adjust the sound so that it can be heard not only from the front speakers but also from surrounding speakers (surround, back, etc.).
The default value of spread is 0. By changing the spread value, mono sound sources will be output not only from the front but also from surrounding speakers.
(If spread is set to 1.0, sound will be output at the same volume from all speakers except the center and LFE.)
This makes it possible to suppress the sense of positioning of mono audio.
Notes:
When spread is specified for multi-channel audio, the same processing is performed on the audio of each channel.
(The operation is changed so that each channel is output not only from its original output position but also from the surrounding speakers.)

Send level

The send level method specifies which channel of the original waveform is output from which speaker and at what volume.