$nav ===== Sound ===== This article is about the SL sound clips played directly by scripts, not about the per-parcel streaming audio. See $lart[Audio] if you're looking for information on the latter. Sounds in SL are clips of 10.00000 seconds or less. Inworld sounds are 16 bit, mono, 44100 Hz. 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 $lfn[llPlaySound], $lfn[llLoopSound], etc.) or an invisible object "dropped" from a prim (for $lfn[llTriggerSound] and $lfn[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 $lfn[llTriggerSound] calls, for example, will cause multiple sounds to be heard, without each of them stopping the former. Sounds started with $lfn[llTriggerSound] or $lfn[llTriggerSoundLimited] are called //detached sounds//, while sounds started with any other function ($lfn[llPlaySound], $lfn[llLoopSound], $lfn[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 that detached sounds can be heard by anyone, as opposed to attached sounds in HUDs, which can only be heard by the wearer. The source of the sound is located at that object. The closer to the source, the more intense the sound. If the object moves, a Doppler effect is applied (i.e. the pitch is higher as the object gets closer to the camera, and lower as it gets farther). ===== Functions related to Sound ===== * $lfn[llPlaySound] plays a sound attached to this prim. * $lfn[llStopSound] stops an attached sound playing in this prim. * $lfn[llLoopSound] plays a looped sound attached to this prim. * $lfn[llLoopSoundMaster] plays a looped sound attached to this prim, letting others synchronize with it. * $lfn[llLoopSoundSlave] plays a looped sound attached, synchronized with a master. * $lfn[llPlaySoundSlave] plays an attached sound synchronized with a master. * $lfn[llAdjustSoundVolume] adjusts the volume of a sound attached to this prim. * $lfn[llSetSoundRadius] adjusts how far the attached sounds can be heard. * $lfn[llSetSoundQueueing] adjusts whether attached sounds are enqueued in this prim. * $lfn[llTriggerSound] "drops" a sound where the prim is (plays a detached sound). * $lfn[llTriggerSoundLimited] "drops" a sound where the prim is (plays a detached sound), with limited reach. * $lfn[llPreloadSound] causes a sound to be preloaded, for faster playing, irrespective of whether it will be played as attached or detached. * $lfn[llSound] plays a sound attached to this prim (deprecated - use $lfn[llPlaySound] instead). * $lfn[llSoundPreload] causes a sound to be preloaded (deprecated - use $lfn[llPreloadSound] instead).