Schemas / Audio
rig.audio.voice
v1.0.0 · stable maturity: draft 11 fields 1 required
Fields
| Field | Type | Meaning | |
|---|---|---|---|
asset |
entity | required | rig.media.asset_ref of the clip |
bus |
entity | optional | Optional. rig.audio.bus. Absent = the host's default bus |
gain |
number0 – 1 | optional | Optional. 0-1 linear gain; absent = 1 |
pitch |
float | optional | Optional. Playback rate; absent = 1 |
loop |
bool | optional | Optional. Repeat; absent = false |
playing |
bool | optional | Optional. Audible when true; absent = true |
time |
float | optional | Optional. Playhead in seconds at load; absent = 0 |
spatial |
bool | optional | Optional. Pan from this entity's transform when true; absent = false |
maxDistance |
float | optional | Optional. Distance past which a spatial voice is silent. Absent = no cutoff |
unitSize |
float | optional | Optional. Distance scale for rolloff. Absent = the host default |
rolloff |
enumnone · linear · inverse · inverse-square · logarithmic | optional | Optional. none, linear, inverse, inverse-square, logarithmic. Absent = inverse when spatial, otherwise ignored |
One playing asset. Format when present.
gain is linear amplitude, 0-1. A host that stores decibels converts (linear = 10^(dB/20)).
time and playing are the voice when the document is loaded, the same way a body's velocity is. Decoders, voice pools, mix buffers, and doppler tracking stay in the host.
JSON Schema
Resolves at https://rig.works/schemas/rig.audio.voice.schema.json —
raw file.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://rig.works/schemas/rig.audio.voice.schema.json",
"title": "rig.audio.voice",
"type": "object",
"additionalProperties": false,
"properties": {
"asset": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"bus": {
"$ref": "./_defs.schema.json#/$defs/entity"
},
"gain": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"pitch": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"loop": {
"$ref": "./_defs.schema.json#/$defs/bool"
},
"playing": {
"$ref": "./_defs.schema.json#/$defs/bool"
},
"time": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"spatial": {
"$ref": "./_defs.schema.json#/$defs/bool"
},
"maxDistance": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"unitSize": {
"$ref": "./_defs.schema.json#/$defs/float"
},
"rolloff": {
"type": "string",
"enum": [
"none",
"linear",
"inverse",
"inverse-square",
"logarithmic"
]
}
},
"required": [
"asset"
],
"x-rig-maturity": "draft"
}