API
CurveDefinition¶
Describes a function that is applied on a value to transform the result.
parts¶
CurvePartDefinition[] required
An array of objects representing each part of the curve. Each object provides a start point, an end point, and fading function to use to link them. Check the CurvePartDefinition section for more information.
The final range of the curve will be bounded within the lowest point and the highest point of all the curve parts.
Example¶
CurvePartDefinition¶
An object describing a single part of a curve. Allowed properties are:
start¶
CurvePointDefinition required
The start point of the curve. It stores the coordinates of the point in the graph. Check the CurvePointDefinition section for more information.
end¶
CurvePointDefinition required
The end point of the curve. It stores the coordinates of the point in the graph. Check the CurvePointDefinition section for more information.
fader¶
string required
The fader transition to use while moving values from the start point to the end point. This stores as value a name to a registered fader transition.
Example¶
CurvePointDefinition¶
Represents a point in a curve graph. It's an object defined by 2 coordinate values:
x¶
double required
The position of the point over the X-axis. The X-axis represents the values passed to the curve for computation.
y¶
float required
The position of the point over the Y-axis. The Y-axis represents the result of the computation for a given value.
Example¶
FadeTransitionSettings¶
This object defines the settings for a fade transition. It is described by the following attributes:
duration¶
double required
The duration of the fade transition, expressed in milliseconds.
fader¶
string required
The name of the [Fader] algorithm to be used. It can be one of those shipped with the engine or from plugins.
Example¶
RtpcCompatibleValue¶
An RTPC-compatible value is an object that can hold a static value or a link to an RTPC value.
kind¶
ValueKind default: Static
Specifies the kind of value that should be used. The possible values are:
| ID | Description |
|---|---|
| Static | The parameter is static value specified by the value field. |
| RTPC | The parameter is a RTPC value specified by the rtpc field. |
When the kind property is set to Static, it is required to define a value field. When the kind property is set to RTPC, it is required to define a rtpc field.
The default value is Static.
value¶
float
A static value that will be used at runtime. This property is only available when the kind property is set to Static.
rtpc¶
RtpcParameter
An object that describe how the value should be updated according to a RTPC object. This object takes as input:
id: The ID of the RTPC object to use.curve: A CurveDefinition object that defines the function to apply on the RTPC value to compute this parameter value.
Check the RtpcParameter section for more information.
Example¶
An RTPC-compatible value with a static value:
An RTPC-compatible value with an RTPC parameter:
{
"kind": "RTPC",
"rtpc": {
"id": 19,
"curve": {
"parts": [
{
"start": {
"x": 0,
"y": 1
},
"end": {
"x": 100,
"y": 0
},
"fader": "Linear"
}
]
}
}
}
RtpcParameter¶
An object used to defines how to gather values from a RtpcCompatibleValue with the kind property set to RTPC. This allows you to use a curve to convert values from the RTPC object to other values.
id¶
uint64 required
The id of the RTPC object where to get the value. This value should reference a valid RTPC object.
curve¶
CurveDefinition required
The curve to use when converting values from the RTPC object. It stores as value an object matching the specification of a CurveDefinition. Check the CurveDefinition section for more information.
Example¶
{
"id": 24,
"curve": {
"parts": [
{
"start": {
"x": 0,
"y": 1
},
"end": {
"x": 1,
"y": 0
},
"fader": "SCurveSharp"
}
]
}
}
BoxShapeDefinition¶
Defines a box-shaped zone used in Attenuation models.
| Property | Type | Description |
|---|---|---|
half_width | float | Half the width of the box (X-axis). |
half_height | float | Half the height of the box (Y-axis). |
half_depth | float | Half the depth of the box (Z-axis). |
CapsuleShapeDefinition¶
Defines a capsule-shaped zone used in Attenuation models.
| Property | Type | Description |
|---|---|---|
radius | float | The radius of the capsule's hemispheres. |
half_height | float | Half the height of the capsule's cylinder. |
ConeShapeDefinition¶
Defines a cone-shaped zone used in Attenuation models.
| Property | Type | Description |
|---|---|---|
radius | float | The radius of the cone base. |
height | float | The height of the cone. |
SphereShapeDefinition¶
Defines a sphere-shaped zone used in Attenuation models.
| Property | Type | Description |
|---|---|---|
radius | float | The radius of the sphere. |
Spatialization¶
The Spatialization enum controls how a sound object is rendered in 3D space. It is used by Sound, Collection, and Switch Container assets via the spatialization field.
| ID | Name | Description |
|---|---|---|
| 0 | None | No spatialization. The sound is played at its raw gain. |
| 1 | Position | 2D spatialization based on position only. Attenuation and stereo panning may apply. |
| 2 | PositionOrientation | 2D spatialization based on position and orientation. Requires the sound object's scope to be Entity. |
| 3 | HRTF | 3D spatialization through an HRIR Sphere. Requires scope: Entity and a configured hrtf block. |
Scope¶
The Scope enum controls how playback data is shared between sound instances. It is used by sound objects (scope) and event actions (scope).
| ID | Name | Description |
|---|---|---|
| 0 | World | All instances share the same playback state (one logical voice across the world). |
| 1 | Entity | Each entity gets its own playback state. Required for PositionOrientation and HRTF spatialization. |
PanningMode¶
The PanningMode enum is used by the mixer configuration to select how spatial sounds are rendered to speakers.
| ID | Name | Description |
|---|---|---|
| 0 | Stereo | 2D stereo (left/right) panning based on horizontal position in listener space. |
| 1 | BinauralLowQuality | HRTF-based panning using first-order Ambisonics over a virtual array of 8 loudspeakers (cube layout). |
| 2 | BinauralMediumQuality | HRTF-based panning using second-order Ambisonics over a virtual array of 12 loudspeakers (dodecahedron layout). |
| 3 | BinauralHighQuality | HRTF-based panning using third-order Ambisonics over a virtual array of 26 loudspeakers (Lebedev grid). |
ZoneDefinition¶
ZoneDefinition is a FlatBuffers union used by the shape.zone field of an attenuation model. The JSON encoding requires both a discriminator (zone_type) and a payload (zone); see Union encoding below.
| Variant | zone_type | Payload table |
|---|---|---|
| Box zone | BoxZone | BoxZoneSettings |
| Capsule zone | CapsuleZone | CapsuleZoneSettings |
| Cone zone | ConeZone | ConeZoneSettings |
| Sphere zone | SphereZone | SphereZoneSettings |
Each variant carries an inner and an outer shape definition. The space between the two is where the attenuation model interpolates the gain.
BoxZoneSettings¶
| Property | Type | Description |
|---|---|---|
inner | BoxShapeDefinition | Inner zone — full-gain region. |
outer | BoxShapeDefinition | Outer zone — silent boundary region. |
CapsuleZoneSettings¶
| Property | Type | Description |
|---|---|---|
inner | CapsuleShapeDefinition | Inner zone — full-gain region. |
outer | CapsuleShapeDefinition | Outer zone — silent boundary region. |
ConeZoneSettings¶
| Property | Type | Description |
|---|---|---|
inner | ConeShapeDefinition | Inner zone — full-gain region. |
outer | ConeShapeDefinition | Outer zone — silent boundary region. |
SphereZoneSettings¶
| Property | Type | Description |
|---|---|---|
inner | SphereShapeDefinition | Inner zone — full-gain region. |
outer | SphereShapeDefinition | Outer zone — silent boundary region. |
FlatBuffers union encoding¶
Several Amplitude assets use FlatBuffers unions — a tagged variant where the runtime needs both the variant tag and the payload. In JSON form, FlatBuffers encodes a union with two parallel fields:
<field>_type: the discriminator (a string naming the variant).<field>: the payload, whose shape depends on the variant.
For union arrays, both fields are arrays of the same length and the i-th element of <field>_type describes the i-th element of <field>.
Single-element example — ZoneDefinition¶
"shape": {
"zone_type": "BoxZone",
"zone": {
"inner": { "half_width": 1.0, "half_height": 1.0, "half_depth": 1.0 },
"outer": { "half_width": 5.0, "half_height": 5.0, "half_depth": 5.0 }
},
"max_attenuation_factor": 0.0
}
Array example — CollectionEntry[]¶
"sounds_type": ["Random", "Random", "Default"],
"sounds": [
{ "sound": 100, "gain": { "kind": "Static", "value": 1.0 }, "weight": 0.5 },
{ "sound": 101, "gain": { "kind": "Static", "value": 1.0 }, "weight": 0.5 },
{ "sound": 102, "gain": { "kind": "Static", "value": 1.0 } }
]
Where unions appear in Amplitude project files¶
| Asset | Discriminator field | Payload field | Variants |
|---|---|---|---|
| Attenuation | zone_type | zone | BoxZone / CapsuleZone / ConeZone / SphereZone |
| Collection | sounds_type[] | sounds[] | Default / Random / Sequence |
| Collection scheduler | config_type | config | Random / Sequence |