-
Notifications
You must be signed in to change notification settings - Fork 6
AudioSource Extension
Audio source properties are exported to something like this in ogex:
Node $node1
{
Name {string {"Speaker"}}
Transform
{
float[16]
{
{1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 5.0, 1.0}
}
}
Extension (applic = "Blender", type = "AudioSource")
{
string {"audio/Test.ogg"}
Extension (applic = "Blender", type = "AS/gain")
{
float {0.5}
}
Extension (applic = "Blender", type = "AS/gain_min")
{
float {0.1}
}
Extension (applic = "Blender", type = "AS/gain_max")
{
float {0.9}
}
Extension (applic = "Blender", type = "AS/rolloff")
{
float {0.5}
}
Extension (applic = "Blender", type = "AS/pitch")
{
float {0.9}
}
Extension (applic = "Blender", type = "AS/dist_max")
{
float {10.0}
}
Extension (applic = "Blender", type = "AS/dist_ref")
{
float {0.5}
}
Extension (applic = "Blender", type = "AS/cone")
{
float[2] {{180.0, 95.0}}
Extension (applic = "Blender", type = "AS/gain_outer")
{
float {0.8}
}
}
}
}
This extension contains all attributes of an audio source. Only nodes will contain this extension structure. AS
in the following extensions is short for audio source.
Substructures: 1 optional string
primitive which represents a filepath to an audio file.
Substructures: 1 float
primitive.
Default: 1.0
gain
matches blenders speaker.volume
property.
Substructures: 1 float
primitive.
Default: 1.0
The pitch of the sound source.
Substructures: 1 float
primitive.
Default: 0.0
The minimum volume/gain of the sound source.
Substructures: 1 float
primitive.
Default: 1.0
The maximum volume/gain of the sound source.
Substructures: 1 float
primitive.
Default: 1.0
The rolloff of the sound source. Matches blenders speaker.attenuation
properties.
Substructures: 1 float
primitive.
Default: 1.0
The maximum distance of the sound source.
Substructures: 1 float
primitive.
Default: 1.0
Distance at which the volume of the sound source is 100%.
Substructures: optional 1 float[2]
primitive. First component matching outer angle, second matching inner angle. And an optional AS/gain_outer
.
Default: {360.0, 360.0}
Cone properties of the sound source.
Substructures: 1 float
primitive.
Default: 1.0
Volume outside the outer cone.