Unofficial LSL Reference

[[articles:sound]]


Unofficial LSL reference

User Tools

Login

You are currently not logged in! Enter your authentication credentials below to log in. You need to have cookies enabled to log in.

Login

Forgotten your password? Get a new one: Set new password

This is an old revision of the document!


Sound

This article is about the SL sound clips played directly by scripts, not about the per-parcel streaming audio. See Audio if you're looking for information on the latter.

Sounds in SL are clips of 10.00 seconds or less. Inworld sounds use the WAV format, 16 bit, mono, 44100 Hz, no compression. The currently accepted formats for uploading are:

  • WAV, 44100 Hz, 16 bit, mono
  • WAV, 44100 Hz, 16 bit, stereo (which will be converted to mono)

Sounds are always attached to some kind of object, either a prim (for llPlaySound, llLoopSound, etc.) or an invisible object "dropped" from a prim (for llTriggerSound and llTriggerSoundLimited). In the case of the latter, the sound will remain where the prim was at the moment of triggering, and will not move with the prim. These objects are viewer-side only, and will die when the sound stops. That means that using several llTriggerSound calls, for example, will cause multiple sounds to be heard, without each of them stopping the former.

Sounds started with llTriggerSound or llTriggerSoundLimited are called detached sounds, while sounds started with any other function (llPlaySound, llLoopSound, llLoopSoundMaster, etc.) will become part of the prim's properties, and are called attached sounds.

When a detached sound is triggered from an attachment, the invisible object will be "dropped" inworld, where the avatar is. In the case of HUDs, this means they can be heard by anyone, as opposed to attached sounds in HUDs, which can only be heard by the wearer.