Spatial audio and outputs¶
AudioEmitter¶
A virtual speaker in the 3D world. It has one Input pin, and any number of wires can feed it. Its position comes from its parent (Attachment, Camera or PVInstance), or from PositionInstance when PositionType = Instance. Under any other parent it is silent.
| Property | Type | Notes |
|---|---|---|
AudioInteractionGroup |
string | Only listeners with the same group hear it. Default "". |
DistanceAttenuationMode |
DistanceAttenuationMode |
Custom (default) uses your curve. Inverse, InverseTapered, Linear and LinearSquared are presets. |
DistanceAttenuationBounds |
NumberRange | Full volume inside the minimum and silent past the maximum. Presets only. Default 4–10,000 studs. |
PositionType |
EmitterPositionType |
Parent (default) or Instance |
PositionInstance |
Instance | Used when PositionType = Instance |
AcousticSimulationEnabled |
bool | Default true. Also needs the listener and SoundService switches on. |
OcclusionEnabled, DiffractionEnabled, ReverbEnabled |
SimulationMode |
Per-feature override: Default, Enabled or Disabled |
SimulationFidelity |
Deprecated. Use AcousticSimulationEnabled. |
| Method | Notes |
|---|---|
SetDistanceAttenuation({[studs]=vol}) |
Custom curve: up to 400 points, volumes 0–1, linear between points, flat past the ends. Only used in Custom mode. An empty table or nil means inverse-square. |
GetDistanceAttenuation() |
Returns the custom curve, even while a preset is active |
SetAngleAttenuation({[deg]=vol}) |
0–180° off the emitter's LookVector. Makes voices project forward, or speakers directional. |
GetAngleAttenuation() |
Empty table when the curve is the default (flat) |
GetAudibilityFor(listener) → 0–1 |
Combined distance × angle volume for that listener |
GetInteractingListeners() |
Listeners sharing this emitter's interaction group |
GetWorldCFrame() |
Where the emitter actually is |
Presets
Inverse falls off naturally from the lower bound. InverseTapered follows inverse up close and fades to exactly zero at the upper bound. Linear and LinearSquared ramp between the bounds. Voice chat's Legacy curve is LinearSquared from 7 to 80 studs.
AudioListener¶
A virtual microphone. It hears every emitter in its interaction group and outputs the spatialized mix on one Output pin. Positioning works the same way as for emitters. The listener's orientation comes from its parent's CFrame.
| Property | Notes |
|---|---|
AudioInteractionGroup |
Which emitters it can hear. Default "". |
PositionType, PositionInstance |
As for AudioEmitter (ListenerPositionType) |
AcousticSimulationEnabled, OcclusionEnabled, DiffractionEnabled, ReverbEnabled |
As for AudioEmitter |
| Method | Notes |
|---|---|
SetDistanceAttenuation(curve) |
Better or worse hearing for this listener only. The default is flat (1 everywhere). |
SetAngleAttenuation(curve) |
Directional hearing, such as a shotgun mic |
GetAudibilityFor(emitter) |
Same number as the emitter-side call |
GetInteractingEmitters() |
Emitters it can hear |
GetWorldCFrame() |
|
Reset() |
Clears the listener's internal state |
A listener does nothing on its own. It must be wired to something, usually an AudioDeviceOutput.
AudioDeviceOutput¶
The player's speakers or headphones. It has one Input pin, and anything wired to it is heard.
| Property | Notes |
|---|---|
Player |
Optional. If set, only that player hears it. If empty, everyone does. This lets the server author 2D audio aimed at one player. |
You can have as many outputs as you like. They all mix into the same hardware. SoundService output-device selection (SetOutputDevice) is for the player's chosen hardware, not routing.
Acoustic simulation checklist¶
SoundService.AcousticSimulationEnabled = true.- Emitter and listener
AcousticSimulationEnabledstay true (the default). - Walls that should block sound keep
BasePart.AudioCanCollide = true. Turn it off for foliage, glass panes or anything that shouldn't muffle. - Tune materials with
PhysicalProperties.AcousticAbsorption(echo) andDensity(muffle). - Set
SoundService.CharacterSoundsUseNewApi = Enabledif you want footsteps and other default character sounds simulated too. - Voice chat is simulated automatically when
VoiceChatService.UseAudioApi = Enabled.
Simulation is tied to graphics quality. On low-end devices reverb, occlusion or diffraction may lose accuracy or turn off.