So many regions look really fabulous with great buildings and fantastic landscapes but where are the sounds? Where are the birds, wind, mumbling people, a churchbell far away, sounds I normally hear when I am outside? It all looks real but it still does not sound real. Time to get started with some soundscaping.
How can I have environmental sounds playing?
The easiest way to play a sound on a particular spot on your land is creating a single prim object which contains a soundfile and a script. Current OpenSim sound format that can be used is PCM WAVE (.wav) 16-bit/44.1KHz/mono or stereo with a maximum length of 10.00 seconds. Some sound can be found as freebies on some grids, but if you want a special sound you have to make it yourself and upload it via your viewer.
After uploading you can create a single prim and place the soundfile (search for it in the inventory) in it. You also have to create a script in the prim that will play the soundfile in a loop. A script that works fine looks something like this:
default
{
state_entry()
{
string sound = llGetInventoryName( INVENTORY_SOUND, 0);
llLoopSound( sound , 1);
}
changed(integer change)
{
if (change & CHANGED_INVENTORY)
{
llResetScript();
}
}
}
If you place the object (filled with the sound and the script) somewhere on you region, you will hear it somewhere in the stereo spectrum of your speakers with a certain volume. When you walk away from it the volume of that sound will be less. When you walk towards it the volume increases. When you turn your avatar around, you will notice that the sound will change speakers.
So every part of your sim or land can have several environmental sounds playing. Which will make it a lot more realistic.You can place as many as you like and test it for yourself. You can even place the sounds and script in object that allready exist on you land. A church can have a churchbell ringing every now and then. A tree can have birds singing in it. And how about waves at the beach?
Can't I play environmental sounds via Parcel Audio?
Play button |
You can even play a sound using the Media settings, even with a loop, but it is better to use this option to show video and webcontent. Which can be interactive with the latest Imprudence 1.4.0 viewer. More info about interactivity and Web On A Prim can be found in one of my blogs called: Flash and streaming video on a prim
Where can I get sounds?
There are some wonderfull sites that have free sounds, I have listed them below. The only problem is that you have to edit most of the sounds to create a soundclip that is a .wav file and not longer than 10 seconds, most viewers can not upload longer files.
(UPDATE AUG 2016 - The latest Firestorm viewer 4.7.9 now can handle audio files of maximum 60 seconds.)
It is best to use a mono sound when you place it in a prim.
Free sounds can be found at:
How can I edit the sound?
You can edit the sounds with any audio editor you have on your computer. Maybe you recieved one with your video editing or you cd burning software. If you haven't got any editor I can suggest a good audio editing program for this purpose, the Audacity editor (freeware) which can be found at: audacity.sourceforge.net/
Any more scripts can I use?
If you want to create a script playing sounds 'the way you want it to happen' you can also use the 'Script Me!' pages. You can find them here: www.3greeneggs.com/autoscript
Any other scripts you can find at:
Any other scripts you can find at:
- wiki.secondlife.com/wiki/Category:LSL_Library
- wiki.secondlife.com/wiki/Category:LSL_Examples
- forums.osgrid.org/viewtopic.php?f=5&t=2233
Have fun, and if you have any questions or suggestions? Post a comment!